Skip to content

Latest commit

 

History

History
106 lines (70 loc) · 2.23 KB

File metadata and controls

106 lines (70 loc) · 2.23 KB

FireSyncHub

It's mostly in the name. Project handles connection to Firebase, creates listener, wait for data format and creates fake data in needed json format, as seen in authorizations.
Prerequisites

Ensure you have the following installed on your Linux machine:

git
python3
pip
virtualenv

If not, you can install them using your package manager. For example, on Ubuntu:

sudo apt-get install git python3 pip python3-virtualenv

Getting Started

  1. Clone the Repository

To clone the repository and navigate into the directory:

git clone https://github.com/NEkropo1/py-async-fastapi-postgre-monster
cd YOUR_PROJECT_NAME

Replace YOUR_USERNAME and YOUR_PROJECT_NAME with appropriate values. 2. Create a Virtual Environment

To create a virtual environment within the project directory:

bash

python3 -m venv venv

  1. Activate the Virtual Environment

To activate the virtual environment:

source venv/bin/activate
  1. Install Dependencies

Install all required packages:
Pre-install Instructions

pip install -r requirements.txt
  1. Configuration .env File

Copy the provided .env.sample (or a similar file) and rename it to .env. Edit the .env file and fill in the necessary configurations:

cp .env.sample .env
nano .env

.ini File

Since there's secret data and some weird dependencies on our alembic.ini, I simplified it, creating sample, of how it might look like All you need is copy paste and add reveland to your dependencies data:

cp alembic.ini.template alembic.ini
nano alembic.ini
  1. Initial Setup

Run the setup.sh script:

./setup.sh

If you encounter a permission error, make the script executable with:

chmod +x setup.sh
  1. If you don't know how to work with firebase, you should dive into official firebase docs.
    Because you need to create connecting creds as creds.json to correctly run the program.

  2. Run the Application

If you've completed the setup with setup.sh, the application should already be running. If you need to run it again in the future: Manually

You can manually start each script:

python3 firebase_worker.py &
python3 main.py