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
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 python_datastore_sqlalchemy-0.0.3.tar.gz.
File metadata
- Download URL: python_datastore_sqlalchemy-0.0.3.tar.gz
- Upload date:
- Size: 51.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f1b6a620b77230fd3d0892bb8bee96f15370546a3354e6dbeda4d4fc4b03ee9
|
|
| MD5 |
27a6f173286997a64beafc954b069fc2
|
|
| BLAKE2b-256 |
8a5ff8e16468b78af21662e0d74ff2a3a121a4ce9d290069741bfa002cfc8a98
|
File details
Details for the file python_datastore_sqlalchemy-0.0.3-py3-none-any.whl.
File metadata
- Download URL: python_datastore_sqlalchemy-0.0.3-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a7b5f59d2f46108feb0f2e0161087003b2062d40c324d84fce23ddea4e6e8f
|
|
| MD5 |
2e971f1449de4c767898e74504871073
|
|
| BLAKE2b-256 |
572552b57435a048c972710e6d49a938e1788daf6760c11b8e4bf9be430abbf1
|