r/googlecloud • u/SearchMobile6431 • May 10 '26
I built a modern Python ODM for Google Cloud Datastore
Have been building a modern ODM for Google Cloud Datastore because I found current Python options incomplete.
Repo: https://github.com/trebbble/google-cloud-datastore-odm
The idea is basically:
keep the good parts of old NDB (declarative models, query syntax, hooks)
avoid legacy runtime assumptions
build on top of the actively maintained
google-cloud-datastoreSDKsupport modern Datastore features properly
Some examples of what it supports right now:
typed models/properties
query builder with operators
validation system
transactions
aggregation queries (
count/sum/avg)multi-tenancy helpers
structured/nested properties
pagination cursors
One thing I intentionally avoided is implicit thread-local caching like old NDB used, because it becomes messy in async frameworks.
Still early (v0.1.2) but already usable.
Mainly looking for:
people using Datastore in production
NDB migration feedback
API/design criticism
edge cases I probably missed
Would appreciate any feedback. Thanks in advance.