Created
September 27, 2018 22:13
-
-
Save maxrp/3d5d513b3bdb185b16219ecd6e18885f to your computer and use it in GitHub Desktop.
leveldb to csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# very primitive. | |
import sys | |
import path | |
import plyvel | |
if __name__ == '__main__': | |
the_db = path.Path(sys.argv[1]) | |
db = plyvel.DB(the_db) | |
with db.iterator() as dbit: | |
for k, v in dbit: | |
print("{},{}".format(k, v)) | |
db.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment