This guide provides detailed instructions for setting up and installing ZooProcess-python for development purposes.
Before installing ZooProcess-python, ensure you have the following prerequisites installed:
- Python 3.10 or higher
- pip (Python package installer)
- git
git clone https://github.com/ecotaxa/ZooProcess-python.git
cd ZooProcess-pythonIt's recommended to use a virtual environment to avoid conflicts with other Python projects:
python3 -m venv venvOn Linux/macOS:
source venv/bin/activateOn Windows:
venv\Scripts\activateInstall all required dependencies using pip:
pip install --upgrade pip
pip install -r requirements.txtIf you encounter issues with uvicorn installation from requirements.txt, you can install it manually:
pip install uvicornAfter installing all dependencies, you can run the application using:
python -m uvicorn main:app --reloadThe application uses the following environment variables:
APP_ENV: Determines which configuration to use (devorprod). Defaults todev.WORKING_DIR: The working directory where the application will look for DB file and write logs. Defaults to the current working directory.
You can set these environment variables before running the application:
# Set the environment to production
export APP_ENV=prod
# Set the working directory
export WORKING_DIR=/path/to/your/working/directory
# Run the application
python -m uvicorn main:app --reload