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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cosmodol-0.0.3.tar.gz
  • Upload date:
  • Size: 44.6 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.3.tar.gz
Algorithm Hash digest
SHA256 79b1a9ac3df41ccc71650b3d90c9e36a1cf0702436937960f6cd0661f1270583
MD5 831485be1652cde0670a9804fd9d29ac
BLAKE2b-256 82fc7bde766d4b71d088146dacffbfeb119a355e6db6de5989efeccd82c570fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cosmodol-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eab5fa05ce85b4573678a6945a7171c752d4cca49e0d2d06654690d92caeeb4e
MD5 44a32fbaca037c9468e1bcee3f5299df
BLAKE2b-256 68a1ef200426b02808ddb21e4b7dc1d49cf2787c5e97d85123db21fa17dcaff0

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