diff --git a/docs/advanced-session-pool-topics.rst b/docs/advanced-session-pool-topics.rst index b8b4e8c925..18fd7db64c 100644 --- a/docs/advanced-session-pool-topics.rst +++ b/docs/advanced-session-pool-topics.rst @@ -10,7 +10,7 @@ contract laid out in .. code-block:: python - from google.cloud.spanner.pool import AbstractSessionPool + from google.cloud.spanner import AbstractSessionPool class MyCustomPool(AbstractSessionPool): @@ -43,8 +43,7 @@ Create an instance of :class:`~google.cloud.spanner.pool.PingingPool`: .. code-block:: python - from google.cloud.spanner import Client - from google.cloud.spanner.pool import PingingPool + from google.cloud.spanner import Client, PingingPool client = Client() instance = client.instance(INSTANCE_NAME) @@ -77,8 +76,7 @@ Create an instance of .. code-block:: python - from google.cloud.spanner import Client - from google.cloud.spanner.pool import TransactionPingingPool + from google.cloud.spanner import Client, TransactionPingingPool client = Client() instance = client.instance(INSTANCE_NAME) diff --git a/docs/batch-usage.rst b/docs/batch-usage.rst index d0f38a63b2..419ca106e6 100644 --- a/docs/batch-usage.rst +++ b/docs/batch-usage.rst @@ -132,7 +132,7 @@ rows do not cause errors. .. code:: python - from google.cloud.spanner.keyset import KeySet + from google.cloud.spanner import KeySet to_delete = KeySet(keys=[ ('bharney@example.com',) @@ -165,7 +165,7 @@ if the ``with`` block exits without raising an exception. .. code:: python - from google.cloud.spanner.keyset import KeySet + from google.cloud.spanner import KeySet client = spanner.Client() instance = client.instance(INSTANCE_NAME) diff --git a/docs/client-usage.rst b/docs/client-usage.rst index f0340d3111..801c9cb135 100644 --- a/docs/client-usage.rst +++ b/docs/client-usage.rst @@ -13,8 +13,8 @@ and creating other objects: .. code:: python - from google.cloud import spanner_v1 - client = spanner_v1.Client() + from google.cloud import spanner + client = spanner.Client() Long-lived Defaults ------------------- @@ -47,15 +47,15 @@ Configuration .. code:: - >>> from google.cloud import spanner_v1 - >>> client = spanner_v1.Client() + >>> from google.cloud import spanner + >>> client = spanner.Client() or pass in ``credentials`` and ``project`` explicitly .. code:: - >>> from google.cloud import spanner_v1 - >>> client = spanner_v1.Client(project='my-project', credentials=creds) + >>> from google.cloud import spanner + >>> client = spanner.Client(project='my-project', credentials=creds) .. tip:: diff --git a/docs/database-usage.rst b/docs/database-usage.rst index 5d47d71cdc..8989501a7d 100644 --- a/docs/database-usage.rst +++ b/docs/database-usage.rst @@ -230,7 +230,7 @@ contract laid out in :class:`~google.cloud.spanner.pool.AbstractSessionPool`: .. code-block:: python - from google.cloud.pool import AbstractSessionPool + from google.cloud.spanner import AbstractSessionPool class MyCustomPool(AbstractSessionPool):