A Python API to serve data from the knowledge graph for the Sustainable Energy Academy.
Warning
The package is currently undergoing a major revamp. Some features may be missing or not working as intended. Feel free to open an issue.
Follow the steps below to run the API locally.
- Clone the repository and navigate to the project folder.
- Create and activate a virtual environment.
- Create and populate the
.env
file base on.env.example
. - Run
make install
to install project dependencies. - To launch the API, run
make run
. The API will be running at http://127.0.0.1:8000.
git clone https://github.com/UNDP-Data/dsc-sea-ai-api
cd dsc-sea-ai-api
python -m venv .venv
source .venv/bin/activate
make install
make run
# INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
The project is hooked up to a CI/CD pipeline. Committing to main
branch will trigger deployment to Azure Web App service. A pull request is required to change the branch.
All contributions must follow Conventional Commits.
The codebase is formatted with black
and isort
. Use the provided Makefile for these
routine operations.
- Clone or fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Ensure your code is properly formatted (
make format
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
This project is licensed under the BSD 3-Clause License. See the LICENSE file.