Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds basic usage example #121

Merged
merged 1 commit into from
Apr 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adds basic usage example
  • Loading branch information
marrony committed Apr 21, 2017
commit fb2ab3cd23d601ce63f5f00144b6696117afb344
12 changes: 9 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ for more examples.
Basic Usage
-----------

The first step for any program is to create a ``client`` instance.
This object must be explicitly threaded through any code that needs to access FaunaDB.
.. code-block:: python

FaunaDB can be used directly using the ``query`` API.
from faunadb import query as q
from faunadb.objects import Ref
from faunadb.client import FaunaClient

client = FaunaClient(secret="your-secret-here")

indexes = client.query(q.paginate(Ref("indexes")))

print(indexes)

Building it yourself
--------------------
Expand Down