Metadata-Version: 2.1
Name: faunadb
Version: 2.6.0.dev0
Summary: FaunaDB Python driver
Home-page: https://github.com/fauna/faunadb-python
Author: Fauna, Inc
Author-email: priority@fauna.com
License: MPL 2.0
Keywords: faunadb fauna
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Requires-Dist: iso8601
Requires-Dist: requests
Requires-Dist: future
Provides-Extra: doc
Requires-Dist: sphinx ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
Provides-Extra: lint
Requires-Dist: pylint ; extra == 'lint'
Provides-Extra: test
Requires-Dist: nose2 ; extra == 'test'
Requires-Dist: nose2[coverage_plugin] ; extra == 'test'

FaunaDB Python
==============

.. image:: https://img.shields.io/codecov/c/github/fauna/faunadb-python/master.svg?maxAge=21600
 :target: https://codecov.io/gh/fauna/faunadb-python
.. image:: https://img.shields.io/pypi/v/faunadb.svg?maxAge=21600
 :target: https://pypi.python.org/pypi/faunadb
.. image:: https://img.shields.io/badge/license-MPL_2.0-blue.svg?maxAge=2592000
 :target: https://raw.githubusercontent.com/fauna/faunadb-python/master/LICENSE

Python driver for `FaunaDB <https://fauna.com>`_.


Installation
------------

.. code-block:: bash

    $ pip install faunadb


Compatibility
-------------

The following versions of Python are supported:

* Python 2.7
* Python 3.3
* Python 3.4
* Python 3.5
* Python 3.6


Documentation
-------------

Driver documentation is available at https://faunadb.readthedocs.org/en/latest/.

See the `FaunaDB Documentation <https://fauna.com/documentation>`_ for a complete API reference, or look in `tests`_
for more examples.


Basic Usage
-----------

.. code-block:: python

    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(q.indexes()))

    print(indexes)

Building it yourself
--------------------


Setup
~~~~~

.. code-block:: bash

    $ virtualenv venv
    $ source venv/bin/activate
    $ pip install .


Testing
~~~~~~~

To run the tests you must have a FaunaDB database available.
Then set the environment variable ``FAUNA_ROOT_KEY`` to your database's root key.
If you use FaunaDB cloud, this is the password you log in with.

Then run ``make test``.
To test a single test, use e.g. ``python -m unittest tests.test_client.ClientTest.test_ping``.

Tests can also be run via a Docker container with ``FAUNA_ROOT_KEY="your-cloud-secret" make docker-test``
(an alternate Alpine-based Python image can be provided via `RUNTIME_IMAGE`).


Coverage
~~~~~~~~

To run the tests with coverage, install the coverage dependencies with ``pip install .[coverage]``,
and then run ``make coverage``. A summary will be displayed to the terminal, and a detailed coverage report
will be available at ``htmlcov/index.html``.


Documenting
~~~~~~~~~~~

Run ``pip install .[doc]`` to install the needed packages to generate the docs.
Then run ``make doc``, then open ``docs/_build/html/index.html`` in a web browser.


Contribute
----------

GitHub pull requests are very welcome.


License
-------

Copyright 2017 `Fauna, Inc. <https://fauna.com>`_

Licensed under the Mozilla Public License, Version 2.0 (the
"License"); you may not use this software except in compliance with
the License. You may obtain a copy of the License at

`http://mozilla.org/MPL/2.0/ <http://mozilla.org/MPL/2.0/>`_

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.


.. _`tests`: https://github.com/fauna/faunadb-python/blob/master/tests/


