From 182fe4e2d295768aaf016f94cb43b6b1e5572ebd Mon Sep 17 00:00:00 2001 From: "Bob \"Wombat\" Hogg" Date: Fri, 24 Nov 2023 11:46:59 -0500 Subject: [PATCH] docs: Show how to use named databases (#932) --- docs/index.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index ff5ec5fc..1e876df0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -74,6 +74,18 @@ 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 one or more of these options to the client constructor:: + + client = ndb.Client( + project="your-project-id", + database="your-database-id", + namespace="your-namespace" + ) + Defining Entities, Keys, and Properties =======================================