> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Python developers should switch to uv

> Learn how uv, the revolutionary Python package manager, delivers 100x faster installations and streamlines project management with automatic virtual environments and dependency tracking.

export const PostMeta = ({data = {}}) => {
  const {author, date, image} = data;
  const authors = Array.isArray(author) ? author : author ? [author] : [];
  const resolveAuthor = slug => {
    const entry = AUTHOR_MAP[slug] || ({});
    const name = entry.name || slug;
    const github = entry.github || null;
    const linkedin = entry.linkedin || null;
    const url = github ? `https://github.com/${github}` : linkedin || null;
    const avatarUrl = github ? `https://github.com/${github}.png?size=64` : null;
    return {
      name,
      url,
      avatarUrl
    };
  };
  const formattedDate = date ? new Date(date).toLocaleDateString('en-US', {
    year: 'numeric',
    month: 'long',
    day: 'numeric'
  }) : null;
  if (!image && authors.length === 0 && !formattedDate) return null;
  const AUTHOR_MAP = {
    "aaron-collier": {
      "name": "Aaron Collier"
    },
    "aaron-dudenhofer": {
      "name": "Aaron Dudenhofer"
    },
    "aaron-porter": {
      "name": "Aaron Porter"
    },
    "adriaan-odendaal": {
      "name": "Adriaan Odendaal"
    },
    "ajmal": {
      "name": "Ajmal Siddiqui"
    },
    "akalipetis": {
      "name": "Antonis Kalipetis"
    },
    "alexander-varwijk": {
      "name": "Alexander Varwijk"
    },
    "alicia-bevilacqua": {
      "name": "Alicia Bevilacqua"
    },
    "amelie-deguerry": {
      "name": "Amelie Deguerry"
    },
    "anacidre": {
      "name": "Ana Cidre",
      "linkedin": "https://www.linkedin.com/in/ana-cidre"
    },
    "andoni": {
      "name": "Andoni Auzmendi"
    },
    "andrei-taranu": {
      "name": "Andrei (Alex) Taranu",
      "linkedin": "https://www.linkedin.com/in/andrei-alex-taranu/"
    },
    "andrew-baxter": {
      "name": "Andrew Baxter"
    },
    "andrew-melck": {
      "name": "Andrew Melck"
    },
    "antoine-crochet-damais": {
      "name": "Antoine Crochet Damais"
    },
    "augustin-delaporte": {
      "name": "Augustin Delaporte",
      "linkedin": "https://www.linkedin.com/in/augustindelaporte/"
    },
    "branislav-bujisic": {
      "name": "Branislav Bujisic"
    },
    "carl-smith": {
      "name": "Carl Smith"
    },
    "caroline-leroy": {
      "name": "Caroline Leroy"
    },
    "cati-mayer": {
      "name": "Cati Mayer"
    },
    "catplat": {
      "name": "C Trinkwon"
    },
    "ceelolulu": {
      "name": "Celeste van der Watt"
    },
    "chadwcarlson": {
      "name": "Chad Carlson",
      "github": "chadwcarlson",
      "linkedin": "https://www.linkedin.com/in/chadwcarlson"
    },
    "chris-ward": {
      "name": "Chris Ward"
    },
    "chris-yates": {
      "name": "Chris Yates"
    },
    "christian-sieber": {
      "name": "Christian Sieber"
    },
    "christopher-lockheardt": {
      "name": "Christopher Lockheardt"
    },
    "christopher-skene": {
      "name": "Christopher Skene"
    },
    "chuck-morgan": {
      "name": "Chuck Morgan"
    },
    "corey-dockendorf": {
      "name": "Corey Dockendorf"
    },
    "crell": {
      "name": "Crell"
    },
    "damz": {
      "name": "Damz"
    },
    "dan-morrison": {
      "name": "Dan Morrison"
    },
    "davidbonachera": {
      "name": "David Bonachera",
      "github": "davidbonachera",
      "linkedin": "https://www.linkedin.com/in/davidbonachera"
    },
    "dereliahmet1": {
      "name": "Ahmet Faruk Dereli"
    },
    "devicezero": {
      "name": "Jonas Kröger",
      "github": "devicezero",
      "linkedin": "https://www.linkedin.com/in/jonaskroeger/"
    },
    "doug-goldberg": {
      "name": "Doug Goldberg"
    },
    "duncan-naves": {
      "name": "Duncan Naves",
      "github": "duncannaves",
      "linkedin": "https://www.linkedin.com/in/duncan-naves-a94423aa"
    },
    "erika-bustamante": {
      "name": "Erika Bustamante"
    },
    "fabpot": {
      "name": "Fabien Potencier"
    },
    "flovntp": {
      "name": "Florent Huck",
      "github": "flovntp",
      "linkedin": "https://www.linkedin.com/in/florenthuck"
    },
    "fred-plais": {
      "name": "Fred Plais"
    },
    "gauthier-garnier": {
      "name": "Gauthier Garnier"
    },
    "gilzow": {
      "name": "Paul Gilzow"
    },
    "gmoigneu": {
      "name": "Guillaume Moigneu",
      "github": "gmoigneu",
      "linkedin": "https://www.linkedin.com/in/guillaumemoigneu/"
    },
    "gregqualls": {
      "name": "Greg Qualls"
    },
    "guguss": {
      "name": "Augustin Delaporte"
    },
    "haylee-millar": {
      "name": "Haylee Millar"
    },
    "ivana-kotur": {
      "name": "Ivana Kotur"
    },
    "jackrabbithanna": {
      "name": "Mark Hanna"
    },
    "jared-wright": {
      "name": "Jared Wright",
      "github": "jww-sh",
      "linkedin": "https://www.linkedin.com/in/jaredwaynewright"
    },
    "jessica-orozco": {
      "name": "Jessica Orozco"
    },
    "joey-stanford": {
      "name": "Joey Stanford"
    },
    "john-grubb": {
      "name": "John Grubb"
    },
    "jonas-kruger": {
      "name": "Jonas Kruger"
    },
    "kathryn-frazer": {
      "name": "Kathryn Frazer"
    },
    "kemiojo": {
      "name": "Kemi Elizabeth Ojogbede"
    },
    "kieronsambrook-smith": {
      "name": "Kieronsambrook Smith"
    },
    "laurent-arnoud": {
      "name": "Laurent Arnoud",
      "linkedin": "https://www.linkedin.com/in/laurent-arnoud-861b44121/"
    },
    "letoya-boyne": {
      "name": "Letoya Boyne"
    },
    "lolautruche": {
      "name": "Jérôme Vieilledent"
    },
    "lyly-lepinay": {
      "name": "Lyly Lepinay"
    },
    "manauwar-alam": {
      "name": "Manauwar Alam"
    },
    "marc-antoine-porri": {
      "name": "Marc Antoine Porri"
    },
    "maria-antinkaapo": {
      "name": "Maria Antinkaapo"
    },
    "maria-de-anton": {
      "name": "Maria De Anton"
    },
    "mark-dorison": {
      "name": "Mark Dorison"
    },
    "markus-hausammann": {
      "name": "Markus Hausammann"
    },
    "mary-thomas": {
      "name": "Mary Thomas"
    },
    "mathias-bolt-lesniak": {
      "name": "Mathias Bolt Lesniak"
    },
    "mathieu-strauch": {
      "name": "Mathieu Strauch"
    },
    "matthias-van-woensel": {
      "name": "Matthias Van Woensel",
      "linkedin": "https://www.linkedin.com/in/matthias-van-woensel-267a069"
    },
    "michael-sharp": {
      "name": "Michael Sharp"
    },
    "mupsi": {
      "name": "Marine Gandy"
    },
    "natalie-harper": {
      "name": "Natalie Harper"
    },
    "ngommenginger": {
      "name": "Nicolas Gommenginger",
      "linkedin": "https://www.linkedin.com/in/nicolas-gommenginger"
    },
    "nicholas-bennison": {
      "name": "Nicholas Bennison"
    },
    "nicholas-vahalik": {
      "name": "Nicholas Vahalik"
    },
    "nick-hardiman": {
      "name": "Nick Hardiman"
    },
    "nickanderegg": {
      "name": "Nickanderegg"
    },
    "nicolas-grekas": {
      "name": "Nicolas Grekas",
      "github": "nicolas-grekas",
      "linkedin": "https://www.linkedin.com/in/nicolasgrekas/"
    },
    "niti-malwade": {
      "name": "Niti Malwade"
    },
    "opensocialteam": {
      "name": "Opensocialteam"
    },
    "ori-pekelman": {
      "name": "Ori Pekelman"
    },
    "otavio-santana": {
      "name": "Otavio Santana"
    },
    "palwandi": {
      "name": "Pawan Alwandi",
      "github": "pawpy",
      "linkedin": "https://www.linkedin.com/in/pawanalwandi"
    },
    "patrick-boest": {
      "name": "Patrick Boest"
    },
    "patrick-dawkins": {
      "name": "Patrick Dawkins",
      "github": "pjcdawkins",
      "linkedin": "https://www.linkedin.com/in/patrickdawkins"
    },
    "patrick-klima": {
      "name": "Patrick Klima"
    },
    "pjcdawkins": {
      "name": "Pjcdawkins"
    },
    "prineet-kaurbhurji": {
      "name": "Prineet Kaurbhurji"
    },
    "quentin-sinig": {
      "name": "Quentin Sinig"
    },
    "ralt": {
      "name": "Florian Margaine",
      "github": "ralt",
      "linkedin": "https://www.linkedin.com/in/florian-margaine-43971136"
    },
    "ramanathanramakrishnamurthy": {
      "name": "Ramanathanramakrishnamurthy"
    },
    "remi-lejeune": {
      "name": "Rémi Lejeune"
    },
    "ribel": {
      "name": "Taras Kruts"
    },
    "robert-douglass": {
      "name": "Robert Douglass"
    },
    "rudy-weber": {
      "name": "Rudy Weber"
    },
    "ryan-hicks": {
      "name": "Ryan Hicks"
    },
    "sabri-helal": {
      "name": "Sabri Helal"
    },
    "savannah-bergeron": {
      "name": "Savannah Bergeron"
    },
    "shannon-vettes": {
      "name": "Shannon Vettes"
    },
    "shawn-ogasawara": {
      "name": "Shawn Ogasawara",
      "linkedin": "https://www.linkedin.com/in/shawn-ogasawara-83a9a0/"
    },
    "shawna-spoor": {
      "name": "Shawna Spoor"
    },
    "shedrack-akintayo": {
      "name": "Shedrack Akintayo"
    },
    "simon-ruggier": {
      "name": "Simon Ruggier"
    },
    "sophie-van-der-kindere": {
      "name": "Sophie Van Der Kindere"
    },
    "stefanos-thampis": {
      "name": "Stefanos Thampis"
    },
    "stephen-weinberg": {
      "name": "Stephen Weinberg"
    },
    "sukhman-virk": {
      "name": "Sukhman Virk"
    },
    "sumaira-nazir": {
      "name": "Sumaira Nazir"
    },
    "sumer": {
      "name": "Sümer Cip"
    },
    "syed-raza": {
      "name": "Syed Raza"
    },
    "tamara-bacchia": {
      "name": "Tamara Bacchia"
    },
    "tara-arnold": {
      "name": "Tara Arnold"
    },
    "theosakamg": {
      "name": "Mickael Gaillard",
      "github": "theosakamg"
    },
    "thomasdiluccio": {
      "name": "Thomas di Luccio"
    },
    "tim-anderson": {
      "name": "Tim Anderson"
    },
    "tom-helmer-hansen": {
      "name": "Tom Helmer Hansen"
    },
    "tylermills": {
      "name": "Tyler Mills"
    },
    "upsun": {
      "name": "Upsun"
    },
    "veronika-tolkachova": {
      "name": "Veronika Tolkachova",
      "linkedin": "https://www.linkedin.com/in/veronika-tolkachova-169167a2"
    },
    "vince-parker": {
      "name": "Vince Parker"
    },
    "vinnie-russo": {
      "name": "Vincenzo Russo"
    },
    "vrobert78": {
      "name": "Vincent Robert",
      "github": "vrobert78",
      "linkedin": "https://www.linkedin.com/in/vincent-robert-498a883"
    },
    "yuriy-babenko": {
      "name": "Yuriy Babenko"
    },
    "yuriy-gerasimov": {
      "name": "Yuriy Gerasimov"
    }
  };
  return <div className="post-meta">
      {(authors.length > 0 || formattedDate) && <div className="post-meta-info">
          {authors.length > 0 && <div className="post-meta-authors">
              {authors.map(slug => {
    const {name, url, avatarUrl} = resolveAuthor(slug);
    const inner = <>
                    {avatarUrl && <img src={avatarUrl} alt={name} className="post-meta-avatar" />}
                    <span className="post-meta-author-name">{name}</span>
                  </>;
    return url ? <a key={slug} href={url} target="_blank" rel="noopener noreferrer" className="post-meta-author">
                    {inner}
                  </a> : <span key={slug} className="post-meta-author">{inner}</span>;
  })}
            </div>}
          {authors.length > 0 && formattedDate && <span className="post-meta-separator" aria-hidden="true">·</span>}
          {formattedDate && <span className="post-meta-date">{formattedDate}</span>}
        </div>}
      {image && <img src={image} alt="" className="post-meta-image" aria-hidden="true" />}
    </div>;
};

