Metadata-Version: 2.4
Name: alt-python-pynosqlc-mongodb
Version: 1.0.3
Summary: MongoDB driver for pynosqlc
Project-URL: Homepage, https://github.com/alt-python/pynosqlc
Project-URL: Repository, https://github.com/alt-python/pynosqlc
Project-URL: Documentation, https://github.com/alt-python/pynosqlc#getting-started
Project-URL: Bug Tracker, https://github.com/alt-python/pynosqlc/issues
Author: Craig Parravicini, Claude (Anthropic)
License: MIT
Keywords: async,database,driver,mongodb,nosql
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: alt-python-pynosqlc-core
Requires-Dist: pymongo>=4.6
Description-Content-Type: text/markdown

# pynosqlc-mongodb

MongoDB driver for [pynosqlc](https://github.com/alt-python/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

```python
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.
