MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / read_json_file

Function read_json_file

test/performance/perf_test.py:606–612  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

604
605
606def read_json_file(filename):
607 assert proc_client is not None
608 coll = proc_client.perftest.corpus
609 with tempfile.TemporaryFile(mode="w") as temp:
610 for doc in coll.find({"file": filename}, {"_id": False}):
611 temp.write(json.dumps(doc))
612 temp.write("\n")
613
614
615def insert_gridfs_file(filename):

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected