Skip to content

Migrate documentation and base template to uv + pyproject.toml #6269

@masenf

Description

@masenf

Summary

All documentation examples and the base project template should use uv as the recommended Python package manager, replacing pip + requirements.txt with uv + pyproject.toml. This gives users strong dependency locking by default via uv.lock.

Motivation

  • uv provides fast, reliable dependency resolution with a proper lock file (uv.lock) out of the box — no extra steps needed.
  • requirements.txt does not support locking transitive dependencies without additional tooling (pip freeze, pip-tools, etc.), which most users skip.
  • Aligning on uv improves supply chain security posture for the Python side of Reflex apps, complementing efforts to lock JS dependencies as well.
  • uv is rapidly becoming the standard in the Python ecosystem and is what many users already expect.

Proposed Changes

  1. Base template: Update reflex init templates to generate a pyproject.toml instead of (or in addition to) requirements.txt. Include reflex as a dependency with a version constraint.
  2. Documentation: Update all installation and quickstart guides to use uv commands (e.g. uv init, uv add reflex, uv run reflex init) instead of pip install.
  3. README / Getting Started: Reflect the uv-first approach in the repo README and any onboarding materials.
  4. Backward compatibility: Continue to support pip and requirements.txt for users who prefer it, but make uv the recommended default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAnything you want improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions