Skip to content

Commit

Permalink
Merge pull request #121 from fauna/basic_usage
Browse files Browse the repository at this point in the history
Adds basic usage example
  • Loading branch information
marrony committed Apr 21, 2017
2 parents ca3f081 + fb2ab3c commit e29dbae
Showing 1 changed file with 9 additions and 3 deletions.
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

0 comments on commit e29dbae

Please sign in to comment.