{"id":22528,"library":"uv-sort","title":"uv-sort","description":"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.","status":"active","version":"0.7.0","language":"python","source_language":"en","source_url":"https://github.com/ninoseki/uv-sort","tags":["uv","sort","dependencies","pyproject.toml"],"install":[{"cmd":"pip install uv-sort","lang":"bash","label":"Install via pip"},{"cmd":"uv tool install uv-sort","lang":"bash","label":"Install via uv"}],"dependencies":[{"reason":"Version specifier parsing","package":"packaging","optional":false}],"imports":[{"note":"uv-sort is a CLI tool, but Python API available via uv_sort module.","symbol":"uv_sort","correct":"import uv_sort"}],"quickstart":{"code":"import uv_sort\nresult = uv_sort.sort(\"pyproject.toml\")\nprint(result)","lang":"python","description":"Sort dependencies in a pyproject.toml file using the Python API."},"warnings":[{"fix":"Add --check flag to see changes without modifying.","message":"The tool modifies files in-place by default. Use --check to dry-run.","severity":"gotcha","affected_versions":"all"},{"fix":"Manually sort other sections if needed.","message":"uv-sort only sorts [dependencies] and [dev-dependencies], not [build-system] or [tool] sections.","severity":"gotcha","affected_versions":"all"},{"fix":"Validate with `toml` library before sorting.","message":"Ensure your pyproject.toml is valid TOML; malformed files cause parse errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `tomlcheck` or fix syntax errors manually.","cause":"Invalid TOML syntax in the file.","error":"Error: Failed to parse pyproject.toml: ..."},{"fix":"Upgrade Python to 3.10+ or use a different tool.","cause":"Trying to install uv-sort on Python older than 3.10.","error":"ValueError: Unsupported Python version: <3.10"},{"fix":"Ensure your file includes [dependencies] or [tool.uv] sections.","cause":"The pyproject.toml does not have a [dependencies] table.","error":"KeyError: 'dependencies'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}