Skip to content

Detect dependencies in your uv projects and automatically update them

Notifications You must be signed in to change notification settings

shaneikennedy/uv-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uv-detect

Detect external package dependencies in your code and add the missing ones to pyproject.toml

A rust port of the excellent package pipreqs, but for uv

Usage

uv-detect in the root of a uv-managed project

Demo

uv-detect git:main
❯ pwd
/Users/shane.kennedy/dev/shane/uv-detect

uv-detect git:main
❯ cargo build
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s

uv-detect git:main
❯ cd example_app

uv-detect/example_app git:main
❯ cat pyproject.toml
[project]
name = "example"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = []

uv-detect/example_app git:main
❯ ../target/debug/uv-detect
INFO  [uv_detect::writer] Adding: Django~=5.1.6
INFO  [uv_detect::writer] Adding: djangorestframework~=3.15.2
INFO  [uv_detect::writer] Writting dependencies to pyproject.toml
INFO  [uv_detect::writer] Updated pyproject.toml
INFO  [uv_detect::writer] Syncing uv
INFO  [uv_detect::writer] Writting uv lock

uv-detect/example_app git:main
❯ cat pyproject.toml
[project]
name = "example"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    "Django~=5.1.6",
    "djangorestframework~=3.15.2"
]

ToDos

  • Make it configurable via cli flags
  • Resolve against package registries for proper version speccing
  • Don't overwrite current contents
  • Real logging
  • Do better than panicing everywhere

About

Detect dependencies in your uv projects and automatically update them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published