Settings

Theme

Show HN: Uv Crash Course

lernerpython.com

2 points by reuven 2 months ago · 1 comment · 1 min read

Reader

This is a a free, 12-part practical introduction to uv for people who already know Python and want to (a) know what the fuss is about and (b) how to incorporate uv into their daily routines.

zahlman 2 months ago

> It’s easy to say, “I’ll just use uv instead of pip.” But if you do that, you aren’t really taking advantage of all it has to offer.

If you're an end user just trying to install someone else's program to use it, you're probably pretty close.

> That’s why I’ve prepared this 12-part uv crash course. Sign up, and every day (for 12 days) you’ll get a new message from me describing how to use uv. Topics I address include:

Or I could find a blog post somewhere that probably covers all of that and more. Or go reading through the documentation.

> How to create a new project with uv… and how to convert an existing project to use it

No conversion is necessary as far as I can think, although you might want to let uv re-create a virtual environment or something. Creating a new project is spelled `uv init` and I can find that out (and the full command documentation) by putting `uv new project` into a search engine and checking (in my case) the top result.

> The “src” layout style, and why it’s a good idea

This has nothing to do with the choice of uv over pip, and is covered (along with much more) on https://packaging.python.org/en/latest/ . You can also find discussion in the Setuptools documentation, or the documentation for whatever other build system you choose. This question is only relevant if you're developing a project, and dealing with the consequences depends on your choice of build system, which is independent of the choice of pip vs uv.

> Installing and using tools

https://docs.astral.sh/uv/#tools

> Handling dependencies

The important things to learn here are conceptual and again not related to the tool. They're also not really that interesting assuming you actually know what dependencies you need. I guess you're really trying to sell the `uv add` command, though.

> Publishing your projects to PyPI

Yes, uv provides `uv publish`. Those using pip are stuck with `twine upload`. It's barely any less ergonomic (you need to choose which files to upload, "usually everything in the dist/ folder", rather than uv making an assumption for you).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection