pynosqlc-cosmosdb
Azure Cosmos DB driver for pynosqlc — connects to Azure Cosmos DB (or the local emulator) via the azure-cosmos async client.
Install
pip install alt-python-pynosqlc-cosmosdb
Requirements
- Python 3.12+
- azure-cosmos 4.7+
- An Azure Cosmos DB account or the Cosmos DB emulator
Usage
Azure (production)
Pass the account endpoint in the URL and the account key in the properties dict:
import asyncio
from pynosqlc.core import DriverManager, Filter
import pynosqlc.cosmosdb # auto-registers CosmosDriver
async def main():
async with await DriverManager.get_client(
'pynosqlc:cosmosdb:https://myaccount.documents.azure.com:443/',
properties={'key': '<your-account-key>', 'db_id': '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())
Cosmos DB Emulator (local)
Use local as the target — the driver connects to http://localhost:8081 with
the well-known emulator master key automatically:
async with await DriverManager.get_client(
'pynosqlc:cosmosdb:local',
properties={'db_id': 'mydb'},
) as client:
...
URL scheme
pynosqlc:cosmosdb:<endpoint-or-local>
| Target | Resolves to |
|---|---|
local or localhost |
http://localhost:8081 with emulator master key |
localhost:PORT |
http://localhost:PORT with emulator master key |
https://... |
Azure Cosmos DB account endpoint (requires key property) |
Optional properties:
| Key | Description |
|---|---|
key |
Account key (required for https:// targets; omitted for emulator) |
db_id |
Database name (default: 'pynosqlc') |
endpoint |
Override endpoint URL (for local/localhost targets) |
Metadata
Release files for alt-python-pynosqlc-cosmosdb 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| alt_python_pynosqlc_cosmosdb-1.0.4.tar.gz | 10.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alt_python_pynosqlc_cosmosdb-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / alt_python_pynosqlc_cosmosdb-1.0.4.tar.gz
| Download URL | alt_python_pynosqlc_cosmosdb-1.0.4.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4051b90cfd7e63c2019c356e03cd882b49cd52dbe2248b714ea784e7adc4165b
|
|
BLAKE2b-256 checksum How to use checksums |
746f5ba5a0dc66a69ea8aac8675e770c436112e0a3403436a0889cd87c6d9510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / alt_python_pynosqlc_cosmosdb-1.0.4-py3-none-any.whl
| Download URL | alt_python_pynosqlc_cosmosdb-1.0.4-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92028aafd225d202430a8c37cd245553e07733c55d3131c02e3b8a5f1fa832e8
|
|
BLAKE2b-256 checksum How to use checksums |
6f8a4d4ae1beecc247c1dc397a76b0fd91c38290d10f20afd12de5d018858b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for alt-python-pynosqlc-cosmosdb 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.