Skip to main content

MongoDB adapter for Kernia (motor)

Project description

kernia-mongo

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

Part of Kernia, 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.

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. Source at github.com/advantch/kernia.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kernia_mongo-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kernia_mongo-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file kernia_mongo-0.1.0.tar.gz.

File metadata

  • Download URL: kernia_mongo-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kernia_mongo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19727366c18969db800debf5714ad46647255810c267614177b69655d552bce4
MD5 c2980b67b8992fe3f685cb16765fafbb
BLAKE2b-256 44b834fc62c0babc0cc6b0a2727b079bea59ebdce9749e2ba023b1c0b59ecae9

See more details on using hashes here.

File details

Details for the file kernia_mongo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kernia_mongo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kernia_mongo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4748d90abc69e903317eb07e73f5bbfe3c73e4805a275afafab8ba8d7445bce5
MD5 60d5f020d6b84799445a2cc4a70f3bed
BLAKE2b-256 c54ce68f7c4ba2088d57b0c5c7802f070541aa531a320b8fecdffad6838bfc34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page