Skip to content

UNDP-Data/dsc-sea-ai-api

Repository files navigation

dsc-sea-ai-api

Python 3.12+ License Black Imports: isort Conventional Commits Build and deploy Python app to Azure Web App

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.

Table of Contents

Getting Started

Follow the steps below to run the API locally.

  1. Clone the repository and navigate to the project folder.
  2. Create and activate a virtual environment.
  3. Create and populate the .env file base on .env.example.
  4. Run make install to install project dependencies.
  5. 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)

Deployment

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.

Contributing

All contributions must follow Conventional Commits. The codebase is formatted with black and isort. Use the provided Makefile for these routine operations.

  1. Clone or fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Make your changes
  4. Ensure your code is properly formatted (make format)
  5. Commit your changes (git commit -m 'Add some feature')
  6. Push to the branch (git push origin feature-branch)
  7. Open a pull request

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file.

About

A web app written in FastAPI that powers AI features for the Sustainable Energy Academy.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5

Languages