Skip to content

Commit

Permalink
docs: Show how to use named databases
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhogg committed Nov 24, 2023
1 parent 383a500 commit bc539c1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ APIs and Services". From there, look for "Databases" in the Category filter.
Make sure that both "Cloud Datastore API" and "Google Cloud Firestore API" are
enabled.

Accessing a specific project, database, or namespace
====================================================

A client can be bound to a chosen Google Cloud project, database, and/or namespace
by passing these options to the client constructor::

client = ndb.Client(
project="your-project-id",
database="your-database-id",
namespace="your-namespace"
)

If the project is unspecified, it will be inferred from the environment.
If the database is unspecified, it will default to the (default) database.
If the namespace is unspecified, it will default to the default namespace.

Defining Entities, Keys, and Properties
=======================================

Expand Down

0 comments on commit bc539c1

Please sign in to comment.