Getting to know UV

Barbara Streisand
Release: 2024-09-23 10:21:32
Original
363 people have browsed it

Conociendo uv

uv is the new project manager written in Rust for python. Why a new alternative, when there are so many available? A long time ago I started using pipenv, which eventually became useless. Then I migrated to poetry, which my current company also uses. It's an improvement, but it doesn't convince me.

And there is no definitive solution in python to what uv wants to achieve. A charge for python.

poetry is not a replacement for pypenv. Therefore, we must continue using other tools. Also, it is not transparent.

I have started experimenting with uv and I can say that it can now replace, at least, pyenv. Maybe you could use it instead of poetry; However, in my current company we use poetry and I don't think we are ready for a migration.

Why do I think it's an improvement? With uv I can run uv run mi-script.py and it automatically uses a virtual environment. Not only that, I can install packages for the file that are managed within comments. For example: uv run --with rich example.py. Dependencies and the virtual environment are managed transparently.

It goes without saying that it is extremely fast. Way above the options. Not for nothing is it made in Rust, which, in turn, offers another advantage: we do not depend on a previous installation of python, which can be problematic. uv is a binary that installs and works without problems.

I'll start using it to manage projects whenever I can and as a replacement for pip so I hope to continue writing about it.

Disadvantages? I have seen comments that speak of distrust towards astral, the company behind uv and how they will be financed. Likewise, they don't really like that it is built in rust and not in python, which can be a difficulty. I, for my part, think that they are not sufficient reasons. On the one hand, the community has been unable to deliver a completely satisfactory solution. On the other hand, it is free software, and, in case of any unwanted movement on the part of astral, a fork can be created, even if the maintenance cost, in principle, is higher because it is another language.

The above is the detailed content of Getting to know UV. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!