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.2.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.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d8bcc7c220f19b2041bc504b748fef80bc1bb3ff77aa495ca455ffeb77ec4676
MD5 9dfde31267f25e9096c184ffdcbbd3ee
BLAKE2b-256 ffa87e4f39f4bade559067c00b1fc707a47fd7fbcecf55c4070bb3cbc8806cf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dd28466a85527d33a0cabe6389a4ce38ba21795b00d5c70e28dd42794d6d7278
MD5 d647fec9f6e57f2583e75a54ba6d1bc3
BLAKE2b-256 3d50ae3a5a49f058f4cd263a850c0ef8a6e459e174b2480007bf436828dd8599

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