Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 1.54 KB

File metadata and controls

69 lines (51 loc) · 1.54 KB

Installation

Step 1: Clone the Repository

First, clone the repository from GitHub:

git clone git@github.com:WafiSolutions/Python.WafiArche.git
cd Python.WafiArche

Step 2: Set Up a Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Environment Variables

Edit the .env file to ensure your database credentials and settings are correct. It should look like this:

DATABASE_URL=postgresql://postgres:test1234!@localhost/newtest

Step 4: Environment Variables

Edit the .env file to ensure your database credentials and settings are correct. It should look like this:

alembic upgrade head

Step 5: Running the FastAPI Server

To start the FastAPI server, run the following command:

uvicorn main:app --reload

Step 7: Create App Directory Structure

You can create a new directory structure inside repositories, routers, and schemas by running:

python create_app.py myapp

Additional: Drop And Then Recreate All Table

You can create a new directory structure inside repositories, routers, and schemas by running:

alembic downgrade -1

Inside sql commandline:

DROP TYPE IF EXISTS vouchertype;
DROP TYPE salesorderstatus;

To create tables again: (A recommendation will be drop files from alembics/versions/ and then run this)

alembic revision --autogenerate -m "Your migration message"
alembic upgrade head