-
Notifications
You must be signed in to change notification settings - Fork 1
Lazy loading of BSON files and bson2json.py utility
License
ShinNoNoir/bson_lazy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Readme ============================================================================== Usage ------------------------------------------------------------------------------ The bson_lazy package provides a `load()` function that lazily reads a BSON file. The package also comes with a simple BSON to JSON utility. Example usage: :: import bson_lazy from bson.json_util import dumps def json_pprint(doc): print dumps(doc, sort_keys=True, indent=4, separators=(',',':')) with open('sample.bson', 'rb') as f: for doc in bson_lazy.load(f): json_pprint(doc) The implementation of `bson_lazy.load()` is based on PyMongo's bson package. Installation ------------------------------------------------------------------------------ This package can be installed using `pip`: :: pip install https://github.com/ShinNoNoir/bson_lazy/archive/master.zip Or: :: pip install -e git://github.com/ShinNoNoir/bson_lazy.git#egg=bson_lazy Usage of `bson2json.py` ------------------------------------------------------------------------------ This utility displays BSON files to stdout. Usage: `bson2json.py FILE... [OPTIONS]` Options: --pretty Pretty print JSON --help Print this help message
About
Lazy loading of BSON files and bson2json.py utility
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published