{"id":51489513,"url":"https://github.com/firoziya/phirebase","last_synced_at":"2026-07-07T10:03:30.508Z","repository":{"id":356358765,"uuid":"1232179031","full_name":"firoziya/phirebase","owner":"firoziya","description":"A simple python wrapper for the Firebase API with Authentication, Firestore, Realtime Database and Storage support","archived":false,"fork":false,"pushed_at":"2026-05-07T17:52:47.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T19:23:24.729Z","etag":null,"topics":["firebase","firebase-auth","firebase-database","firestore","python","sdk"],"latest_commit_sha":null,"homepage":"https://phirebase.firoziyash.life","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firoziya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-07T17:05:56.000Z","updated_at":"2026-05-07T19:11:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/firoziya/phirebase","commit_stats":null,"previous_names":["firoziya/phirebase"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/firoziya/phirebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoziya%2Fphirebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoziya%2Fphirebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoziya%2Fphirebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoziya%2Fphirebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firoziya","download_url":"https://codeload.github.com/firoziya/phirebase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoziya%2Fphirebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35223385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-auth","firebase-database","firestore","python","sdk"],"created_at":"2026-07-07T10:03:29.766Z","updated_at":"2026-07-07T10:03:30.495Z","avatar_url":"https://github.com/firoziya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phirebase 🔥\r\n\r\nA simple, lightweight Python wrapper for the Firebase API with support for Authentication, Firestore, Realtime Database, and Storage.\r\n\r\n[![PyPI version](https://badge.fury.io/py/phirebase.svg)](https://badge.fury.io/py/phirebase)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)\r\n\r\n## Features\r\n\r\n- 🔐 **Authentication** - Email/Password, Custom Tokens, OAuth, and more\r\n- 📄 **Firestore** - Full CRUD operations with querying, filtering, and batch writes\r\n- 📊 **Realtime Database** - Real-time data synchronization with streaming support\r\n- 📦 **Storage** - File upload, download, and management\r\n- 🔑 **Service Account Support** - Admin SDK capabilities with service accounts\r\n- 🚀 **Lightweight** - Minimal dependencies, easy to install\r\n- 🔄 **REST API Based** - Firestore uses REST API for broader compatibility\r\n\r\n## Installation\r\n\r\n### Using pip\r\n\r\n```bash\r\npip install phirebase\r\n```\r\n\r\n### From source\r\n\r\n```bash\r\ngit clone https://github.com/firoziya/phirebase.git\r\ncd phirebase\r\npip install -e .\r\n```\r\n\r\n### Dependencies\r\n\r\n- `requests` - HTTP library\r\n- `google-auth` - Google authentication\r\n- `google-cloud-storage` - Cloud Storage client\r\n- `python-jwt` - JWT token generation\r\n- `pycryptodome` - Cryptographic operations\r\n- `oauth2client` - OAuth 2.0 support\r\n\r\n## Quick Start\r\n\r\n### Basic Setup\r\n\r\n```python\r\nfrom phirebase import initialize_app\r\n\r\nconfig = {\r\n    \"apiKey\": \"your-api-key\",\r\n    \"authDomain\": \"your-project.firebaseapp.com\",\r\n    \"databaseURL\": \"https://your-project.firebaseio.com\",\r\n    \"storageBucket\": \"your-project.appspot.com\",\r\n    \"projectId\": \"your-project-id\"\r\n}\r\n\r\nfirebase = initialize_app(config)\r\n```\r\n\r\n### With Service Account (Admin SDK)\r\n\r\n```python\r\nconfig = {\r\n    \"apiKey\": \"your-api-key\",\r\n    \"authDomain\": \"your-project.firebaseapp.com\",\r\n    \"databaseURL\": \"https://your-project.firebaseio.com\",\r\n    \"storageBucket\": \"your-project.appspot.com\",\r\n    \"projectId\": \"your-project-id\",\r\n    \"serviceAccount\": \"path/to/serviceAccountKey.json\"  # or dict\r\n}\r\n\r\nfirebase = initialize_app(config)\r\n```\r\n\r\n## Authentication\r\n\r\n### Create User\r\n\r\n```python\r\nauth = firebase.auth()\r\n\r\n# Create user with email and password\r\nuser = auth.create_user_with_email_and_password(\"user@example.com\", \"securePassword123\")\r\nprint(user[\"idToken\"])\r\n```\r\n\r\n### Sign In\r\n\r\n```python\r\n# Sign in with email and password\r\nuser = auth.sign_in_with_email_and_password(\"user@example.com\", \"securePassword123\")\r\n\r\n# Get account info\r\ninfo = auth.get_account_info(user[\"idToken\"])\r\nprint(info)\r\n```\r\n\r\n### Custom Token Authentication\r\n\r\n```python\r\n# Create custom token (requires service account)\r\ncustom_token = auth.create_custom_token(\r\n    uid=\"user123\",\r\n    additional_claims={\"premium\": True}\r\n)\r\n\r\n# Sign in with custom token\r\nuser = auth.sign_in_with_custom_token(custom_token.decode(\"utf-8\"))\r\n```\r\n\r\n### Password Management\r\n\r\n```python\r\n# Send password reset email\r\nauth.send_password_reset_email(\"user@example.com\")\r\n\r\n# Verify reset code and set new password\r\nauth.verify_password_reset_code(\"reset-code\", \"newSecurePassword123\")\r\n```\r\n\r\n### Email Verification\r\n\r\n```python\r\n# Send email verification\r\nauth.send_email_verification(id_token)\r\n```\r\n\r\n### Token Refresh\r\n\r\n```python\r\n# Refresh ID token\r\nrefreshed_user = auth.refresh(refresh_token)\r\n```\r\n\r\n## Firestore\r\n\r\n### Collections \u0026 Documents\r\n\r\n```python\r\ndb = firebase.firestore()\r\n\r\n# Get a collection reference\r\nusers_ref = db.collection(\"users\")\r\n\r\n# Get all documents in a collection\r\nall_users = users_ref.get()\r\nfor user in all_users:\r\n    print(user[\"id\"], user.get(\"name\"))\r\n```\r\n\r\n### Adding Documents\r\n\r\n```python\r\n# Add document with auto-generated ID\r\nresult = db.collection(\"users\").add({\r\n    \"name\": \"Morty Smith\",\r\n    \"age\": 14,\r\n    \"email\": \"morty@example.com\",\r\n    \"active\": True\r\n})\r\nprint(f\"Document ID: {result['id']}\")\r\n\r\n# Add with nested data\r\ndb.collection(\"users\").add({\r\n    \"name\": \"Rick Sanchez\",\r\n    \"age\": 70,\r\n    \"address\": {\r\n        \"street\": \"123 Portal Lane\",\r\n        \"city\": \"Seattle\",\r\n        \"dimension\": \"C-137\"\r\n    },\r\n    \"tags\": [\"genius\", \"scientist\", \"grandfather\"]\r\n})\r\n```\r\n\r\n### Setting Documents\r\n\r\n```python\r\n# Set document with specific ID (overwrites)\r\ndb.collection(\"users\").document(\"user123\").set({\r\n    \"name\": \"Summer Smith\",\r\n    \"age\": 17\r\n})\r\n\r\n# Set with merge (updates only specified fields)\r\ndb.collection(\"users\").document(\"user123\").set({\r\n    \"age\": 18\r\n}, merge=True)\r\n```\r\n\r\n### Getting Documents\r\n\r\n```python\r\n# Get a single document\r\nuser = db.collection(\"users\").document(\"user123\").get()\r\nif user:\r\n    print(user[\"name\"], user[\"age\"])\r\n\r\n# Get document by ID\r\nuser = db.collection(\"users\").get_by_id(\"user123\")\r\n\r\n# Get all documents\r\nall_users = db.collection(\"users\").get_all()\r\n```\r\n\r\n### Updating Documents\r\n\r\n```python\r\n# Update specific fields\r\ndb.collection(\"users\").document(\"user123\").update({\r\n    \"age\": 19,\r\n    \"active\": False\r\n})\r\n```\r\n\r\n### Deleting Documents\r\n\r\n```python\r\n# Delete a document\r\ndb.collection(\"users\").document(\"user123\").delete()\r\n```\r\n\r\n### Subcollections\r\n\r\n```python\r\n# Access subcollection\r\nposts = db.collection(\"users\").document(\"user123\").subcollection(\"posts\")\r\n\r\n# Add to subcollection\r\nposts.add({\r\n    \"title\": \"My First Post\",\r\n    \"content\": \"Hello world!\",\r\n    \"created_at\": db.server_timestamp()\r\n})\r\n\r\n# Get all posts\r\nall_posts = posts.get()\r\n```\r\n\r\n### Querying Data\r\n\r\n```python\r\n# Where clause examples\r\nresults = db.collection(\"users\") \\\r\n    .where(\"age\", \"\u003e=\", 18) \\\r\n    .where(\"active\", \"==\", True) \\\r\n    .get()\r\n\r\n# Order by\r\nresults = db.collection(\"users\") \\\r\n    .order_by(\"age\", \"DESCENDING\") \\\r\n    .limit(10) \\\r\n    .get()\r\n\r\n# Array contains\r\nresults = db.collection(\"users\") \\\r\n    .where(\"tags\", \"array_contains\", \"premium\") \\\r\n    .get()\r\n\r\n# In query\r\nresults = db.collection(\"users\") \\\r\n    .where(\"status\", \"in\", [\"active\", \"pending\"]) \\\r\n    .get()\r\n\r\n# Combined queries\r\nresults = db.collection(\"products\") \\\r\n    .where(\"price\", \"\u003c=\", 100) \\\r\n    .where(\"category\", \"==\", \"electronics\") \\\r\n    .order_by(\"price\", \"DESCENDING\") \\\r\n    .limit(5) \\\r\n    .get()\r\n\r\n# Collection group queries\r\nresults = db.collection_group(\"posts\") \\\r\n    .where(\"published\", \"==\", True) \\\r\n    .get()\r\n```\r\n\r\n### Supported Query Operators\r\n\r\n| Operator | Description |\r\n|----------|-------------|\r\n| `==` | Equal to |\r\n| `!=` | Not equal to |\r\n| `\u003c` | Less than |\r\n| `\u003c=` | Less than or equal to |\r\n| `\u003e` | Greater than |\r\n| `\u003e=` | Greater than or equal to |\r\n| `array_contains` | Array contains value |\r\n| `in` | Value in array |\r\n| `not_in` | Value not in array |\r\n| `array_contains_any` | Array contains any of the values |\r\n\r\n### Special Field Values\r\n\r\n```python\r\n# Server timestamp\r\ndb.collection(\"posts\").add({\r\n    \"title\": \"Hello\",\r\n    \"created_at\": db.server_timestamp()\r\n})\r\n\r\n# Array union (add unique elements)\r\ndb.collection(\"users\").document(\"user123\").update({\r\n    \"tags\": db.array_union(\"new_tag\", \"another_tag\")\r\n})\r\n\r\n# Array remove\r\ndb.collection(\"users\").document(\"user123\").update({\r\n    \"tags\": db.array_remove(\"old_tag\")\r\n})\r\n\r\n# Increment numeric value\r\ndb.collection(\"users\").document(\"user123\").update({\r\n    \"login_count\": db.increment(1),\r\n    \"balance\": db.increment(-50.0)\r\n})\r\n\r\n# Delete a field\r\ndb.collection(\"users\").document(\"user123\").update({\r\n    \"temporary_field\": db.delete_field_value()\r\n})\r\n```\r\n\r\n### Batch Writes\r\n\r\n```python\r\nbatch = db.batch()\r\n\r\n# Add multiple operations\r\nbatch.set(\"users\", \"user1\", {\"name\": \"Morty\", \"age\": 14})\r\nbatch.update(\"users\", \"user2\", {\"age\": 35})\r\nbatch.delete(\"users\", \"user3\")\r\nbatch.set(\"posts\", \"post1\", {\"title\": \"First Post\"})\r\n\r\n# Commit all operations (max 500)\r\nresult = batch.commit()\r\n```\r\n\r\n## Realtime Database\r\n\r\n### Basic Operations\r\n\r\n```python\r\nrtdb = firebase.database()\r\n\r\n# Set data\r\nrtdb.child(\"users\").child(\"user1\").set({\r\n    \"name\": \"Morty Smith\",\r\n    \"age\": 14\r\n})\r\n\r\n# Push data (auto-generated key)\r\nresult = rtdb.child(\"posts\").push({\r\n    \"title\": \"Hello World\",\r\n    \"content\": \"My first post\"\r\n})\r\nprint(result[\"name\"])  # Auto-generated key\r\n\r\n# Update specific fields\r\nrtdb.child(\"users\").child(\"user1\").update({\r\n    \"age\": 15\r\n})\r\n\r\n# Get data\r\nuser = rtdb.child(\"users\").child(\"user1\").get()\r\nprint(user.val())  # OrderedDict with data\r\n\r\n# Delete data\r\nrtdb.child(\"users\").child(\"user1\").remove()\r\n```\r\n\r\n### Querying\r\n\r\n```python\r\n# Order by key\r\nresults = rtdb.child(\"users\") \\\r\n    .order_by_key() \\\r\n    .limit_to_first(10) \\\r\n    .get()\r\n\r\n# Order by value\r\nresults = rtdb.child(\"scores\") \\\r\n    .order_by_value() \\\r\n    .limit_to_last(5) \\\r\n    .get()\r\n\r\n# Order by child\r\nresults = rtdb.child(\"users\") \\\r\n    .order_by_child(\"age\") \\\r\n    .start_at(18) \\\r\n    .end_at(65) \\\r\n    .get()\r\n\r\n# Equal to\r\nresults = rtdb.child(\"users\") \\\r\n    .order_by_child(\"name\") \\\r\n    .equal_to(\"Morty Smith\") \\\r\n    .get()\r\n\r\n# Shallow query (keys only)\r\nkeys = rtdb.child(\"users\") \\\r\n    .shallow() \\\r\n    .get()\r\n\r\n# Iterate results\r\nfor item in results.each():\r\n    print(item.key(), item.val())\r\n```\r\n\r\n### Generate Keys\r\n\r\n```python\r\n# Generate a unique key without pushing data\r\nkey = rtdb.generate_key()\r\nprint(key)  # e.g., \"-Mx2sKL9pQrT8YhN3vWb\"\r\n```\r\n\r\n### Real-time Streaming\r\n\r\n```python\r\ndef stream_handler(message):\r\n    \"\"\"Handle real-time updates\"\"\"\r\n    event_type = message.get(\"event\")  # \"put\", \"patch\", etc.\r\n    data = message.get(\"data\")\r\n    path = message.get(\"path\")\r\n    \r\n    print(f\"Event: {event_type}\")\r\n    print(f\"Path: {path}\")\r\n    print(f\"Data: {data}\")\r\n    print(\"-\" * 50)\r\n\r\n# Start streaming\r\nmy_stream = rtdb.child(\"users\").stream(stream_handler)\r\n\r\n# Keep the program running\r\nimport time\r\ntime.sleep(60)\r\n\r\n# Stop streaming\r\nmy_stream.close()\r\n```\r\n\r\n## Storage\r\n\r\n### Upload Files\r\n\r\n```python\r\nstorage = firebase.storage()\r\n\r\n# Upload from file path\r\nstorage.child(\"images/profile.jpg\").put(\"local_image.jpg\")\r\n\r\n# Upload from file object\r\nwith open(\"document.pdf\", \"rb\") as f:\r\n    storage.child(\"documents/report.pdf\").put(f)\r\n\r\n# Upload with authentication token\r\nstorage.child(\"private/file.txt\").put(\"local_file.txt\", token=user_token)\r\n```\r\n\r\n### Download Files\r\n\r\n```python\r\n# Download file\r\nstorage.child(\"images/profile.jpg\").download(\"downloaded_image.jpg\")\r\n\r\n# Download with token\r\nstorage.child(\"private/file.txt\").download(\"file.txt\", token=user_token)\r\n```\r\n\r\n### Get Download URL\r\n\r\n```python\r\n# Get public URL\r\nurl = storage.child(\"images/profile.jpg\").get_url()\r\nprint(url)\r\n\r\n# Get authenticated URL\r\nurl = storage.child(\"private/file.txt\").get_url(token=user_token)\r\nprint(url)\r\n```\r\n\r\n### Delete Files\r\n\r\n```python\r\n# Delete file (requires service account)\r\nstorage.delete(\"images/old_picture.jpg\")\r\n```\r\n\r\n### List Files\r\n\r\n```python\r\n# List all files (requires service account)\r\nfiles = storage.list_files()\r\nfor file in files:\r\n    print(file.name)\r\n```\r\n\r\n## Working with Authentication Tokens\r\n\r\n```python\r\n# Sign in and get token\r\nauth = firebase.auth()\r\nuser = auth.sign_in_with_email_and_password(\"user@example.com\", \"password\")\r\nid_token = user[\"idToken\"]\r\n\r\n# Use token for authenticated operations\r\ndb = firebase.firestore()\r\nuser_data = db.collection(\"protected_collection\").get(token=id_token)\r\n\r\n# Use token with Realtime Database\r\nrtdb = firebase.database()\r\ndata = rtdb.child(\"protected_path\").get(token=id_token)\r\n\r\n# Use token with Storage\r\nstorage = firebase.storage()\r\nstorage.child(\"private/file.txt\").download(\"file.txt\", token=id_token)\r\n```\r\n\r\n## Complete Example\r\n\r\n```python\r\nfrom phirebase import initialize_app\r\nimport json\r\n\r\n# Initialize Firebase\r\nconfig = {\r\n    \"apiKey\": \"your-api-key\",\r\n    \"authDomain\": \"your-project.firebaseapp.com\",\r\n    \"databaseURL\": \"https://your-project.firebaseio.com\",\r\n    \"storageBucket\": \"your-project.appspot.com\",\r\n    \"projectId\": \"your-project-id\",\r\n    \"serviceAccount\": \"serviceAccountKey.json\"\r\n}\r\n\r\nfirebase = initialize_app(config)\r\n\r\n# Authentication\r\nauth = firebase.auth()\r\ntry:\r\n    user = auth.sign_in_with_email_and_password(\"user@example.com\", \"password123\")\r\n    print(\"Logged in successfully!\")\r\nexcept:\r\n    print(\"Login failed!\")\r\n\r\n# Firestore Operations\r\ndb = firebase.firestore()\r\n\r\n# Add a document\r\nresult = db.collection(\"posts\").add({\r\n    \"title\": \"My First Post\",\r\n    \"content\": \"Hello Firebase!\",\r\n    \"author\": \"user123\",\r\n    \"created_at\": db.server_timestamp(),\r\n    \"tags\": [\"firebase\", \"python\"],\r\n    \"likes\": 0,\r\n    \"published\": True\r\n})\r\nprint(f\"Post created with ID: {result['id']}\")\r\n\r\n# Query posts\r\nrecent_posts = db.collection(\"posts\") \\\r\n    .where(\"published\", \"==\", True) \\\r\n    .order_by(\"created_at\", \"DESCENDING\") \\\r\n    .limit(5) \\\r\n    .get()\r\n\r\nfor post in recent_posts:\r\n    print(f\"{post['title']} - {post['likes']} likes\")\r\n\r\n# Update a post\r\ndb.collection(\"posts\").document(result['id']).update({\r\n    \"likes\": db.increment(1),\r\n    \"tags\": db.array_union(\"tutorial\")\r\n})\r\n\r\n# Real-time Database Operations\r\nrtdb = firebase.database()\r\n\r\n# Set up real-time listener\r\ndef handle_message(message):\r\n    print(f\"Event: {message['event']}\")\r\n    print(f\"Data: {message['data']}\")\r\n\r\nstream = rtdb.child(\"notifications\").stream(handle_message)\r\n\r\n# Push notification\r\nrtdb.child(\"notifications\").push({\r\n    \"message\": \"Welcome to Phirebase!\",\r\n    \"timestamp\": {\"serverTimestamp\": {}},\r\n    \"read\": False\r\n})\r\n\r\n# Storage Operations\r\nstorage = firebase.storage()\r\n\r\n# Upload file\r\nwith open(\"image.jpg\", \"rb\") as f:\r\n    storage.child(\"images/photo.jpg\").put(f)\r\n\r\n# Get download URL\r\nurl = storage.child(\"images/photo.jpg\").get_url()\r\nprint(f\"File URL: {url}\")\r\n\r\n# Clean up\r\nimport time\r\ntime.sleep(5)\r\nstream.close()\r\n```\r\n\r\n## Error Handling\r\n\r\n```python\r\nfrom requests.exceptions import HTTPError\r\n\r\ntry:\r\n    # Attempt operation\r\n    result = db.collection(\"users\").document(\"user123\").get()\r\nexcept HTTPError as e:\r\n    print(f\"HTTP Error: {e}\")\r\n    print(f\"Response: {e.response.text}\")\r\nexcept ValueError as e:\r\n    print(f\"Value Error: {e}\")\r\nexcept Exception as e:\r\n    print(f\"Unexpected error: {e}\")\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\nphirebase/\r\n├── __init__.py          # Package initialization\r\n├── phirebase.py          # Main Firebase wrapper\r\n├── sseclient.py          # Server-Sent Events client\r\n├── README.md             # Documentation\r\n└── setup.py              # Package setup\r\n```\r\n\r\n## API Reference\r\n\r\n### Phirebase Class\r\n\r\nThe main entry point for all Firebase services.\r\n\r\n```python\r\nfirebase = initialize_app(config)\r\n```\r\n\r\n| Method | Returns | Description |\r\n|--------|---------|-------------|\r\n| `auth()` | `Auth` | Authentication service |\r\n| `database()` | `Database` | Realtime Database service |\r\n| `firestore()` | `Firestore` | Firestore service |\r\n| `storage()` | `Storage` | Storage service |\r\n\r\n### Auth Class\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `create_user_with_email_and_password(email, password)` | Create new user |\r\n| `sign_in_with_email_and_password(email, password)` | Sign in user |\r\n| `create_custom_token(uid, additional_claims)` | Create custom token |\r\n| `sign_in_with_custom_token(token)` | Sign in with custom token |\r\n| `refresh(refresh_token)` | Refresh ID token |\r\n| `get_account_info(id_token)` | Get user account info |\r\n| `send_email_verification(id_token)` | Send verification email |\r\n| `send_password_reset_email(email)` | Send password reset email |\r\n| `verify_password_reset_code(code, new_password)` | Reset password |\r\n\r\n### Firestore Class\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `collection(name)` | Reference a collection |\r\n| `document(id)` | Reference a document |\r\n| `subcollection(name)` | Reference a subcollection |\r\n| `collection_group(name)` | Collection group query |\r\n| `add(data)` | Add document with auto-ID |\r\n| `set(data, merge=False)` | Set document data |\r\n| `get()` | Get document(s) |\r\n| `get_all()` | Get all documents |\r\n| `get_by_id(id)` | Get document by ID |\r\n| `update(data)` | Update document fields |\r\n| `delete()` | Delete document |\r\n| `where(field, op, value)` | Filter query |\r\n| `order_by(field, direction)` | Order results |\r\n| `limit(count)` | Limit results |\r\n| `offset(count)` | Offset results |\r\n| `batch()` | Create batch write |\r\n\r\n### Database Class\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `child(*args)` | Reference a path |\r\n| `set(data)` | Set data at path |\r\n| `push(data)` | Push data with auto-key |\r\n| `update(data)` | Update specific fields |\r\n| `get()` | Get data |\r\n| `remove()` | Delete data |\r\n| `generate_key()` | Generate unique key |\r\n| `stream(handler, stream_id)` | Real-time streaming |\r\n| `order_by_key()` | Order by key |\r\n| `order_by_value()` | Order by value |\r\n| `order_by_child(field)` | Order by child field |\r\n| `start_at(value)` | Start query at value |\r\n| `end_at(value)` | End query at value |\r\n| `equal_to(value)` | Filter by equality |\r\n| `limit_to_first(n)` | Limit to first n |\r\n| `limit_to_last(n)` | Limit to last n |\r\n| `shallow()` | Keys only query |\r\n\r\n### Storage Class\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `child(*args)` | Reference a path |\r\n| `put(file, token)` | Upload file |\r\n| `download(filename, token)` | Download file |\r\n| `get_url(token)` | Get download URL |\r\n| `delete(name)` | Delete file |\r\n| `list_files()` | List all files |\r\n\r\n## Limitations\r\n\r\n- **Firestore Transactions**: Not yet implemented in this version\r\n- **Batch Writes**: Maximum 500 operations per batch (Firebase limit)\r\n- **Real-time Listeners**: Only supported for Realtime Database\r\n- **Query Results**: Limited to Firebase's default page sizes\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please follow these steps:\r\n\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n### Development Setup\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/firoziya/phirebase.git\r\ncd phirebase\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\nsource venv/bin/activate  # or `venv\\Scripts\\activate` on Windows\r\n\r\n# Install development dependencies\r\npip install -e \".[dev]\"\r\n\r\n# Run tests\r\npython -m pytest tests/\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n\r\n- [Firebase](https://firebase.google.com/) - Google's mobile platform\r\n- [Pyrebase](https://github.com/thisbejim/Pyrebase) - Original inspiration\r\n- [Firebase REST API](https://firebase.google.com/docs/reference/rest) - API documentation\r\n\r\n## Support\r\n\r\n- **Issues**: [GitHub Issues](https://github.com/firoziya/phirebase/issues)\r\n- **Email**: ykfiroziya@gmail.com\r\n- **Documentation**: [Wiki](https://github.com/firoziya/phirebase/wiki)\r\n\r\n## Changelog\r\n\r\n### v0.1.0 (Initial Release)\r\n- Authentication (Email/Password, Custom Tokens)\r\n- Firestore CRUD operations with querying\r\n- Realtime Database with streaming\r\n- Cloud Storage operations\r\n- Service account support\r\n- Batch write operations\r\n- Special field values (timestamps, arrays, increments)\r\n\r\n---\r\n\r\n**Made with ❤️ by Yash Kumar Firoziya**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiroziya%2Fphirebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiroziya%2Fphirebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiroziya%2Fphirebase/lists"}