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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for python_datastore_sqlalchemy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 95ef12f053437ac09fe731ed683587fc6bfd18be3a88ac88797742f3c0c3459a
MD5 8b1e8705940b821829903f57d8793f17
BLAKE2b-256 189a068882b4b7a8844d3ffe89b7fd05ec90aa5ad424d48471d769c1b84b834d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_datastore_sqlalchemy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f184b16e447703aee1793e650df63d07f114d08b0628b28c43baa14c1363ba60
MD5 671043a0918f2c158beab53e23858080
BLAKE2b-256 df58f792a7ecf33c5e533da1a1d91c2a988791de002eee3cc4a727c6f6291ae4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

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