Skip to main content

A convenient wrapper around faunadb-py that abstracts away FQL code for the database service faunadb.

Project description

Fauna Easy Python

A convenient wrapper around faunadb for python that abstracts away FQL code for the database service faunadb

Installation

Use the package manager pip to install fauna-easy.

pip install fauna_easy

QuickStart

from fauna_easy.base_model import FaunaEasyBaseModel
from pydantic import BaseModel
from faunadb.client import FaunaClient

if __name__ == '__main__':
    class NewPost(BaseModel):
        title: str
        content: str

    fauna_client = FaunaClient('YOUR_CLIENT_SECRET')

    Post = FaunaEasyBaseModel('posts', NewPost)

    create_query = Post.create({
        'title': 'my post title',
        'content': 'my post content'
    }) # Will not automatically create document in database. This merely creates the query

    created_documents = fauna_client.query(create_query) # creates document in database
    print(created_documents)

Documentation

Still under development :)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache License 2.0

Project details


Download files

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

Source Distribution

fauna_easy-0.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

fauna_easy-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file fauna_easy-0.0.1.tar.gz.

File metadata

  • Download URL: fauna_easy-0.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.5

File hashes

Hashes for fauna_easy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 369b61f99257b150eba42bb02c581584ceb94e258cdabe52dab653a9543ca449
MD5 df0622ae80a54adc27718d661e79398a
BLAKE2b-256 6a255a9b1a0cc301a44832428da64cf257a26ccc0885627bee407be1c29355de

See more details on using hashes here.

File details

Details for the file fauna_easy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fauna_easy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.5

File hashes

Hashes for fauna_easy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c6a8ea9232888c7a2dfeea91a80ef6731a3663b9aa5239dbe78dfee989573e3
MD5 40f0b9c0d70a4b4bd81170feb2a4654e
BLAKE2b-256 81d186a7e65753925c239f4ac9235660b48fc1dcda8d1dcdad5ea04b0cf79ddf

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