Randomly choose a colour from a datasource. Provide hexadecimal value and name.
- python >= 3.10
- flask
- rich
- pandas
- pytest
From repository root:
PYTHONPATH=src pytest tests
- define
DATA_URItodata/essential.csvor rundata/init_db.pyand then set todata/database.db - define
DATA_SOURCE
PYTHONPATH=src python -m chroma
Available endpoints:
/: produces human readable output/colour: produces json output
To run rest api from repo root:
export DATA_SOURCE=DB_SQLITE
export DATA_URI=data/database.db
export FLASK_APP=src/chroma/ui/rest/app
export FLASK_ENV=development
export PYTHONPATH=src
flask run
https://hg.sr.ht/~pablo_esteban/colour-service