Skip to content

MongoClient is unsubscriptable #21

@chadwhitacre

Description

@chadwhitacre

It would be nice if MongoClient aliased getattr to getitem to better support dynamic db/collection naming.

with mongo[database][collection].find() as cursor:

vs.

with getattr(getattr(mongo, database), collection).find() as cursor:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions