--- id: google-cloud-ndb version: "2.5.1" license: Apache 2.0 license_treatment: permissive maintenance: active --- # google-cloud-ndb — NDB library for Google Cloud Datastore License: permissive · Maintenance: active · Downloads: 492.7K/mo ## 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 above — verify before relying. NDB is a Python 3 client library for Google Cloud Datastore that provides an object-oriented interface for storing and querying data in Datastore, with support for caching via memcache or Redis. 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 pip install google-cloud-ndb uv add google-cloud-ndb poetry add google-cloud-ndb ## Installing google-cloud-ndb 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. 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() Requires Python >= 3.10. Datastore credentials must be configured via GOOGLE_APPLICATION_CREDENTIALS environment variable or Application Default Credentials. 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_current - Install friction: low - Maintenance: active - Downloads: 492.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags google cloud datastore python client, ndb datastore orm, app engine datastore library, cloud datastore object mapping, datastore entity persistence python, google cloud ndb cache, datastore query builder, google-cloud, orm, datastore [View on SkillFed](https://skillfed.io/packages/google-cloud-ndb) · [View on PyPI](https://pypi.org/project/google-cloud-ndb/)