Every once in a while, an app version gets out of sync with the Python version you’re using locally. For example, viktor.config.toml
might specify version 3.11, while you’re developing with 3.13, and Viktor warns you that this might not work. It’s a bit of a pain to switch between Python versions with Viktor. If app A uses 3.11, but later you’re working on app B with version 3.13, you have to change the configuration (viktor-cli configure
) and update the Python interpreter path. Then, you have to change it back again when working on app A. While this is doable, it is a little bit frustrating sometimes, and I believe this can be improved.
What if the CLI used uv
(which you already use internally) to handle the Python version? viktor.config.toml
already has all the information you need. This would ensure that the virtual environment (venv) is always in sync with viktor.config.toml
.
Another suggestion would be to let uv
sync the venv with the requirements every time you use viktor-cli start
, so you can be absolutely sure the venv is in sync with the requirements.
It would be even better if the requirements file could be user-defined, so we could use pyproject.toml
for full uv
compatibility, but maybe that’s a bridge too far for now.