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

Uploaded Python 3

File details

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

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c78cca55cd2a58c81c0a11d6cb9e6e7755d693d05a39729f5b54cde62921029d
MD5 050a424918acde338e41501f16c50a5f
BLAKE2b-256 9d631b7ee389a0873992d38a970df8e0b05d53e68c858ead16e222549d4bc610

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alt_python_pynosqlc_mongodb-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f30320a102452dafc5956794e303cd398335bda695b0156ecdfb351950d2afe
MD5 6e4e2368826e01844ea96dad72bc5a10
BLAKE2b-256 e92799a66f7131a4d5bbaec420835097e5eca5ce5c3e28746448820e5ad10595

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