<PostMeta data={{ author: ["gmoigneu"], date: "2025-08-07T00:00:00+00:00", image: "/images/posts/insights/why-python-developers-should-switch-to-uv/why-python-developers-should-switch-to-uv.webp" }} />

## Introduction

Python development has long been plagued by slow package installations and complex dependency management. Enter [uv](https://github.com/astral-sh/uv), a new package manager developed by [Astral](https://astral.sh/) (creators of [Ruff](https://astral.sh/ruff)) that's transforming how Python developers handle projects.

## What is uv?

uv is a super-fast Python package manager and project management tool that serves as a drop-in replacement for pip, but with dramatically enhanced capabilities.

At its core, uv addresses the fundamental pain points that have frustrated Python developers for years: slow installations, manual virtual environment management, and complex project setup processes.

## Key benefits of uv

### Speed and performance

The most striking feature of uv is its incredible speed. Where pip installations can take minutes, uv completes the same tasks in seconds:

* **Up to 100x faster** package installations compared to pip
* Near-instantaneous dependency resolution
* Dramatically reduced wait times for project setup

This speed improvement isn't marginal. Tasks that previously interrupted your development flow now happen so quickly they become seamless.

### Comprehensive project management

uv goes far beyond simple package installation. It provides a complete project management solution:

* **Automatic project initialization** with proper boilerplate structure
* **Built-in virtual environment management** with no manual activation required
* **Intelligent dependency tracking** that separates production and development packages
* **Python version management** without needing separate tools
* **Automatic `.gitignore` generation** with Python-specific excludes

### Simplified dependency management

uv also changes the way you handle dependencies:

* **Clean dependency lists**: Only direct dependencies appear in `pyproject.toml`
* **Easy package management**: Simple `uv add` and `uv remove` commands
* **Development dependencies**: Separate development packages with `--dev` flag
* **Automatic synchronization**: Team members can instantly replicate environments

## The new development workflow

uv transforms project setup from a multi-step manual process into a streamlined workflow:

### Traditional workflow pain points

```bash {filename="Terminal"} theme={null}
# The old way - multiple steps, slow process
mkdir new-project && cd new-project
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install package1 package2 package3
# Wait... and wait... for slow installations
pip freeze > requirements.txt
```

### The uv way

```bash {filename="Terminal"} theme={null}
# Initialize project with everything configured
uv init "new-ai-project"

cd "new-ai-project"

# Add dependencies instantly
uv add openai pydantic fastapi

# Add development tools separately
uv add ipykernel pytest --dev

# Run your code
uv run hello.py
```

This workflow reduces project setup time from minutes to approximately **15 seconds**.

## Essential uv commands

### Project initialization

```bash {filename="Terminal"} theme={null}
# Create new project with boilerplate
uv init "project-name"
```

This command automatically creates:

* Project directory structure
* `.gitignore` file with Python excludes
* `pyproject.toml` configuration
* Sample `hello.py` file
* README template
* Virtual environment

### Dependency management

```bash {filename="Terminal"} theme={null}
# Add production dependencies
uv add requests pandas numpy

# Add development dependencies  
uv add pytest black flake8 --dev

# Remove packages
uv remove pandas

# Sync environment from pyproject.toml
uv sync
```

### Running code

```bash {filename="Terminal"} theme={null}
# Execute Python files directly
uv run script.py

# Run with environment automatically activated
uv run python -m pytest
```

## Comparison with traditional tools

### uv vs pip

| Feature                   | pip                      | uv                   |
| ------------------------- | ------------------------ | -------------------- |
| **Installation Speed**    | Slow (minutes)           | Ultra-fast (seconds) |
| **Dependency Resolution** | Basic                    | Advanced             |
| **Virtual Environments**  | Manual management        | Automatic            |
| **Project Structure**     | Manual setup             | Auto-generated       |
| **Clean Dependencies**    | Bloated requirements.txt | Clean pyproject.toml |

### uv vs Poetry

While Poetry provides excellent dependency management, uv combines Poetry's capabilities with superior speed and simpler workflows. uv's faster installation and automatic environment handling make it more suitable for rapid development cycles.

### uv vs Pipenv

uv surpasses Pipenv in both speed and reliability. Where Pipenv sometimes struggles with dependency resolution, uv handles complex dependencies effortlessly while maintaining its performance advantage.

## Getting started with uv

### Installation

Choose your preferred installation method:

**macOS (recommended):**

```bash {filename="Terminal"} theme={null}
brew install uv
```

**macOS/Linux (curl):**

```bash {filename="Terminal"} theme={null}
curl -LsSf https://astral.sh/uv/install.sh | sh
```

**Windows:**
Follow the official installation guide at [docs.astral.sh/uv](https://docs.astral.sh/uv)

Verify installation:

```bash {filename="Terminal"} theme={null}
uv --help
```

### Migrating existing projects

uv maintains backward compatibility with existing Python projects:

**From requirements.txt:**

```bash {filename="Terminal"} theme={null}
uv pip install -r requirements.txt
```

**Convert to uv project:**

```bash {filename="Terminal"} theme={null}
uv init --existing-project
uv add $(cat requirements.txt | grep -v '^#' | tr '\n' ' ')
```

## Advanced features

### Python version management

uv can manage Python installations directly:

```bash {filename="Terminal"} theme={null}
# List available Python versions
uv python list

# Install specific Python version
uv python install 3.12

# Use specific version for project
uv init --python 3.12 my-project
```

### Team collaboration

uv makes team collaboration seamless:

1. **Share project**: Simply commit `pyproject.toml` to version control
2. **Setup for teammates**: `uv sync` creates identical environments instantly
3. **No configuration drift**: Locked dependencies ensure consistency

## Integration with development tools

uv works seamlessly with modern development environments:

* **IDEs**: VS Code, PyCharm, Cursor automatically detect uv environments
* **CI/CD**: Simple integration with GitHub Actions, GitLab CI
* **Docker**: Excellent containerization support
* **Version Control**: Clean `pyproject.toml` files work perfectly with Git

## Deploying Python applications with uv on Upsun

uv's speed advantages make it perfect for cloud deployments. Here's how to deploy Python applications using uv on Upsun's platform:

### Project structure

Your uv-based project should have this structure:

```bash {filename="Terminal"} theme={null}
my-python-app/
├── .upsun/
│   └── config.yaml
├── pyproject.toml  # Created by uv
├── main.py
└── src/
```

### Essential Upsun configuration

Create `.upsun/config.yaml` with uv-optimized settings:

```yaml {filename=".upsun/config.yaml"} theme={null}
applications:
  app:
    source:
      root: "/"
    
    type: "python:3.12"
    
    # Use uv for dependency management
    dependencies:
      python3:
        uv: "*"
    
    # uv build process
    hooks:
      build: |
        # Use uv for fast dependency installation
        uv sync --frozen
        
        # Optional: compile Python files for better performance
        # python -m compileall .
    
    # Web server configuration
    web:
      commands:
        # We add --no-sync to prevent uv from trying to write the uv.lock at runtime 
        start: "uv run --no-sync uvicorn app:app --reload --host 0.0.0.0 --port $PORT"
    
    # uv cache optimization
    variables:
      env:
        uv_CACHE_DIR: "/tmp/uv-cache"
        PYTHONPATH: "."

routes:
  "https://{default}/":
    type: upstream
    upstream: "app:http"
```

### Key configuration benefits

**Fast builds**: uv's speed dramatically reduces deployment time compared to pip-based builds.

**Dependency optimization**: The `uv sync --frozen` command ensures reproducible builds with locked dependencies.

**Cache efficiency**: uv's intelligent caching works perfectly with Upsun's build process.

### Deployment workflow

1. **Initialize your project locally:**

```bash {filename="Terminal"} theme={null}
uv init my-app
cd my-app
uv add fastapi gunicorn
```

2. **Create your application:**

```bash {filename="app.py"} theme={null}
# main.py
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"message": "Hello from uv on Upsun!"}
```

3. **Deploy to Upsun:**

```bash {filename="Terminal"} theme={null}
git add .
git commit -m "Setup FastAPI with uv"
upsun push
```

The uv-powered build process will install dependencies in seconds rather than minutes, making your deployment pipeline significantly faster.

<Note>**Compatibility**: Most Python packages work seamlessly with uv, but complex enterprise environments may require testing. </Note>

## Conclusion

uv transforms Python development from a series of manual, time-consuming tasks into a streamlined, efficient workflow. The dramatic speed improvements alone justify adoption, but uv's comprehensive project management capabilities make it essential for modern Python development.

The question isn't whether you should try uv, it's how quickly you can integrate it into your development workflow. With its backward compatibility, minimal learning curve, and transformative performance benefits, uv represents the future of Python package management.

**Ready to transform your Python workflow?** [Deploy your Python uv app on Upsun now](https://console.upsun.com/) and experience lightning-fast builds with uv's package management.
