A modern, fully-typed Python ODM for Google Cloud Datastore.
Project description
Google Cloud Datastore ODM
Google Cloud Datastore ODM is a modern, fully-typed Python library that brings the beloved developer experience of App Engine's NDB to the modern Datastore SDK. Built for Python 3.10+, it bridges the gap between raw API calls and enterprise-grade application development. It features a declarative property system, intuitive AST-based query building, and intelligent, context-aware ACID transactions with automatic concurrency retries.
Documentation
https://trebbble.github.io/google-cloud-datastore-odm/
Local Setup & Dependencies
The project uses uv for lightning-fast dependency management.
# Install the package in editable mode along with all dev dependencies
uv sync
# or use makefile commands
make setup
Local emulators
# Start all emulators in the background
docker compose -f docker-compose.yml up -d --build
# Tear down and wipe data
docker compose -f docker-compose.yml down --volumes
-
Environment variables to connect to emulators
-
Datastore dev emulator - make sure to set them up in case of local dev; see .env.example:
DATASTORE_EMULATOR_HOST=localhost:10000 GOOGLE_CLOUD_PROJECT=google-cloud-datastore-odm-dev
-
Datastore tests emulator - hardcoded already in test suite:
DATASTORE_EMULATOR_HOST=localhost:10001 GOOGLE_CLOUD_PROJECT=google-cloud-datastore-odm-test
-
-
Datastore emulator user interface at
localhost:10002
Running examples, testing & linting
# Start all emulators in the background
docker compose -f docker-compose.yml up -d --build
# or start only datastore container dedicated for testing
docker compose -f docker-compose.yml up -d --build datastore-test
# run examples from examples folder
uv run python examples/01_properties.py
# run tests with uv
uv run pytest
# or use makefile commands
make test
# Run tests with coverage and generate an XML report
uv run pytest --cov=google_cloud_datastore_odm --cov-report=xml --cov-report=term-missing
# or use makefile commands
make test-cov
# Run the linter & formatter
uv run ruff check
# or use makefile commands
make lint
# for autofixes
uv run ruff check --fix
Local docs:
uv run zensical serve- Visit at http://localhost:8000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google_cloud_datastore_odm-0.1.0.tar.gz.
File metadata
- Download URL: google_cloud_datastore_odm-0.1.0.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a251e35a19fa17bd538e1dbf6881fdf873d3d18cad8bb9eba0d5dbd179fccd9
|
|
| MD5 |
3e26f2d2191d4aad44cfe7e9c04cc003
|
|
| BLAKE2b-256 |
d317b36c5332d3d006fc0e782ee034f690118b69a8dbdc0a05b53c892225202e
|
Provenance
The following attestation bundles were made for google_cloud_datastore_odm-0.1.0.tar.gz:
Publisher:
ci_cd.yml on trebbble/google-cloud-datastore-odm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
google_cloud_datastore_odm-0.1.0.tar.gz -
Subject digest:
5a251e35a19fa17bd538e1dbf6881fdf873d3d18cad8bb9eba0d5dbd179fccd9 - Sigstore transparency entry: 1397258650
- Sigstore integration time:
-
Permalink:
trebbble/google-cloud-datastore-odm@d5b9c044746990479a6781fa9401f4c3a3c3c1d9 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/trebbble
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yml@d5b9c044746990479a6781fa9401f4c3a3c3c1d9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file google_cloud_datastore_odm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: google_cloud_datastore_odm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb75c013f88941d1da6fd7cd86440f1fdefd09cc6da3281c4a8acf5a3d7d032
|
|
| MD5 |
e2e1ea5c8e8d76a14a178c7a89037c41
|
|
| BLAKE2b-256 |
1af6b5db8ca5b312cd524452ffa46a88a3fe77b8c3b9f9c0011b696b27679369
|
Provenance
The following attestation bundles were made for google_cloud_datastore_odm-0.1.0-py3-none-any.whl:
Publisher:
ci_cd.yml on trebbble/google-cloud-datastore-odm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
google_cloud_datastore_odm-0.1.0-py3-none-any.whl -
Subject digest:
fcb75c013f88941d1da6fd7cd86440f1fdefd09cc6da3281c4a8acf5a3d7d032 - Sigstore transparency entry: 1397258656
- Sigstore integration time:
-
Permalink:
trebbble/google-cloud-datastore-odm@d5b9c044746990479a6781fa9401f4c3a3c3c1d9 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/trebbble
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yml@d5b9c044746990479a6781fa9401f4c3a3c3c1d9 -
Trigger Event:
release
-
Statement type: