providers.mongodb.MongoDbDaoFactory

A MongoDB-based provider implementing the DaoFactoryProtocol.

Usage

Source

providers.mongodb.MongoDbDaoFactory()

Methods

Name Description
__init__() Initialize the provider with configuration parameter.
construct() Yields a MongoDbDaoFactory instance with the provided configuration.

__init__()

Initialize the provider with configuration parameter.

Usage

Source

__init__(*, config, client)
Parameters
config: MongoDbConfig

MongoDB-specific config parameters.

client: AsyncMongoClient
An instance of an async MongoDB client.


construct()

Yields a MongoDbDaoFactory instance with the provided configuration.

Usage

Source

construct(*, config)

The client connection is established and closed automatically.