A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/appengine/docs/legacy/standard/python/datastore below:

Using Cloud Firestore in Datastore Mode | App Engine standard environment for Python 2

Using Cloud Firestore in Datastore Mode

Stay organized with collections Save and categorize content based on your preferences.

Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. It is the newest version of Datastore and introduces several improvements over Datastore.

Because Firestore in Datastore mode is optimized for server use cases and for App Engine, we recommend using Firestore in Datastore mode for databases that will be used primarily by App Engine apps. Firestore in Native mode is most useful for mobile and real-time notification use cases. For more information about Firestore modes, see Choosing between Native Mode and Datastore mode.

Using Datastore mode with App Engine

To use Datastore mode with App Engine:

  1. If you haven't already done so, create a database and choose Firestore in Datastore mode.

    You can use existing Datastore databases with App Engine apps. These existing databases will be automatically upgraded to Firestore in Datastore mode.

  2. Use Cloud NDB)

    to create, retrieve, and manage entities in your Datastore mode database.

If you are planning to upgrade your Python 2 app to Python 3, you have a few options:

For additional resources plus an example of migrating from a Python 2 webapp app using App Engine NDB to an equivalent Python 3 Flask app with App Engine NDB enabled, see the bundled services for Python 3 page.

Configuring indexes

Datastore mode uses indexes for every query your application makes. The indexes are updated whenever an entity changes, so the results can be returned quickly when the app makes a query.

Datastore mode automatically creates single-property indexes for use with simple types of queries. For complex queries that include multiple properties, you'll need to configure composite indexes in your app's index.yaml file.

The App Engine development server will update your index.yaml file with the composite indexes needed to run your tests. Similarly, the Datastore mode emulator can generate indexes when you run tests.

You can also add the indexes to your app's index.yaml file manually if you do not run local tests or your tests do not include complex queries.

Setting database permissions

By default, your app has all the permissions required to read and write to Datastore mode and Firestore databases in your Google Cloud project.

To manage these permissions, each App Engine app uses a default service account that gives full read and write access to Datastore mode and Firestore databases in the same project as the app. You can change the permissions of the default service account, but your app may lose access unless you assign an IAM role with the required permissions.

For information about allowing other users, apps, or projects to access a database, see Accessing your database.

Pricing, quotas, and limits

Datastore mode offers a free quota with daily limits. Paid accounts offer unlimited storage, read, and write operations. More information is available on the Datastore Quotas page.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Firestore, a NoSQL document database, is designed for automatic scaling, high performance, and easy application development, representing an evolution from Datastore."],["Firestore offers two modes: Datastore mode, which is optimized for server use cases and App Engine, and Native mode, which is tailored for mobile and real-time notifications."],["App Engine apps can utilize Firestore in Datastore mode, and existing Datastore databases can be automatically upgraded to this mode, facilitating the management of entities using Cloud NDB."],["Datastore mode employs indexes for every query, automatically creating single-property indexes, while composite indexes for complex queries need manual configuration in the `index.yaml` file."],["By default, App Engine apps possess full read and write permissions to Datastore mode and Firestore databases via a default service account, but these permissions can be modified, requiring an IAM role with specific permissions to maintain access."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4