r/madeinpython • • Mar 29 '21

I wrote a library to make it easier/more functional to deal with blobs of json.

https://koaning.github.io/clumper/
23 Upvotes

2 comments sorted by

1

u/tahafyto Mar 30 '21

Cool. Hey what should i do when i want to process a 1 GB+ json from the internet without using 1gb of ram? Its structure is similar as in your examples and I just need to iterate over the objects. I would need to stream the http somehow but idk how.

1

u/cantdutchthis Apr 03 '21

You could pass the data chunk by chunk I suppose. It's not something that the library does natively. It's also not designed to solve the "scaling problem". Do you need all the items in the json file? If the file is a jsonlines file then you might be able to effectively filter the data first.