Registry / devops / uv-sort

uv-sort

JSON →
library0.7.0pypypi✓ verified 86d ago

Sorts dependencies in pyproject.toml or uv.lock files alphabetically, designed for use with the uv package manager. Current version 0.7.0, requires Python >=3.10. Released under MIT license; maintained actively with periodic updates.

pip install uv-sort
INSTALL
IMPORT
SIG · UV-SORT
U
uv-sort
devopspythonv0.7.0
Install
2.9s avg
Import
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 32.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.000s · 33MB
31MB installed
● package 31MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uv_sort
import uv_sort
uv-sort is a CLI tool, but Python API available via uv_sort module.

Sort dependencies in a pyproject.toml file using the Python API.

import uv_sort result = uv_sort.sort("pyproject.toml") print(result)
uv-sort --version
Debug
Known issues
gotchaThe tool modifies files in-place by default. Use --check to dry-run.
fix
Add --check flag to see changes without modifying.
affects: all
gotchauv-sort only sorts [dependencies] and [dev-dependencies], not [build-system] or [tool] sections.
fix
Manually sort other sections if needed.
affects: all
gotchaEnsure your pyproject.toml is valid TOML; malformed files cause parse errors.
fix
Validate with `toml` library before sorting.
affects: all
Errors
Common errors & fixes
Error: Failed to parse pyproject.toml: ...
Invalid TOML syntax in the file.
fix
Run `tomlcheck` or fix syntax errors manually.
ValueError: Unsupported Python version: <3.10
Trying to install uv-sort on Python older than 3.10.
fix
Upgrade Python to 3.10+ or use a different tool.
KeyError: 'dependencies'
The pyproject.toml does not have a [dependencies] table.
fix
Ensure your file includes [dependencies] or [tool.uv] sections.
Upgrade
Version history
0.7.0latest on PyPI · released Jan 7, 2026
Audit
Dependencies
packagingrequiredVersion specifier parsing
Agent activity
2 hits · last 30 days
node
2
Resources
uv-sort — pip install uv-sort · libregistry