Skip to main content

FaunaDB Python driver

Project description

https://img.shields.io/travis/fauna/faunadb-python/master.svg?maxAge=21600 https://img.shields.io/codecov/c/github/fauna/faunadb-python/master.svg?maxAge=21600 https://img.shields.io/pypi/v/faunadb.svg?maxAge=21600 https://img.shields.io/badge/license-MPL_2.0-blue.svg?maxAge=2592000

Python driver for FaunaDB.

Installation

$ 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 for a complete API reference, or look in tests 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.

FaunaDB can be used directly using the query API.

Building it yourself

Setup

$ 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.

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.

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/

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

faunadb-0.1.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

faunadb-0.1.2-py2.py3-none-any.whl (17.1 kB view details)

Uploaded Python 2 Python 3

faunadb-0.1.2-py2-none-any.whl (17.1 kB view details)

Uploaded Python 2

File details

Details for the file faunadb-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for faunadb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ff9ea0076031ea9e700f8c770d155fb4ca5e1f043b82def62992b6bf88cc3b8f
MD5 c7155e7468e7dceacee7bf68dafe0db3
BLAKE2b-256 417f53c762695edd4d856f5cf8909854d8b3d0354aa9392970efa70c15fe622c

See more details on using hashes here.

File details

Details for the file faunadb-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for faunadb-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c89fef39910b01a8f0b236fe2e783c2add3d3d9279e8c40e9a4cd327c651d94
MD5 0e7affbf8243f8ce2250b81045be457f
BLAKE2b-256 44ee1a4e368b9b421717b5babcc18766738d152c3fec34bb83f2c91a62068133

See more details on using hashes here.

File details

Details for the file faunadb-0.1.2-py2-none-any.whl.

File metadata

File hashes

Hashes for faunadb-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 6b1131cb2effe326d017f4b833c900748cbc5e212371f876bb4dbf3089e642f3
MD5 4fbbdf3f67a8546569949b43f6b0d172
BLAKE2b-256 05fdc6e0e9b99cffa80e912ed5e66f7fec37c92f19ae73b07c1692d74cf2840f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page