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

Method __getitem__

pymongo/synchronous/database.py:243–250  ·  view source on GitHub ↗

Get a collection of this database by name. Raises InvalidName if an invalid collection name is used. :param name: the name of the collection to get

(self, name: str)

Source from the content-addressed store, hash-verified

241 return self.__getitem__(name)
242
243 def __getitem__(self, name: str) -> Collection[_DocumentType]:
244 """Get a collection of this database by name.
245
246 Raises InvalidName if an invalid collection name is used.
247
248 :param name: the name of the collection to get
249 """
250 return Collection(self, name)
251
252 def get_collection(
253 self,

Callers 1

__getattr__Method · 0.95

Calls 1

CollectionClass · 0.90

Tested by

no test coverage detected