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.4.tar.gz (44.7 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.4-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cosmodol-0.0.4.tar.gz
  • Upload date:
  • Size: 44.7 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.4.tar.gz
Algorithm Hash digest
SHA256 2310e675247171c8a183a2538f35c8924c2932f6cc111172f5146153d0efb47f
MD5 5a38257e40098a6cec06bd270125a558
BLAKE2b-256 64bcf237862627b6824c43dd9f28d4e4c7ff110c6497cf24e02f046c075fab24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cosmodol-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cfeac26f77a2578fb3dbd0cce9a0a7b5171ebdd92602901f7b5788bfd4ea01c
MD5 1e5198909addfad85c71ded43e11b094
BLAKE2b-256 fb9f8883c08be0d2118d086fc442a7b441bd351acbd8872175691d8ca1ee7e4d

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