Skip to content

Instantly share code, notes, and snippets.

@putnik
Created July 12, 2016 16:59
Show Gist options
  • Save putnik/ea77c28ab5db8b1a156c8b572a2082ed to your computer and use it in GitHub Desktop.
Save putnik/ea77c28ab5db8b1a156c8b572a2082ed to your computer and use it in GitHub Desktop.
Чтение дампа Викиданных на Python
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import ijson
import gzip
f = gzip.open('wikidata-all.json.gz', 'rb')
for item in ijson.items(f, 'item'):
print(item)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment