📏 Rules

Package Management with `uv`

# Package Management with `uv` These rules define strict guidelines for managing Python dependencies in this project using the `uv` dependency manager. **✅ Use `uv` exclusively** - All Python dep

❤️ 0
⬇️ 0
👁 2
Share

Description

Package Management with uv

These rules define strict guidelines for managing Python dependencies in this project using the uv dependency manager.

✅ Use uv exclusively

  • All Python dependencies must be installed, synchronized, and locked using uv.
  • Never use pip, pip-tools, or poetry directly for dependency management.

🔁 Managing Dependencies

Always use these commands:

# Add or upgrade dependencies
uv add <package>

# Remove dependencies
uv remove <package>

# Reinstall all dependencies from lock file
uv sync

🔁 Scripts

# Run script with proper dependencies
uv run script.py

You can edit inline-metadata manually:

# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "torch",
#     "torchvision",
#     "opencv-python",
#     "numpy",
#     "matplotlib",
#     "Pillow",
#     "timm",
# ]
# ///

print("some python code")

Or using uv cli:

# Add or upgrade script dependencies
uv add package-name --script script.py

# Remove script dependencies
uv remove package-name --script script.py

# Reinstall all script dependencies from lock file
uv sync --script script.py

Reviews (0)

Sign in to write a review.

No reviews yet. Be the first to review!

Comments (0)

Sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Compatible Platforms

Pricing

Free

Related Configs