This is the API of ABMODEL course platform.
Only using python 3.11+
- Windows:
python -m venv .venv
.venv\Scripts\activate- Linux/Mac:
python3 -m venv .venv
.venv/bin/activateUsing anaconda
conda create -n abmodel python=3.11
conda activate abmodelUsing Pyenv.
The .python-version file should be in the root of the project, this file activates the virtual environment automatically, you can run pyenv activate abmodel to activate manually the virtual environment.
pyenv install 3.11.8
pyenv virtualenv 3.11.8 abmodelpip install -r requirements.txt- Copy .env.example to .env
- Set env variables in .env
DB_USER=your_username
DB_PASS=your_password
DB_NAME=your_dbname
DB_HOST=localhost # or your db host for example: domain-db.com
DB_PORT=5432It will create the tables if they do not exist, It requires the database to be running.
alembic upgrade headuvicorn app:api --reloadNow you can visit http://127.0.0.1:8000/
You can also visit http://127.0.0.1:8000/docs/ or http://127.0.0.1:8000/redoc/ for API documentation
For more details, please visit https://fastapi.tiangolo.com