[dependencies]
[dependencies]requests = ">=2.31"rich = "*"httpx = "0.27"
[dev-dependencies]pytest = "8.2"mypy = "*"| Key (table) | Type | Description |
|---|---|---|
[dependencies] | table | Runtime dependencies. Installed into the active environment by tyc sync. |
[dev-dependencies] | table | Dev / test / lint dependencies. Installed separately when using uv sync --dev (or the moral equivalent). |
Version selectors
Each entry maps a package name to a version selector:
| Value | Meaning |
|---|---|
"*" | Any version. |
">=2.31" | Range. |
">=2.31,<3" | Range with upper bound. |
"0.27" | Bare version → ==0.27. |
"==0.27" | Explicit pin. |
Format follows PEP 440 — same as pyproject.toml [project.dependencies].
Managing dependencies
Three subcommands manage the tables:
tyc add requests # adds to [dependencies] at latest versiontyc add httpx@0.27 # adds at specific versiontyc add --dev pytest@8.2 # adds to [dev-dependencies]tyc remove rich # removestyc sync # materialises pyproject.toml and runs `uv sync`What tyc sync does
- Reads
[dependencies]and[dev-dependencies]fromtyphon.toml. - Generates a
pyproject.toml(using your[project]metadata). - Runs
uv sync --python <target>, pinned to the[python] targetso.venvuses the Python the code was checked against (changing the target recreates.venv).
The generated pyproject.toml is overwritten on every tyc sync. Don’t hand-edit it.
Without uv
If uv is not installed, tyc sync updates typhon.toml and prints “install uv to complete”. You can still use pip install -e . against the generated pyproject.toml, or pip install -r requirements.txt after exporting via uv.
Why not declare deps directly in pyproject.toml?
You can. typhon.toml’s [dependencies] is a convenience — having the manifest in one place keeps Typhon-specific config and dependency info together. The compiler doesn’t strictly need this section; if you’d rather manage pyproject.toml directly, drop the section and use pip install -e . / uv sync manually.
Where next
tyc add/remove/sync— the management commands.uvdocs — what the install step is doing.