async-firebase-rest-api


Nameasync-firebase-rest-api JSON
Version 2.1.1 PyPI version JSON
download
home_pageNone
SummaryAn async python wrapper for Google's Firebase REST API's.
upload_time2024-04-20 23:39:44
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 google-auth google-cloud-firestore google-cloud-storage pkce python_jwt requests six httpx httpx-sse stamina pytest-asyncio
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/98/63/890566af95018a02ed7cfe5c7ef1fb070e63aa8b88f18781e9f97216414e/async_firebase_rest_api-2.1.1.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.1.1",
    "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": "1150710bddc179d69ff9bbdc82d7566b9af383e18b5cbe69198718f2795b110e",
                "md5": "262798cffdb6097268cf4e014d1018cc",
                "sha256": "8f018774fb61176be60caaf52d6340a5975733ee786e98724369574100157859"
            },
            "downloads": -1,
            "filename": "async_firebase_rest_api-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "262798cffdb6097268cf4e014d1018cc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 26589,
            "upload_time": "2024-04-20T23:39:42",
            "upload_time_iso_8601": "2024-04-20T23:39:42.351684Z",
            "url": "https://files.pythonhosted.org/packages/11/50/710bddc179d69ff9bbdc82d7566b9af383e18b5cbe69198718f2795b110e/async_firebase_rest_api-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9863890566af95018a02ed7cfe5c7ef1fb070e63aa8b88f18781e9f97216414e",
                "md5": "6af344769ef75fb999459b5453ffd354",
                "sha256": "efba55186268beb03794da13ef610efe909d1927ce5bdad5e966c69b5a0ee600"
            },
            "downloads": -1,
            "filename": "async_firebase_rest_api-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6af344769ef75fb999459b5453ffd354",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 49856,
            "upload_time": "2024-04-20T23:39:44",
            "upload_time_iso_8601": "2024-04-20T23:39:44.241053Z",
            "url": "https://files.pythonhosted.org/packages/98/63/890566af95018a02ed7cfe5c7ef1fb070e63aa8b88f18781e9f97216414e/async_firebase_rest_api-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 23:39:44",
    "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": [
        {
            "name": "google-auth",
            "specs": [
                [
                    ">=",
                    "2.9.1"
                ]
            ]
        },
        {
            "name": "google-cloud-firestore",
            "specs": [
                [
                    ">=",
                    "2.5.3"
                ]
            ]
        },
        {
            "name": "google-cloud-storage",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "pkce",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "python_jwt",
            "specs": [
                [
                    ">=",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.27.1"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    ">=",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    ">=",
                    "0.27.0"
                ]
            ]
        },
        {
            "name": "httpx-sse",
            "specs": [
                [
                    ">=",
                    "0.4.0"
                ]
            ]
        },
        {
            "name": "stamina",
            "specs": [
                [
                    ">=",
                    "24.2.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.23.6"
                ]
            ]
        }
    ],
    "lcname": "async-firebase-rest-api"
}
        
Elapsed time: 0.23046s