Metadata-Version: 2.4
Name: kernia-mongo
Version: 0.1.0
Summary: MongoDB adapter for Kernia (motor)
Project-URL: Homepage, https://kernia.dev
Project-URL: Documentation, https://kernia.dev/docs
Project-URL: Source, https://github.com/advantch/kernia
Project-URL: Issues, https://github.com/advantch/kernia/issues
Project-URL: Changelog, https://github.com/advantch/kernia/releases
Author: Advantch
License-Expression: MIT
License-File: LICENSE
Keywords: asgi,authentication,authorization,django,fastapi,oauth,passkeys,security,sessions,sso,starlette
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Session
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: kernia>=0.1.0
Requires-Dist: motor>=3
Description-Content-Type: text/markdown

# kernia-mongo

MongoDB database adapter for Kernia, built on the async `motor` driver.

Part of [Kernia](https://kernia.dev), a framework-agnostic authentication library for Python.

## Installation

    pip install kernia-mongo

## Usage

The adapter is an async factory: connect it, then pass it as `database`.

```python
from kernia.auth import init
from kernia.plugins import email_and_password
from kernia.types.init_options import KerniaOptions
from kernia_mongo import mongo_adapter

adapter = await mongo_adapter(url="mongodb://localhost:27017", db_name="app")

auth = init(
    KerniaOptions(
        database=adapter,
        secret="dev-secret",
        plugins=[email_and_password()],
    )
)
```

## Documentation

Full documentation at [kernia.dev/docs](https://kernia.dev/docs). Source at [github.com/advantch/kernia](https://github.com/advantch/kernia).

## License

MIT
