Client interface for the firebase REST API.
Project description
firebase_user
This package is meant as a convenient client interface for the firebase REST API. It doesn't use the firebase-admin sdk and doesn't require any admin credentials. Only uses the firebase app config object which can safely be exposed in the client codebase. Supports Auth, Firestore and Storage for a quick yet powerful decentralized user management on the client side.
Installation
$ pip install firebase-user
Usage
Minimal setting:
from firebase_user import Client
import json
with open('app_config.json','r') as f:
config=json.load(f)
client=Client(config)
client.auth.sign_up("email","password")
#or
client.auth.sign_in("email","password")
print(client.authenticated)
# True
client.auth.change_password("new_password")
data=client.firebase.get_document()
data.age=34
data.hobbies=["Guitar playing","Basketball"]
client.firebase.set_document(data)
files=client.storage.list_files()
client.storage.upload_file(local_file="./folder/file.txt",remote_file="folder/file.txt")
client.storage.download_file(remote_file="folder/file.txt",remote_file="./folder/file.txt")
client.storage.load_folder("./folder")
client.storage.dump_folder("./folder")
client.auth.log_out()
print(client.authenticated)
# False
License
This project is available under MIT license. Please see the LICENSE file for more details.
Contributions
Contributions are welcome. Please open an issue or a pull request to suggest changes or additions.
Contact
For any questions or support requests, please contact Baptiste Ferrand at the following address: bferrand.maths@gmail.com.
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
Built Distribution
Hashes for firebase_user-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9df7b069b261b03527e05c796a18002e4cb4ec3914f9bbcf09de638982a2b3 |
|
MD5 | 6357d4170f9ac34e1af8c2e4febfc96f |
|
BLAKE2b-256 | eeceeaedc35c28d6a696df76f8a6fc790c4bd80c0264804b01dedbc75db2cca6 |