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

Function insert_gridfs_file

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

Source from the content-addressed store, hash-verified

613
614
615def insert_gridfs_file(filename):
616 assert proc_client is not None
617 bucket = GridFSBucket(proc_client.perftest)
618
619 with open(filename, "rb") as gfile:
620 bucket.upload_from_stream(filename, gfile)
621
622
623def read_gridfs_file(filename):

Callers

nothing calls this directly

Calls 2

upload_from_streamMethod · 0.95
GridFSBucketClass · 0.90

Tested by

no test coverage detected