Skip to main content

SQLAlchemy dialect for Google Cloud Datastore in Firestore mode

Installation

Install from PyPI:

pip install python-datastore-sqlalchemy

Install from a local checkout:

uv pip install -e .

Runtime dependencies are declared in pyproject.toml. requirements.txt is not used by this project.

Usage

from sqlalchemy import create_engine, text

engine = create_engine(
    "datastore://my-project/?database=my-db",
    credentials="path/to/credentials.json",
)

with engine.connect() as conn:
    result = conn.execute(text("SELECT * FROM test_table"))
    print(result.fetchall())

Preview

[!WARNING] Please note: Not all GQL and SQL syntax has been fully tested. Should you encounter any bugs, please post the relevant query and open an issue on GitHub.

How to contribute

Feel free to open issues and pull requests on GitHub.

Development

This project supports Python 3.10 and newer. It uses a uv-managed virtual environment by default. The lockfile is tracked so local development and CI use the same dependency resolution.

Install the development environment:

uv sync --locked

Run the test suite:

uv run pytest

The Datastore-backed tests require the Google Cloud SDK with the beta and cloud-datastore-emulator components installed. If gcloud is not on PATH, point the test fixture at it explicitly:

GCLOUD_PATH=/path/to/google-cloud-sdk/bin/gcloud uv run pytest

Development Notes

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_datastore_sqlalchemy-0.0.3.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

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

python_datastore_sqlalchemy-0.0.3-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for python_datastore_sqlalchemy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1f1b6a620b77230fd3d0892bb8bee96f15370546a3354e6dbeda4d4fc4b03ee9
MD5 27a6f173286997a64beafc954b069fc2
BLAKE2b-256 8a5ff8e16468b78af21662e0d74ff2a3a121a4ce9d290069741bfa002cfc8a98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_datastore_sqlalchemy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a7b5f59d2f46108feb0f2e0161087003b2062d40c324d84fce23ddea4e6e8f
MD5 2e971f1449de4c767898e74504871073
BLAKE2b-256 572552b57435a048c972710e6d49a938e1788daf6760c11b8e4bf9be430abbf1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.4

2 files

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page