## providers.mongodb.MongoDbDtoKeyValueStore

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


MongoDB specific KVStore provider for Pydantic model (DTO) data.


Usage

``` python
providers.mongodb.MongoDbDtoKeyValueStore(
    *, client, config, dto_model, collection_name
)
```


This store allows arbitrary DTOs (Pydantic models) to be stored as values, with the DTO model passed in the constructor.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize the provider with configuration, model type, and collection name. |

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

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


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


Initialize the provider with configuration, model type, and collection name.


Usage

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


##### Parameters


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

`config: MongoDbConfig`  
MongoDB-specific config parameters.

`dto_model: type[Dto]`  
The Pydantic model type to support for values.

`collection_name: str`  
Name of the collection to hold the key-value pairs.
