pyproject.toml file¶
The pyproject.toml file in your charm’s root directory is a typical
Python pyproject.toml file.
See also
pyproject.toml in the pip documentation.
Charmcraft creates this file with the following contents:
Dependencies of the charm code, pre-populated with Ops
Dependencies of tests and linters
Configuration of tests and linters
You’ll need to create the uv.lock file and update it if you later change your charm’s dependencies.
For 12-factor app charms targeting Ubuntu 24.04 LTS or lower, the pyproject.toml file
only contains the configuration for tests and linters. Dependencies are specified in the
requirements.txt file, and there’s no uv.lock file.