To set up the environment for SolaREC's data API, follow these steps:
- Create a virtual environment:
python -m venv .venv
. - Change the source to the virtual environment:
source .venv/bin/activate
.
- Locate the
database.ini
file in the /app directory of the project. - In the
database.ini
file, you'll find a section for PostgreSQL with the following parameters:
[postgresql]
host=
database=
user=
password=
- Install the required dependencies from
requirements.txt
:
pip install -r requirements.txt
To run the API, follow these steps:
- Navigate to the /app directory.
- Execute the following command:
uvicorn main:app --reload
.
After starting the API, visit <url>/docs
to access the API documentation and explore its endpoints.