DEV Community

Cover image for Meet uv: The Lightning-Fast Python Toolchain That JS Devs Will Love 🚀
AILI Fida Aliotti Christino
AILI Fida Aliotti Christino

Posted on

Meet uv: The Lightning-Fast Python Toolchain That JS Devs Will Love 🚀

If you’re a JavaScript or TypeScript developer venturing into Python, you might find the ecosystem’s tooling a bit… fragmented. My old workflow looked like this:

  • Download PyCharm Community Edition (free, but not my favorite)
  • Let PyCharm set up the virtual environment and manage Python versions
  • Track dependencies with a requirements.txt file (pip freeze > requirements.txt)
  • Bounce between Cursor (my VSCode alternative) and PyCharm, which was never ideal 😅

Honestly, it worked, but it felt clunky, especially compared to the unified tooling I enjoyed in JS/TS land.

Then, I discovered uv. And wow, it’s a game-changer! 🚀

"uv: A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more"

In my head, it was like : "Say no more!"

UV is awesooome!

uv is an all-in-one Python toolchain, written in Rust for blazing fast performance-often 10–100x faster than pip. It combines the best features of all the major Python tools into a single, consistent CLI.

But here’s what makes it stand out:

  • Lightning Fast: Install, sync, and manage dependencies at record speed ⚡️.
  • All-in-One: Handles package installs, virtual environments, Python version management, project scaffolding, dependency locking, and even publishing-no more juggling multiple tools.
  • Universal Lockfile: Uses a single lockfile (uv.lock) for reliable, reproducible builds across platforms.
  • Global Cache: Saves disk space by deduplicating dependencies across projects.
  • Seamless Tooling: Run CLI tools (like linters or formatters) directly, à la pipx, but faster.
  • Cross-platform: Works on macOS, Linux, and Windows.
  • Easy Install: No Rust or Python required-just a single shell command

Usage

Let's look at some usage on how you can use it and make it feel a lot more like modern JS/TS tooling:

1. You need to install uv (no Rust or Python needed):

curl -LsSf https://astral.sh/uv/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

Or use the old good pip

pip install uv
Enter fullscreen mode Exit fullscreen mode

2. Create a new project:

uv init myproject
cd myproject
Enter fullscreen mode Exit fullscreen mode

Seems familiar? Yeah it does!

3. Add dependencies:

uv add fast api
uv add httpx
Enter fullscreen mode Exit fullscreen mode

Just like you would do with pnpm or bun 😇

4. Sync your environment (installs everything in your lockfile):

uv sync
Enter fullscreen mode Exit fullscreen mode

No more fiddling with pyenv or system installs 😝 - uv handles it all 😎

5. Manage Python versions:

uv python install 3.12
uv python pin 3.12
Enter fullscreen mode Exit fullscreen mode

Remember the day you've installed nvm for node and npm?

6. Run scripts or tools:

uv run python main.py
uv run ruff format
uv run pyright
Enter fullscreen mode Exit fullscreen mode

You can even run tools in ephemeral environments, just like pipx:

uvx pycowsay 'hello world!'

Enter fullscreen mode Exit fullscreen mode

7. Build and publish:

uv build
uv publish
Enter fullscreen mode Exit fullscreen mode

Build, publish and BOOM, just that easy!

8. See your dependency tree:

uv tree
Enter fullscreen mode Exit fullscreen mode

Ok, that one is just cool 😆

Of course, there is so much more to cover! But i suggest you give it a try and read the DOCUMENTATION (i see you asking ChatGPT or Deepseek 👀, NO! JUST READ THE DOCS!!!)

You'll just love it (Especially If You’re from JS/TS)

  • Unified workflow: Like npm or pnpm, uv gives you a single tool for everything-no more context switching between pip, venv, pipx, poetry, etc.

  • Speed: Written in Rust, uv is fast. Dependency resolution and installs are noticeably quicker, even on big projects and save times.

  • Modern project management: Uses pyproject.toml and lockfiles for reproducibility, just like package-lock.json or pnpm-lock.yaml.

  • Efficient CI/CD: uv integrates smoothly with GitHub Actions and other CI tools, making automation a breeze.

  • Low friction: If you’re used to VSCode or Cursor, you can stick with your favorite editor-uv works from the terminal, no IDE lock-in.

Wrapping up!

If you’re tired of Python’s fragmented tooling, give uv a try. It’s fast, modern, and unifies everything you need for Python development-so you can focus on building, not babysitting your environment. 🐍✨

Ready to level up your Python workflow? uv has you covered!
That's all folks!

Top comments (0)