FaunaDB Python driver
Python driver for FaunaDB.
$ pip install faunadb
The following versions of Python are supported:
- Python 2.7
- Python 3.3
- Python 3.4
- Python 3.5
- Python 3.6
Driver documentation is available at https://faunadb.readthedocs.org/en/latest/.
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
$ virtualenv venv $ source venv/bin/activate $ pip install .
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).
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.
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.
GitHub pull requests are very welcome.
Copyright 2019 Fauna, Inc.
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
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.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size faunadb-2.11.0-py2.py3-none-any.whl (18.9 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
Hashes for faunadb-2.11.0-py2.py3-none-any.whl