Skip to main content

Azure Cosmos DB Data Object Layer

Project description

cosmodol

Azure Cosmos DB Data Object Layer — access Cosmos DB through a dict-like dol Mapping / MutableMapping interface.

To install: pip install cosmodol

Scope

cosmodol targets the NoSQL (Core / SQL) API of Azure Cosmos DB via the official azure-cosmos Python SDK.

If your Cosmos DB account was provisioned with the MongoDB API, use pymongo directly with mongodol — Cosmos's MongoDB-API accounts speak the MongoDB wire protocol, and cosmodol cannot reach them.

For Azure Blob Storage, see the sibling package azuredol.

Quick start

from cosmodol import cosmos_store

# Single-partition store (simplest)
store = cosmos_store(
    connection_string="AccountEndpoint=https://localhost:8081/;AccountKey=…",
    database="mydb",
    container="mycontainer",
    partition_key_value="my-partition",
)

store["k1"] = {"name": "Alice", "age": 30}
store["k1"]                # → {"id": "k1", "_pk": "my-partition", "name": "Alice", "age": 30}
"k1" in store              # → True
del store["k1"]

See also

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

cosmodol-0.0.2.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

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

cosmodol-0.0.2-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file cosmodol-0.0.2.tar.gz.

File metadata

  • Download URL: cosmodol-0.0.2.tar.gz
  • Upload date:
  • Size: 44.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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 cosmodol-0.0.2.tar.gz
Algorithm Hash digest
SHA256 44ce5d754e25ab7910e2340cd3e0518826a39dc1d4e1148d6618cde82340d6ca
MD5 091acd61c54f4723ac455f27c34a7c0c
BLAKE2b-256 26ad03669f276f7d67709012319879d229ce7fe62546fb3372010deca6ab62fe

See more details on using hashes here.

File details

Details for the file cosmodol-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cosmodol-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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 cosmodol-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f786c3c2b652ffb2058ca79413aee47130e51d6901da0aa7705f6b1cfd1b1fb4
MD5 9b72d535f56a78545dc11af14f6b110a
BLAKE2b-256 f4d830534c88688756995207147e6e5ddbcd3875d26a114eea781c20ed774785

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