## providers.mongodb.MongoDbDaoFactory

<span id="hexkit.providers.mongodb.MongoDbDaoFactory"></span>


A MongoDB-based provider implementing the DaoFactoryProtocol.


Usage

``` python
providers.mongodb.MongoDbDaoFactory(
    *,
    config,
    client,
)
```


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize the provider with configuration parameter. |
| [construct()](#construct) | Yields a MongoDbDaoFactory instance with the provided configuration. |

<span id="__init__"></span>

<span id="hexkit.providers.mongodb.MongoDbDaoFactory.__init__"></span>


#### \_\_init\_\_()


Initialize the provider with configuration parameter.


Usage

``` python
__init__(*, config, client)
```


##### Parameters


`config: MongoDbConfig`  
MongoDB-specific config parameters.

`client: AsyncMongoClient`  
An instance of an async MongoDB client.


<span id="hexkit.providers.mongodb.MongoDbDaoFactory.construct"></span>

------------------------------------------------------------------------


#### construct()


Yields a MongoDbDaoFactory instance with the provided configuration.


Usage

``` python
construct(*, config)
```


The client connection is established and closed automatically.
