https://github.com/undp-data/dsc-sea-ai-api
A web app written in FastAPI that powers AI features for the Sustainable Energy Academy.
https://github.com/undp-data/dsc-sea-ai-api
fastapi knowledge-graph openai
Last synced: 10 months ago
JSON representation
A web app written in FastAPI that powers AI features for the Sustainable Energy Academy.
- Host: GitHub
- URL: https://github.com/undp-data/dsc-sea-ai-api
- Owner: UNDP-Data
- License: bsd-3-clause
- Created: 2023-08-16T17:57:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-26T10:55:06.000Z (12 months ago)
- Last Synced: 2025-06-26T11:47:38.350Z (12 months ago)
- Topics: fastapi, knowledge-graph, openai
- Language: Python
- Homepage: https://sea-ai-api.azurewebsites.net
- Size: 195 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dsc-sea-ai-api
[](https://www.python.org/downloads/release/python-3120/)
[](https://github.com/undp-data/dsc-sea-ai-api/blob/main/LICENSE)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://conventionalcommits.org)
[](https://github.com/UNDP-Data/dsc-sea-ai-api/actions/workflows/azure-webapps-python.yml)
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](https://github.com/UNDP-Data/dsc-sea-ai-api/issues).
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## 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.
```bash
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](https://www.conventionalcommits.org/en/v1.0.0/).
The codebase is formatted with `black` and `isort`. Use the provided [Makefile](./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](./LICENSE) file.