async-firebase-rest-api


Nameasync-firebase-rest-api JSON
Version 2.2.0 PyPI version JSON
download
home_pageNone
SummaryAn async python wrapper for Google's Firebase REST API's.
upload_time2024-10-25 19:51:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords firebase firebase-auth firebase-database firebase-firestore firebase-realtime-database firebase-storage
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

   <h1> Async Firebase REST API </h1>

   <p>A simple python wrapper for <a href="https://firebase.google.com">Google's Firebase REST API's</a>.</p>
   <p>This package is an async fork of <a href="https://github.com/AsifArmanRahman/firebase-rest-api">AsifArmanRahman/firebase-rest-api</a>.</p>
   <br>

</div>

<div align="center">
   <a href="https://pepy.tech/project/async-firebase-rest-api"> 
      <img alt="Total Downloads" src="https://static.pepy.tech/personalized-badge/async-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/matiaskotlik/async-firebase-rest-api/actions/workflows/tests.yml">
      <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/matiaskotlik/async-firebase-rest-api/tests.yml?label=tests&logo=Pytest">
   </a>

   <a href="https://async-firebase-rest-api.readthedocs.io/en/latest/">

      <img alt="Read the Docs" src="https://img.shields.io/readthedocs/async-firebase-rest-api?logo=Read%20the%20Docs&logoColor=white">

   </a>
   <a href="https://codecov.io/gh/matiaskotlik/async-firebase-rest-api"> 
      <img alt="CodeCov" src="https://codecov.io/gh/matiaskotlik/async-firebase-rest-api/branch/main/graph/badge.svg?token=N7TE1WVZ7W"> 
   </a>

</div>

<div align="center">
   <a href="https://pypi.org/project/async-firebase-rest-api/"> 
      <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/async-firebase-rest-api?logo=python">
   </a>
   <a href="https://pypi.org/project/async-firebase-rest-api/"> 
      <img alt="PyPI" src="https://img.shields.io/pypi/v/async-firebase-rest-api?logo=PyPI&logoColor=white">
   </a>
</div>



## Installation

```shell
pip install async-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 Async 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
await auth.create_user_with_email_and_password(email, password)
user = await 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": await user.get('email')
}

# Store data to Firebase Database
await 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
await storage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "async-firebase-rest-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "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>, Matias Kotlik <mdkotlik@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/dd/a8/392b95c56242ed1c257086d921f54dbaa8b2fedef18a44befa1974970c44/async_firebase_rest_api-2.2.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n   <h1> Async 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   <p>This package is an async fork of <a href=\"https://github.com/AsifArmanRahman/firebase-rest-api\">AsifArmanRahman/firebase-rest-api</a>.</p>\n   <br>\n\n</div>\n\n<div align=\"center\">\n   <a href=\"https://pepy.tech/project/async-firebase-rest-api\"> \n      <img alt=\"Total Downloads\" src=\"https://static.pepy.tech/personalized-badge/async-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/matiaskotlik/async-firebase-rest-api/actions/workflows/tests.yml\">\n      <img alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/matiaskotlik/async-firebase-rest-api/tests.yml?label=tests&logo=Pytest\">\n   </a>\n\n   <a href=\"https://async-firebase-rest-api.readthedocs.io/en/latest/\">\n\n      <img alt=\"Read the Docs\" src=\"https://img.shields.io/readthedocs/async-firebase-rest-api?logo=Read%20the%20Docs&logoColor=white\">\n\n   </a>\n   <a href=\"https://codecov.io/gh/matiaskotlik/async-firebase-rest-api\"> \n      <img alt=\"CodeCov\" src=\"https://codecov.io/gh/matiaskotlik/async-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/async-firebase-rest-api/\"> \n      <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/async-firebase-rest-api?logo=python\">\n   </a>\n   <a href=\"https://pypi.org/project/async-firebase-rest-api/\"> \n      <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/async-firebase-rest-api?logo=PyPI&logoColor=white\">\n   </a>\n</div>\n\n\n\n## Installation\n\n```shell\npip install async-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 Async 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\nawait auth.create_user_with_email_and_password(email, password)\nuser = await 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\": await user.get('email')\n}\n\n# Store data to Firebase Database\nawait db.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\nawait storage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An async python wrapper for Google's Firebase REST API's.",
    "version": "2.2.0",
    "project_urls": {
        "Documentation": "https://async-firebase-rest-api.readthedocs.io/",
        "Source": "https://github.com/matiaskotlik/async-firebase-rest-api"
    },
    "split_keywords": [
        "firebase",
        " firebase-auth",
        " firebase-database",
        " firebase-firestore",
        " firebase-realtime-database",
        " firebase-storage"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fb42fa78700ba0490ee85a8ba1c373ad6163ca33bfe49722c626dd97fd990bdb",
                "md5": "35179499df0ece25f1a877301dceb1ff",
                "sha256": "57d0196d15a1a064100136aa2a544b171e04bbd95c619d8a301ecbec7fb3b60d"
            },
            "downloads": -1,
            "filename": "async_firebase_rest_api-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35179499df0ece25f1a877301dceb1ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 27241,
            "upload_time": "2024-10-25T19:51:34",
            "upload_time_iso_8601": "2024-10-25T19:51:34.878410Z",
            "url": "https://files.pythonhosted.org/packages/fb/42/fa78700ba0490ee85a8ba1c373ad6163ca33bfe49722c626dd97fd990bdb/async_firebase_rest_api-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dda8392b95c56242ed1c257086d921f54dbaa8b2fedef18a44befa1974970c44",
                "md5": "7007acc9498164745d73c511ce7fce66",
                "sha256": "1aa2e6e6aa4d25ce97201cae44408c732f32cfc35bce9ddd77057521f6309dcb"
            },
            "downloads": -1,
            "filename": "async_firebase_rest_api-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7007acc9498164745d73c511ce7fce66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 50431,
            "upload_time": "2024-10-25T19:51:36",
            "upload_time_iso_8601": "2024-10-25T19:51:36.380324Z",
            "url": "https://files.pythonhosted.org/packages/dd/a8/392b95c56242ed1c257086d921f54dbaa8b2fedef18a44befa1974970c44/async_firebase_rest_api-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 19:51:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "matiaskotlik",
    "github_project": "async-firebase-rest-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "async-firebase-rest-api"
}
        
Elapsed time: 4.59423s