Skip to main content

MongoDB driver for pynosqlc

Project description

pynosqlc-mongodb

MongoDB driver for pynosqlc — connects to MongoDB via pymongo's AsyncMongoClient.

Install

pip install alt-python-pynosqlc-mongodb

Requirements

  • Python 3.12+
  • MongoDB 4.4+
  • pymongo 4.6+

Usage

import asyncio
from pynosqlc.core import DriverManager, Filter
import pynosqlc.mongodb  # auto-registers MongoDriver

async def main():
    async with await DriverManager.get_client(
        'pynosqlc:mongodb://localhost:27017/mydb'
    ) as client:
        col = client.get_collection('orders')
        await col.store('o1', {'item': 'widget', 'qty': 5})
        f = Filter.where('qty').gt(0).build()
        async for doc in await col.find(f):
            print(doc)

asyncio.run(main())

URL scheme

pynosqlc:mongodb://<host>:<port>/<dbname>

Example: pynosqlc:mongodb://localhost:27017/mydb

The pynosqlc: prefix is stripped before passing the URL to pymongo — the remainder is a standard MongoDB connection string, so replica set URIs and authentication options (e.g. mongodb://user:pass@host/db) work as-is.

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

alt_python_pynosqlc_mongodb-1.0.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

alt_python_pynosqlc_mongodb-1.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file alt_python_pynosqlc_mongodb-1.0.4.tar.gz.

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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 alt_python_pynosqlc_mongodb-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a2ba17aebb69a9cff23780aca4979e56d128feb0d0e758e09da4ffbf7ff49c77
MD5 47b766df96e5b7d1d1fb7fc4998876e0
BLAKE2b-256 2c401d13f606ae3f960baed00e5581e25413c042471343bc62763a0ff92a347a

See more details on using hashes here.

File details

Details for the file alt_python_pynosqlc_mongodb-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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 alt_python_pynosqlc_mongodb-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9c1dee9df75286c84a1ced44a6ae977eeb12c37a92059fdc81fa8ccdd10102b6
MD5 55e71c4c4e18217383ded8ad4f819983
BLAKE2b-256 3f5e16c3bd21dfd6a510bbf0194f19a09e62a063b10ca22bdee56ea05dbbfe5a

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