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
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for fauna_easy-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c6a8ea9232888c7a2dfeea91a80ef6731a3663b9aa5239dbe78dfee989573e3 |
|
MD5 | 40f0b9c0d70a4b4bd81170feb2a4654e |
|
BLAKE2b-256 | 81d186a7e65753925c239f4ac9235660b48fc1dcda8d1dcdad5ea04b0cf79ddf |