google-cloud-ndb
NDB library for Google Cloud Datastore
Decision gist · record as of 2026-08-14
Yes. NDB is a production-ready, actively maintained library from Google with no known vulnerabilities, low install friction, and permissive licensing. Install it if you are building on App Engine Python 3 or need a Python ORM for Cloud Datastore; skip it if you prefer raw Datastore API calls or use a different database.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10.
- Datastore credentials must be configured via GOOGLE_APPLICATION_CREDENTIALS environment variable or Application Default Credentials.
- Low friction installation as a pure Python wheel.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution in commercial and private projects with minimal restrictions.
last release 2026-08-06 (8 days) · last repo commit 2026-08-14 · 5,373 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 492,745 downloads/mo, #6,358 on PyPI
Alternatives
Verify before relying
pip install google-cloud-ndb
from google.cloud import ndb
client = ndb.Client()
with client.context():
entity = ndb.Model()
entity.put()- Whether the package includes query optimization or automatic index management features beyond basic ORM operations.
- Support for transaction isolation levels or multi-entity ACID guarantees in Datastore.
- Performance characteristics when used with large result sets or complex nested entity structures.
What it is and what it does
NDB is Google's updated Python 3 client library for Cloud Datastore, replacing the legacy Python 2 App Engine version. It provides an object-relational mapping layer that lets you define data models as Python classes and persist them to Datastore with minimal boilerplate. The library handles serialization, querying, and entity lifecycle management, and integrates optional caching through memcache or Redis to reduce Datastore read costs.
The package is designed for App Engine Python 3 runtime but runs on any Python platform. It depends on google-api-core for transport, google-cloud-datastore for low-level Datastore operations, protobuf for serialization, and optional caching backends. It requires Python 3.10 or later and is actively maintained with no known security vulnerabilities.
Use it for
- Build App Engine applications that need persistent entity storage with automatic caching and query support.
- Store and retrieve structured data in Cloud Datastore from Python services without writing raw API calls.
- Add caching layers to Datastore queries using memcache or Redis to reduce latency and costs.
- Migrate from legacy Python 2 App Engine ndb code to modern Python 3 with minimal API changes.
- Define strongly-typed data models with validation and relationships in a serverless environment.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
NDB is a production-ready, actively maintained library from Google with no known vulnerabilities, low install friction, and permissive licensing. Install it if you are building on App Engine Python 3 or need a Python ORM for Cloud Datastore; skip it if you prefer raw Datastore API calls or use a different database.
Install
google-cloud-ndb on PyPI
Before you install
Low friction installation as a pure Python wheel. Actively maintained with a recent release and no known vulnerabilities. Depends on six Google Cloud libraries and caching backends (pymemcache, redis), all of which are stable.
Requires Python >= 3.10. Datastore credentials must be configured via GOOGLE_APPLICATION_CREDENTIALS environment variable or Application Default Credentials.
License in practice
Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution in commercial and private projects with minimal restrictions.
Quickstart
pip install google-cloud-ndb
from google.cloud import ndb
client = ndb.Client()
with client.context():
entity = ndb.Model()
entity.put()
Verify before relying
- Whether the package includes query optimization or automatic index management features beyond basic ORM operations.
- Support for transaction isolation levels or multi-entity ACID guarantees in Datastore.
- Performance characteristics when used with large result sets or complex nested entity structures.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesgoogle-api-coregoogle-cloud-datastoreprotobufpymemcachepytzredis |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 492,745 / month, #6,358 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet |
Evidence: google_cloud_ndb-2.5.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ndb datastore orm”
- google-cloud-ndbNDB is a Python 3 client library for Google Cloud Datastore that…
- types-google-cloud-ndbProvides type stubs for google-cloud-ndb, enabling static type…
- appengine-python-standardProvides access to Google App Engine services (Datastore, Task…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also appengine-python-standard · google-cloud-datastore · google-cloud-redis · types-google-cloud-ndb · google-cloud-redis-cluster · google-cloud-memcache · gcloud · google-cloud-dns · google-cloud-language · google-cloud-filestore