Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/germainlefebvre4/cloudia-api
Backend of the Cloudia project.
https://github.com/germainlefebvre4/cloudia-api
aws azure billling carbon carbon-footprint ccf cloud gcp projects
Last synced: 20 days ago
JSON representation
Backend of the Cloudia project.
- Host: GitHub
- URL: https://github.com/germainlefebvre4/cloudia-api
- Owner: germainlefebvre4
- License: apache-2.0
- Created: 2023-12-20T10:03:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-27T15:21:37.000Z (8 months ago)
- Last Synced: 2024-10-10T20:51:59.402Z (about 1 month ago)
- Topics: aws, azure, billling, carbon, carbon-footprint, ccf, cloud, gcp, projects
- Language: Python
- Homepage: https://cloudia.readthedocs.io/
- Size: 207 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudia - API
This repository contains the API application for the Cloudia project.
---
Project overview: [https://github.com/germainlefebvre4/cloudia-project](https://github.com/germainlefebvre4/cloudia-project)
Documentation: [https://cloudia.readthedocs.io/](https://cloudia.readthedocs.io/)
---
## Getting started
Install required packages:
```bash
sudo apt update
sudo apt install python3-pip python3-dev
pip install poetry
```Setup the databases:
```bash
docker compose up -d db redis
docker compose restart redis
docker compose exec -ti redis redis-cli config set stop-writes-on-bgsave-error no
```Run the app:
```bash
poetry install
poetry run alembic upgrade head
poetry run python app/initial_data.py
poetry run uvicorn app.main:app --port=8080 --reload
```### Troubleshooting
Some distributions might miss some packages. These are some hints if needed:
```bash
# cryptography/cffi
sudo apt install build-essential libssl-dev libffi-dev libpq-dev
```## Development
### Setup workspace
```bash
sudo apt update
sudo apt install python3-pip python3-dev
pip install poetry
poetry install
```### Run locally
This section use docker database called `cloudia`.
```bash
docker compose up -d db redis
docker compose restart redis
poetry run alembic upgrade head
poetry run python app/initial_data.py
poetry run uvicorn app.main:app --port=8080 --reload
```### Run tests
This section use docker database called `cloudia_test`.
```bash
docker compose up -d db_test redis_test
docker compose restart redis_test
poetry run pytest -sv app/tests/
```