Cyto is the bridge between an oppinionated selection of Python tech. Cyto is everything you need to create a modern Python app. Cyto is the glue and boilerplate code that you no longer have to write yourself.
Note 2024-08-21: pydantic-settings now supports auto-generation of a CLI based on a pydantic model. Therefore, cyto no longer includes this feature.
Cyto has zero dependencies per default. Opt-in to functionality via extras.
Install Cyto along with all extras:
pip install cyto[all]
Poetry has a specific --all-extras
option to help you out:
poetry add cyto --all-extras
If you only want a specific extra, choose that when you install Cyto. E.g.:
pip install cyto[settings] # Automatically pulls in pydantic-settings
Similar for poetry:
poetry add cyto[settings] # Automatically pulls in pydantic-settings
Development requires Python 3.12 or later. Test your python version with:
python3 --version
If you have multiple python installations, you can replace python3
with a specific version (e.g., python3.12
) in the steps below.
Do the following:
- Clone this repository
git clone git@github.com:sbtinstruments/cyto.git
- Install poetry (for dependency management)
curl -sSL https://install.python-poetry.org | python3
- Create poetry's virtual environment and get all dependencies
and all extra features.
poetry install --extras all
All QA basic tools automatically run in Jenkins for each commit pushed to the remote repository.
The QA basic tools are:
ruff
mypy
You can run the QA basic tools manually. This is useful if you
don't want to install the pre-commit
hooks.
Run the QA basic tools manually with:
poetry run task ruff
poetry run task mypy
All of the tools below automatically run in Jenkins for each commit pushed to the remote repository.
The QA test tools are:
pytest
(the test framework itself)pytest-cov
(for test coverage percentage)
We have a default settings file that you can use via the following command:
cp .vscode/settings.json.default .vscode/settings.json
This is optional.