<div align="center">
<h1> Firebase REST API </h1>
<p>A simple python wrapper for <a href="https://firebase.google.com">Google's Firebase REST API's</a>.</p>
<br>
</div>
<div align="center">
<a href="https://pepy.tech/project/firebase-rest-api">
<img alt="Total Downloads" src="https://static.pepy.tech/personalized-badge/firebase-rest-api?period=total&units=international_system&left_color=blue&right_color=grey&left_text=Downloads">
</a>
</div>
<div align="center">
<a href="https://github.com/AsifArmanRahman/firebase-rest-api/actions/workflows/build.yml">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/AsifArmanRahman/firebase-rest-api/build.yml?logo=GitHub">
</a>
<a href="https://github.com/AsifArmanRahman/firebase-rest-api/actions/workflows/tests.yml">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/asifarmanrahman/firebase-rest-api/tests.yml?label=tests&logo=Pytest">
</a>
<a href="https://firebase-rest-api.readthedocs.io/en/latest/">
<img alt="Read the Docs" src="https://img.shields.io/readthedocs/firebase-rest-api?logo=Read%20the%20Docs&logoColor=white">
</a>
<a href="https://codecov.io/gh/AsifArmanRahman/firebase-rest-api">
<img alt="CodeCov" src="https://codecov.io/gh/AsifArmanRahman/firebase-rest-api/branch/main/graph/badge.svg?token=N7TE1WVZ7W">
</a>
</div>
<div align="center">
<a href="https://pypi.org/project/firebase-rest-api/">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/firebase-rest-api?logo=python">
</a>
<a href="https://pypi.org/project/firebase-rest-api/">
<img alt="PyPI" src="https://img.shields.io/pypi/v/firebase-rest-api?logo=PyPI&logoColor=white">
</a>
</div>
## Installation
```python
pip install firebase-rest-api
```
## Quick Start
In order to use this library, you first need to go through the following steps:
1. Select or create a Firebase project from [Firebase](https://console.firebase.google.com) Console.
2. Register an Web App.
### Example Usage
```python
# Import Firebase REST API library
import firebase
# Firebase configuration
config = {
"apiKey": "apiKey",
"authDomain": "projectId.firebaseapp.com",
"databaseURL": "https://databaseName.firebaseio.com",
"projectId": "projectId",
"storageBucket": "projectId.appspot.com",
"messagingSenderId": "messagingSenderId",
"appId": "appId"
}
# Instantiates a Firebase app
app = firebase.initialize_app(config)
# Firebase Authentication
auth = app.auth()
# Create new user and sign in
auth.create_user_with_email_and_password(email, password)
user = auth.sign_in_with_email_and_password(email, password)
# Firebase Realtime Database
db = app.database()
# Data to save in database
data = {
"name": "Robert Downey Jr.",
"email": user.get('email')
}
# Store data to Firebase Database
db.child("users").push(data, user.get('idToken'))
# Firebase Storage
storage = app.storage()
# File to store in storage
file_path = 'static/img/example.png'
# Store file to Firebase Storage
storage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "firebase-rest-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "firebase,firebase-auth,firebase-database,firebase-firestore,firebase-realtime-database,firebase-storage",
"author": null,
"author_email": "Asif Arman Rahman <asifarmanrahman@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ab/d0/dc4dab4c1b2690593e09dfd7b5672a9278611d7879b9abbcca132a732718/firebase_rest_api-1.11.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n <h1> Firebase REST API </h1>\n\n <p>A simple python wrapper for <a href=\"https://firebase.google.com\">Google's Firebase REST API's</a>.</p>\n <br>\n\n</div>\n\n<div align=\"center\">\n <a href=\"https://pepy.tech/project/firebase-rest-api\"> \n <img alt=\"Total Downloads\" src=\"https://static.pepy.tech/personalized-badge/firebase-rest-api?period=total&units=international_system&left_color=blue&right_color=grey&left_text=Downloads\">\n </a>\n</div>\n\n<div align=\"center\">\n\n <a href=\"https://github.com/AsifArmanRahman/firebase-rest-api/actions/workflows/build.yml\"> \n <img alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/AsifArmanRahman/firebase-rest-api/build.yml?logo=GitHub\">\n </a>\n <a href=\"https://github.com/AsifArmanRahman/firebase-rest-api/actions/workflows/tests.yml\">\n <img alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/asifarmanrahman/firebase-rest-api/tests.yml?label=tests&logo=Pytest\">\n </a>\n <a href=\"https://firebase-rest-api.readthedocs.io/en/latest/\">\n <img alt=\"Read the Docs\" src=\"https://img.shields.io/readthedocs/firebase-rest-api?logo=Read%20the%20Docs&logoColor=white\">\n </a>\n <a href=\"https://codecov.io/gh/AsifArmanRahman/firebase-rest-api\"> \n <img alt=\"CodeCov\" src=\"https://codecov.io/gh/AsifArmanRahman/firebase-rest-api/branch/main/graph/badge.svg?token=N7TE1WVZ7W\"> \n </a>\n\n</div>\n\n<div align=\"center\">\n <a href=\"https://pypi.org/project/firebase-rest-api/\"> \n <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/firebase-rest-api?logo=python\">\n </a>\n <a href=\"https://pypi.org/project/firebase-rest-api/\"> \n <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/firebase-rest-api?logo=PyPI&logoColor=white\">\n </a>\n</div>\n\n\n\n## Installation\n\n```python\npip install firebase-rest-api\n```\n\n\n## Quick Start\n\nIn order to use this library, you first need to go through the following steps:\n\n1. Select or create a Firebase project from [Firebase](https://console.firebase.google.com) Console.\n\n2. Register an Web App.\n\n\n### Example Usage\n\n```python\n# Import Firebase REST API library\nimport firebase\n\n# Firebase configuration\nconfig = {\n \"apiKey\": \"apiKey\",\n \"authDomain\": \"projectId.firebaseapp.com\",\n \"databaseURL\": \"https://databaseName.firebaseio.com\",\n \"projectId\": \"projectId\",\n \"storageBucket\": \"projectId.appspot.com\",\n \"messagingSenderId\": \"messagingSenderId\",\n \"appId\": \"appId\"\n}\n\n# Instantiates a Firebase app\napp = firebase.initialize_app(config)\n\n\n# Firebase Authentication\nauth = app.auth()\n\n# Create new user and sign in\nauth.create_user_with_email_and_password(email, password)\nuser = auth.sign_in_with_email_and_password(email, password)\n\n\n# Firebase Realtime Database\ndb = app.database()\n\n# Data to save in database\ndata = {\n \"name\": \"Robert Downey Jr.\",\n \"email\": user.get('email')\n}\n\n# Store data to Firebase Database\ndb.child(\"users\").push(data, user.get('idToken'))\n\n\n# Firebase Storage\nstorage = app.storage()\n\n# File to store in storage\nfile_path = 'static/img/example.png'\n\n# Store file to Firebase Storage\nstorage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple python wrapper for Google's Firebase REST API's.",
"version": "1.11.0",
"project_urls": {
"Documentation": "https://firebase-rest-api.readthedocs.io/",
"Source": "https://github.com/AsifArmanRahman/firebase-rest-api"
},
"split_keywords": [
"firebase",
"firebase-auth",
"firebase-database",
"firebase-firestore",
"firebase-realtime-database",
"firebase-storage"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "778be33c24538882924c21fd4e6e64a9ccb2563db7f52a2332d22e6af0a8acdb",
"md5": "435ceb0ad52d4fa3605037313546285b",
"sha256": "3a3dba2356b591dea686a78d972f649add1cc9512a0d18011b1d4657c9750ecc"
},
"downloads": -1,
"filename": "firebase_rest_api-1.11.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "435ceb0ad52d4fa3605037313546285b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 28640,
"upload_time": "2023-08-20T16:27:30",
"upload_time_iso_8601": "2023-08-20T16:27:30.073911Z",
"url": "https://files.pythonhosted.org/packages/77/8b/e33c24538882924c21fd4e6e64a9ccb2563db7f52a2332d22e6af0a8acdb/firebase_rest_api-1.11.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "abd0dc4dab4c1b2690593e09dfd7b5672a9278611d7879b9abbcca132a732718",
"md5": "d39be7d11d638c23a3f63f735addefbf",
"sha256": "00accdd9030065ff02b50d1710a3d11e16cbc601730e980aac4ef481206d0a92"
},
"downloads": -1,
"filename": "firebase_rest_api-1.11.0.tar.gz",
"has_sig": false,
"md5_digest": "d39be7d11d638c23a3f63f735addefbf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 50840,
"upload_time": "2023-08-20T16:27:32",
"upload_time_iso_8601": "2023-08-20T16:27:32.138604Z",
"url": "https://files.pythonhosted.org/packages/ab/d0/dc4dab4c1b2690593e09dfd7b5672a9278611d7879b9abbcca132a732718/firebase_rest_api-1.11.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-20 16:27:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AsifArmanRahman",
"github_project": "firebase-rest-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "firebase-rest-api"
}