https://github.com/1999azzar/firebase-and-sqlite-integration-for-document-management
This Python project demonstrates how to integrate Firebase Firestore with a local SQLite database for document management. It includes functions to create, read, update, and delete documents both in Firestore and locally in SQLite, ensuring synchronization and local caching for offline support.
https://github.com/1999azzar/firebase-and-sqlite-integration-for-document-management
Last synced: about 1 month ago
JSON representation
This Python project demonstrates how to integrate Firebase Firestore with a local SQLite database for document management. It includes functions to create, read, update, and delete documents both in Firestore and locally in SQLite, ensuring synchronization and local caching for offline support.
- Host: GitHub
- URL: https://github.com/1999azzar/firebase-and-sqlite-integration-for-document-management
- Owner: 1999AZZAR
- Created: 2024-07-16T15:32:23.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-24T14:21:35.000Z (about 1 year ago)
- Last Synced: 2025-03-27T07:48:22.719Z (7 months ago)
- Language: Python
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Firebase CRUD Operations in Python
This repository contains Python scripts to perform CRUD (Create, Read, Update, Delete) operations on a Firebase Firestore database using the `firebase-admin` SDK, as well as to convert Excel files to SQLite databases and upload SQLite data to Firebase.
## Prerequisites
- Python 3.x
- Firebase project with Firestore enabled
- Firebase Admin SDK service account key## Setup
1. Clone the repository:
```bash
git clone https://github.com/1999AZZAR/Firebase-and-SQLite-Integration-for-Document-Management.git
cd Firebase-and-SQLite-Integration-for-Document-Management
```2. Install the required Python packages listed in `requirements.txt`:
```bash
pip install -r requirements.txt
```3. Place your Firebase Admin SDK service account key JSON file in the project directory. You will be prompted to enter the path to this file when running the scripts.
```python
cred = credentials.Certificate('path/to/your/serviceAccountKey.json')
```## Usage
The `firebase_crud.py` script provides a menu-driven interface to perform various operations on a Firestore collection, including CRUD operations, clearing the screen, nuking the Firebase database, converting Excel files to SQLite databases, and uploading SQLite data to Firebase.
### Menu Options
1. Create a document
2. Create multiple documents
3. Read a document
4. Read multiple documents
5. Update a document
6. Delete a document
7. Clear screen
8. Nuke Firebase Database
9. Convert Excel to SQLite
10. Upload SQLite to Firebase
11. Exit## License
This project is licensed under the MIT License.
### Additional Scripts- `basic_crud.py`: Contains basic CRUD operations and a main function to demonstrate these operations.
- `firebase_cleanup.py`: Contains functions to clean up the Firebase database.
- `xlsx_to_sqlite_firebase.py`: Contains functions to convert Excel files to SQLite databases and upload SQLite data to Firebase.
## LicenseThis project is licensed under the MIT License.