Skip to content

Commit

Permalink
Prep firestore docs for repo split. (#6000)
Browse files Browse the repository at this point in the history
- Move docs from 'docs/firestore' into 'firestore/docs' and leave symlink.
- Harmonize / DRY 'firestore/README.rst' and 'firestore/docs/index.rst'.
- Remove docs for GAPIC-generated bits (they aren't part of the surface).
- Ensure that docs still build from top-level.

Toward #5912.
  • Loading branch information
tseaver authored Sep 17, 2018
1 parent 8512dd1 commit 3d85030
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 158 deletions.
1 change: 1 addition & 0 deletions docs/firestore
1 change: 0 additions & 1 deletion docs/firestore/changelog.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/firestore/index.rst

This file was deleted.

97 changes: 62 additions & 35 deletions firestore/README.rst
Original file line number Diff line number Diff line change
@@ -1,61 +1,80 @@
Python Client for Google Cloud Firestore
========================================

Python idiomatic client for `Cloud Firestore`_
|pypi| |versions|

.. _Cloud Firestore: https://cloud.google.com/firestore/docs/
The `Google Cloud Firestore`_ API is a flexible, scalable
database for mobile, web, and server development from Firebase and Google
Cloud Platform. Like Firebase Realtime Database, it keeps your data in
sync across client apps through realtime listeners and offers offline support
for mobile and web so you can build responsive apps that work regardless of
network latency or Internet connectivity. Cloud Firestore also offers seamless
integration with other Firebase and Google Cloud Platform products,
including Cloud Functions.

- `Documentation`_
- `Product Documentation`_
- `Client Library Documentation`_

.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/firestore/client.html
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-firestore.svg
:target: https://pypi.org/project/google-cloud-firestore/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-firestore.svg
.. _Google Cloud Firestore: https://cloud.google.com/firestore/
.. _Product Documentation: https://cloud.google.com/firestore/docs/
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/firestore/index.html

Quick Start
-----------

.. code-block:: console
In order to use this library, you first need to go through the following steps:

$ pip install --upgrade google-cloud-firestore
1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud Firestore API.`_
4. `Setup Authentication.`_

For more information on setting up your Python development environment,
such as installing ``pip`` and ``virtualenv`` on your system, please refer
to `Python Development Environment Setup Guide`_ for Google Cloud Platform.
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud Firestore API.: https://cloud.google.com/firestore
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html

.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup
Installation
~~~~~~~~~~~~

Authentication
--------------
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

With ``google-cloud-python`` we try to make authentication as painless as
possible. Check out the `Authentication section`_ in our documentation to
learn more. You may also find the `authentication document`_ shared by all
the ``google-cloud-*`` libraries to be helpful.
With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html
.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/

Using the API
-------------

`Cloud Firestore`_ (`Firestore API docs`_) is a flexible, scalable
database for mobile, web, and server development from Firebase and Google
Cloud Platform. Like Firebase Realtime Database, it keeps your data in
sync across client apps through realtime listeners and offers offline support
for mobile and web so you can build responsive apps that work regardless of
network latency or Internet connectivity. Cloud Firestore also offers seamless
integration with other Firebase and Google Cloud Platform products,
including Cloud Functions.
Mac/Linux
^^^^^^^^^

.. _Firestore API docs: https://cloud.google.com/firestore/docs/
.. code-block:: console
See the ``google-cloud-python`` API `firestore documentation`_ to learn how to
interact with the Cloud Firestore using this Client Library.
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-firestore
.. _firestore documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/firestore/client.html
See the `official Cloud Firestore documentation`_ for more details on
how to activate Cloud Firestore for your project.
Windows
^^^^^^^

.. _official Cloud Firestore documentation: https://cloud.google.com/firestore/docs/
.. code-block:: console
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-firestore
Example Usage
~~~~~~~~~~~~~

.. code:: python
Expand All @@ -76,3 +95,11 @@ how to activate Cloud Firestore for your project.
for doc in docs:
print(u'{} => {}'.format(doc.id, doc.to_dict()))
Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for Google Cloud Firestore API
API to see other available methods on the client.
- Read the `Product Documentation`_ to learn
more about the product and see How-to Guides.
File renamed without changes.
1 change: 1 addition & 0 deletions firestore/docs/changelog.md
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions firestore/docs/gapic/v1beta1/api.rst

This file was deleted.

5 changes: 0 additions & 5 deletions firestore/docs/gapic/v1beta1/types.rst

This file was deleted.

91 changes: 18 additions & 73 deletions firestore/docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,83 +1,28 @@
Python Client for Google Cloud Firestore API (`Alpha`_)
=======================================================
.. include:: /../firestore/README.rst

`Google Cloud Firestore API`_:

- `Client Library Documentation`_
- `Product Documentation`_

.. _Alpha: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst
.. _Google Cloud Firestore API: https://cloud.google.com/firestore
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/firestore/usage.html
.. _Product Documentation: https://cloud.google.com/firestore

Quick Start
-----------

In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud Firestore API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud Firestore API.: https://cloud.google.com/firestore
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html

Installation
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/


Mac/Linux
^^^^^^^^^

.. code-block:: console
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-firestore
Windows
^^^^^^^
API Reference
-------------

.. code-block:: console
.. toctree::
:maxdepth: 2

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-firestore
client
collection
document
query
batch
transaction
constants
types

Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for Google Cloud Firestore API
API to see other available methods on the client.
- Read the `Google Cloud Firestore API Product documentation`_ to learn
more about the product and see How-to Guides.
- View this `repository’s main README`_ to see the full list of Cloud
APIs that we cover.
Changelog
---------

.. _Google Cloud Firestore API Product documentation: https://cloud.google.com/firestore
.. _repository’s main README: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst
For a list of all ``google-cloud-datastore`` releases:

Api Reference
-------------
.. toctree::
:maxdepth: 2
:maxdepth: 2

gapic/v1beta1/api
gapic/v1beta1/types
changelog
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/firestore/types.rst → firestore/docs/types.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Firestore Protobuf Types
~~~~~~~~~~~~~~~~~~~~~~~~
Types
~~~~~

.. automodule:: google.cloud.firestore_v1beta1.types
:members:
Expand Down

0 comments on commit 3d85030

Please sign in to comment.