UV for Python… (Almost) All Batteries Included

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 258

  • @ArjanCodes
    @ArjanCodes  2 дні тому +2

    💡 Learn how to design great software in 7 steps: arjan.codes/designguide.

    • @greendsnow
      @greendsnow 2 дні тому

      please time tag your videos sir,

  • @charlesconway
    @charlesconway 5 днів тому +69

    About time someone created a single tool to manage Python versions and packages! Thank you for sharing!

    • @Mahj111
      @Mahj111 5 днів тому

      "Created" not created. It was all done before. You have to be very aware how this tool works as well as there might be some surprises in other venvs on your machine once you tried to mess with your dependencies in one of them for example.

    • @CristiNeagu
      @CristiNeagu 5 днів тому +5

      Conda has been a thing for ages.

    • @jjrrmm
      @jjrrmm 4 дні тому +2

      @@CristiNeagu And I have been using it. All my conda environments are now with uv. Actually I stopped using conda install a long time ago. Conda with pip. Now with just the "uv sync" for deployment in a pipeline, you beat conda by a huge margin

    • @CristiNeagu
      @CristiNeagu 4 дні тому

      @@jjrrmm My point was that a single tool to manage python versions and packages already existed.

    • @evankiefl
      @evankiefl 4 дні тому

      @@jjrrmm conda is not python specific, so they really occupy different spaces.

  • @albertolanaro2341
    @albertolanaro2341 5 днів тому +26

    Another great feature of UV is its support for UV scripts. The ability to run any Python script without needing to directly install dependencies is fantastic, especially when you want to share it with others.

    • @squishy-tomato
      @squishy-tomato 5 днів тому +8

      even python itself is installed if you don't have the right version. And it's fast af.

    • @maleldil1
      @maleldil1 3 дні тому

      It works, but I don't like it. Your text editor will complain that the dependencies aren't installed because they're only installed in a temporary environment, so you'll get linting/typing errors and won't have completion.

  • @manomancan
    @manomancan 5 днів тому +35

    holy crap, I just asked claude "what is uv and why is my company transitioning to it" hahaha. And an hour later, I see this! You're a legend, Arjan; thank you!

    • @ArjanCodes
      @ArjanCodes  5 днів тому +2

      You’re most welcome! 😊

    • @miguelg.sanchezweckx4523
      @miguelg.sanchezweckx4523 5 днів тому +1

      Literally I just had a meeting today talking about uv as well, great timing!

  • @_indrid_cold_
    @_indrid_cold_ 5 днів тому +9

    Oh wow! I've been waiting and hoping for a tool like this for ages! Looks great and will start using it straight away. Very cool!

  • @sonotley
    @sonotley 5 днів тому +12

    I switched to uv for my latest personal project and I love how fast it is. The biggest problem I found is that if you install software using uv tool instead of pipx for example, the pre-compiled binary distributions of Python that it uses don't play nicely with TK and to a lesser extent matplotlib. The fact that UV is now so popular probably means that lots of developers will have to tackle this problem even if they don't use UV themselves because their users will install things using UV and then think the original project is broken when it doesn't work.
    The TK issue can be worked around fairly straightforwardly by adding some extra code to your project. Trying to use TK and matplotlib at the same time has proved intractable for me so far.

  • @mykolamorozov2099
    @mykolamorozov2099 9 годин тому

    We've started integrating uv recently in our project. It is a game changer in python package managers world for sure.

  • @danielbartley516
    @danielbartley516 5 днів тому +9

    I like to imagine Astral is funded by Python developers who got rich but also so frustrated by the ecosystem and now angel-fund projects to improve to be proactive about it

  • @edsanville
    @edsanville 5 днів тому +13

    Thanks to this channel, I've really stepped up my python coding techniques the past few years, especially when it comes to dataclasses and type hints. Thanks!

    • @ArjanCodes
      @ArjanCodes  5 днів тому +3

      Glad you find the videos helpful!

  • @benlindsay8268
    @benlindsay8268 5 днів тому +6

    Thanks for the video! 2 little thoughts: 1) A good reason for doing the curl install is enabling the uv self update feature. Not sure if that's available with brew install. 2) I know it's not as flexible as npm scripts, but you can do stuff like
    [project.scripts]
    my-script = "my_project.scripts:some_function"
    and pass args via sys.argv etc like `uv run my-script arg1 arg2`

    • @apmcd47
      @apmcd47 4 дні тому

      Be aware that the installer needlessly (in my case) modified the .profile and .bash_profile files. Make copies beforehand and compare, especially if you maintain your own profile files.

    • @maleldil1
      @maleldil1 3 дні тому +2

      That's not what he meant by scripts. Actually, project.scripts is a misnomer. Those are the commands that the package export. What he meant was things to standardise commands, so `uv run pytest` could become uv test or something like that, or `uv lint` could be `uv run ruff check --fix && uv run ruff format && uv run pyright`

    • @apmcd47
      @apmcd47 День тому

      @@maleldil1 He mentioned the curl installer, which is what I was referring to. Or were you directly replying to the first message in this thread?

  • @j_atkinson
    @j_atkinson 2 дні тому

    This is fantastic1! Just the dependency management alone is worth its weight in gold!

  • @kipsta1993
    @kipsta1993 5 днів тому +153

    i just got comfortable with poetry

    • @0730pleomax
      @0730pleomax 5 днів тому +23

      Drop it now

    • @rain-er6537
      @rain-er6537 5 днів тому +7

      I never tried poetry because i hated the name

    • @VeejayRampay
      @VeejayRampay 5 днів тому +11

      uv is really superior

    • @dummymummy8347
      @dummymummy8347 5 днів тому +5

      UV doesn't sound as good as poetry either.
      Unlike Puffin.

    • @simonl8284
      @simonl8284 5 днів тому +5

      You’ll love uv then

  • @Bøølæn
    @Bøølæn 5 днів тому +3

    Thanks arjan! You've been very helpful to the community. I have small request though. please make a small course on how to create production ready application (you could share your workflow and tools you use😝).

  • @mikeplockhart
    @mikeplockhart 5 днів тому +8

    I’ve enjoyed using UV and think some of the real gains are in its use with container building. I’d be really keen if you were to do an updated docker build guide with UV.

    • @souvidejack
      @souvidejack 4 дні тому

      I wonder what would that be. Package installation is io-bound, so any amount of async is acceptible.

    • @KarlRichard2
      @KarlRichard2 4 дні тому +1

      Oh that would be wonderful

    • @maleldil1
      @maleldil1 3 дні тому +1

      The uv documentation has as dedicated section on Docker. Maybe that's helpful.

    • @maleldil1
      @maleldil1 3 дні тому

      @@souvidejack package installation isn't completely IO-bound. There is a lot of IO, and uv has some tricks to speed those up, but tools like Poetry spend a lot of time solving the dependency constraints to determine package versions, and that's CPU-bound. Doing it in Rust helps, but they're also really clever about some things. There's a video from Charlie Marsh from Astral discussing these points.

    • @souvidejack
      @souvidejack 2 дні тому

      @@maleldil1 And how much time exactly said dependency constraint solving in rust saves? Single digit percents, am i right?

  • @Incertophile
    @Incertophile 3 дні тому +1

    Been using it for the better part of this year for both professional and personal work. It's awesome! It also feels like it solves or simplifies a lot of the complaints devs who don't like Python complain about.

  • @Aristocle
    @Aristocle 4 дні тому +4

    6:50 you could use uv sync if you add manually a package in pyproject or you want to start with a pyproject.toml you use as a template(I use this method) in an empty directory. The advantage of this method is that you have a perfectly compiled pyproject with the settings of the individual tools such as ruff, etc.
    15:03 you could use "uv run pytest"

    • @cbunn81
      @cbunn81 4 дні тому

      "uv run pytest" only works because it's an existing tool. The scripts listed in package.json for node.js projects are user-defined. So I can have "npm/yarn/pnpm test" to run whichever test framework I like along with any command-line arguments I like. And these can be chained. For example, I have "yarn prepr" in most of my work projects to run linting, unit tests and type checking. It's immensely useful and something that a tool like uv should definitely add.

    • @maleldil1
      @maleldil1 3 дні тому

      You don't need uv sync. You can just run uv run and it will sync the environment before running the command.

  • @urknidoj422
    @urknidoj422 5 днів тому +6

    I'm just about to recommend uv to my colleagues at the next weekly meeting. 😊
    The installation process with uv is so fast that I can't even enjoy my usual coffee break while waiting for it to finish.😆

    • @kiraleskirales
      @kiraleskirales 4 дні тому

      Just out of interest, do you install packages every morning? Why?

    • @urknidoj422
      @urknidoj422 3 дні тому

      My job requires me to explore many open-source AIGC projects, and the installation of Torch is always extremely time-consuming, though not something I do every day.

  • @smibssmibs
    @smibssmibs 5 днів тому +5

    I would appreciate more advice about using workspace. We are usually not used to using monorepo approach but there seem to be some benefit - like bundling multiple packages needed for one application. But one has to invent or discover proper "living style" with it.

  • @ChrisGVE
    @ChrisGVE 5 днів тому +1

    That's pretty cool-a bit like a cargo for Python. I like that. Thanks for sharing, Arjan!

  • @pcdoc8
    @pcdoc8 4 дні тому +2

    I’ve been using uv for a few months now. I like that it shortens and simplifies my workflow. I work with many different python projects every day and constantly have to pull down new ones. I like that I don’t have to remember to activate a venv when opening a terminal to a different project. I’ve now also baked it into my pipeline runs which has cut run time down, literally saving money. I am concerned about this company pulling something ugly someday but until then, drink up!

  • @dragonoha
    @dragonoha 5 днів тому +16

    I tried using it for a project from scratch instead of poetry. What I noticed is that UV CLI is not as user friendly as Poetry one (yet). I hope they do improve this with later releases

    • @squishy-tomato
      @squishy-tomato 5 днів тому +3

      I find it very straightforward. You do have to keep in mind that uv has extra running modes that poetry doesn't though: most notably standalone scripts, tools (uv tool, like pipx), uv pip, and python interpreter management (uv python).
      These modes are orthogonal to a project workflow, like the one you have with poetry commands.

    • @maleldil1
      @maleldil1 3 дні тому +1

      What don't you like about it? The only commands you'll use 90% of the type are uv add/remove (which do what's expected) and uv run (which is straightforward). uv sync and uv lock aren't used often because uv run already syncs the environment before running the command.

    • @dragonoha
      @dragonoha 2 дні тому

      @@maleldil1 For example, upgrading a package might be a little tricky. In Poetry it is simply `poetry update package_name`, in UV it is more or less `uv lock --upgrade-package package_name`. I have not looked into UV recently, maybe they have changed it

    • @squishy-tomato
      @squishy-tomato Годину тому

      @@dragonoha I find it more helpful to upgrade them all (uv sync --upgrade) and just pin the ones that shouldn't be upgraded, or put explicit version constraints as needed. Upgrading individual dependencies seems finicky.

  • @Diapolo10
    @Diapolo10 5 днів тому +9

    For now I'm not making the switch, because I quite like Poetry and have no issues with it. If anything I'd need to rework all my CI scripts and project templates to support it, and that's a lot of work with no massive benefit to me. I don't mind it being a little slower, nor do I care about managing Python versions with the same tool. For now.

    • @apmcd47
      @apmcd47 4 дні тому +1

      I like what I've seen enough to switch for new projects, but I wouldn't consider switching an existing project to uv.

    • @jesse9999999
      @jesse9999999 4 дні тому

      I will say, I moved my company's repo that's ~100k lines of python where I was previously using Conda to manage my environments to UV, and migrating it + rebuilding the CI (ie deleting most of the CI and replacing with one or two UV commands) only took about a day. Compared to other python configuration tools, it's a lot more streamlined of a setup and migrations involve deleting more code than you add.

  • @Igor_Grey
    @Igor_Grey День тому

    Already use uv) Thanks for video!

  • @borkempire
    @borkempire 5 днів тому +4

    Switching to UV has streamlined our Pulumi pipelines, making them nearly three times faster than before.

  • @AndyTutify
    @AndyTutify 5 днів тому +9

    I was wondering when you'd make a video about switching to uv! 😅

    • @ArjanCodes
      @ArjanCodes  5 днів тому +1

      It was about time :)

    • @AndyTutify
      @AndyTutify 5 днів тому

      @@ArjanCodes Great overview, as always! I've been using uv for a while but the "uv tree" command was new to me.

  • @LuckyDealTrade
    @LuckyDealTrade 2 дні тому

    Awesome! Used to pyenv. That looks way more handy! Thx for clarifying vid.

  • @freepythoncode
    @freepythoncode 5 днів тому +3

    Thanks for sharing this tool i will use it soon 🙂❤

  • @alexandarjelenic2880
    @alexandarjelenic2880 5 днів тому +1

    12:30 I am also interested in cleaning up all of my different python versions. I some venvs with versions going back to 3.7. What is a safe way to migrate older scripts to new python versions? Similarly, I may more .venv than i need. Any advice?

  • @jasonma3449
    @jasonma3449 4 дні тому +3

    using conda, we can do something like conda export to export all packages to a gz file so that when we move to a new computer without internet access, we can just unload those packages directly and start working in the exactly same envrionment right away. Is UV capable of doing that?

  • @minorandrianarivo661
    @minorandrianarivo661 4 дні тому

    Very nice video! I think what's missing is the group features (maybe it exists but not covered in your video ^^"). This is a great feature as you don't want to install the mypy package on production environment :)

  • @TheInterestingObject
    @TheInterestingObject 5 днів тому

    I've been enjoying a mixture of hatch and uv for my recent python projects.

  • @paw565
    @paw565 5 днів тому +5

    So with this I can get rid of both poetry and pyenv? Sounds great to me! Any gotchas I have to know before making the transition?

    • @southpole76
      @southpole76 5 днів тому +5

      iirc the gotcha is VC funding and VC aren't charity. at some point they're going to want their investment back

    • @southpole76
      @southpole76 5 днів тому +3

      ah, it's mentioned right at the start of the video. at least we can trust this channel ;-)

  • @myworldletsplay
    @myworldletsplay 5 днів тому

    nice ! thanks for the recomendation I will start to use it as well

  • @M3MYS3LF1979
    @M3MYS3LF1979 5 днів тому +7

    Never mention puffin rock again

    • @ArjanCodes
      @ArjanCodes  5 днів тому +2

      I puffin…. I mean promise!

    • @mattk6910
      @mattk6910 3 дні тому

      Keep mentioning Puffin Rock. It’s funny, and I don’t even know what it is 😂

  • @UTJK.
    @UTJK. 4 дні тому

    I think next time you should add some short lines to explain some concepts like workspaces, or tools to less professional users like me. That said, I really liked the video. You were extremely clear, contrary to the documentation I tried unsuccessfully to follow in the first place, prior to resorting to another tutorial when I first discovered UV some time ago.

  • @jheiss
    @jheiss 2 дні тому

    I switched to uv a few weeks ago and I'm happy with it. Definitely still learning all of the functionality, but it seems cleaner than the default Python tools like pip and virtualenv. Coming from Ruby where rake is widely used for task automation I also missed having a tool like that in Python. I've been using paver, which works OK but seems to be abandoned. E.g. in my project you can run "paver unit" and that invokes pytest. And "paver code" runs black, flake8, and mypy. I'm not sure that task automation functionality should be built in to uv, but I wouldn't mind if it was.

  • @MrAlFuture
    @MrAlFuture 5 днів тому +1

    Thanks, Arjan. This was a great overview of uv. The question I'm left with is: what does Arjan have against puffins?!?! 😂

  • @manualdidact
    @manualdidact 2 дні тому

    Having already invested a lot in working with Poetry and Pipx, I'm pretty happy with the workflow we have, but I'm going to keep an eye on uv. When they have their own backend, it will be a bit more interesting.

  • @BrianClancy
    @BrianClancy 4 дні тому

    I'm trying to read through the uv documentation right now and all I can hear is Puffin Rock!

  • @daveys
    @daveys 3 дні тому +1

    Is it FOSS and able to be used commercially for no charge?

  • @rikschaaf
    @rikschaaf 5 днів тому +1

    15:15 wouldn't that be possible if you were to use uvx though? As long as a tool for it exists.

    • @jjrrmm
      @jjrrmm 5 днів тому +2

      Correct.
      "uvx pytest" and the program or module you want to test.
      But you can add pytest to --dev and do a "uv run pytest". Depending what you want to do. I am an absolute novice regarding testing but I do the uvx way.

    • @eduferreyraok
      @eduferreyraok 5 днів тому +1

      What arjan meant was that you can setup scripts just like you would do at a package.json … so you can create alias to run custom scripts…

  • @Martin-lv1xw
    @Martin-lv1xw 4 дні тому

    So great stuff!

  • @zuowang5185
    @zuowang5185 5 днів тому +4

    Should you use uv base image in prod

    • @nathannowack6459
      @nathannowack6459 4 дні тому

      you can! you should read about python build standalone. depends what prod is

    • @nathannowack6459
      @nathannowack6459 4 дні тому

      i know many closed source projects that already do, open source is more tricky

  • @mydetlef
    @mydetlef 5 днів тому

    Coming from python -m venv venv I found uv add --dev ipykernel very good. It just separates development and production modules. The "Declaring script dependencies" feature is also very interesting.

  • @mmilerngruppe
    @mmilerngruppe 4 дні тому

    2:56 that was surprising. Arjan what kind of terminal is that?

  • @kaanakdeniz
    @kaanakdeniz 5 днів тому

    We are using uv for a while. We switched from poetry. I like the speed most and they are following pep standards for pyproject file. Scripts feature is a need as well. I am using poethepoet for it for now.

  • @ayoubthegreat
    @ayoubthegreat 3 дні тому

    This look very good!

  • @jwalsh2me
    @jwalsh2me 2 дні тому

    How is it for switching Py versions in vscode? I use Pyenv a lot for that today to have 2-3 diff versions installed.

  • @agamemnonc
    @agamemnonc 3 дні тому

    Does uv have a way of grouping dependencies in the pyproject toml file similarly to poetry? I find that rather useful, as you may wish to have many more dependencies when developing the codebase vs. when you deploy the code in production., Any ideas on that Arjan?

  • @Christopher-lb6rf
    @Christopher-lb6rf 5 днів тому +1

    I switched as well as it looks really cool but ran into issues with the tools features where some stuff just doesn’t work properly without forcing it to add the other commands in the package. It also had some compatibility issues so I stopped using it.

  • @dragonfly-7
    @dragonfly-7 5 днів тому

    14:40: For sure a 17+ min video will not be able to cover each and everything - but it generated a certain level of hunger on it (for it ?) on my end. Actually there was some noise on "uv" lately but your video triggered me to use it as well. Thanks a lot !!! 🙏🙏🙏
    15:00: Arjan, didn't you gave rust a try lately ? Sooo: Why don't you implement the "uv test" feature into "uv" to boost "uv" eveen more ? ... 😇

  • @ciscoh8402
    @ciscoh8402 5 днів тому

    Hi Arjan, thank you for this video on uv
    I will definitely test it. I did not really understand the usage of "tool", where it is installed, should it replace the "group dev" dependency we have in poetry, or is it just something we want to use locally? Creating dependency groups is very usefull ; from the comments, I guess it has been implemented. Managing Python versions is THE big plus IMO. About the speed I don't see why people care about. When you install deps, it means you don't expect your code to run immediately. Looks like a good start to become a standard. Or poetry strikes back with Python versions management :)

    • @talideon
      @talideon 5 днів тому +1

      "uv tool" (AKA uvx) replaces pipx. I find pipx's interface for injecting extra dependencies (such as plugins) more convenient than that of "uv tool", but only slightly so. They're super useful for things like Pelican.

  • @kamikaz1k
    @kamikaz1k 4 дні тому

    Puffin jingle is now going to live rent free in my head for the rest of my life

  • @johnidouglasmarangon
    @johnidouglasmarangon День тому

    I'm trying to use uv in my personal projects. I have a question?
    How can I add a private package using extra-index-url?

  • @Machiuka
    @Machiuka 5 днів тому

    Very useful, thank you!

  • @mattk6910
    @mattk6910 3 дні тому +1

    Great video. I never adopted poetry because it was really annoying and too different than PIP and pyenv-virtualenv. Wondering why UV defaults repos to master when the default in GitHub and other platforms is now main. This is annoying because now I have to manually rename repos created with UV so that my team and others can push/pull without having to think about branch names. Seriously, why are ENGs so annoying sometimes? Just follow precedent people. And choose your battles. I want to write code, not rename repos because some old head has a problem with no longer using language from early atomic clocks ffs

  • @soul67
    @soul67 5 днів тому

    Real Banger thx😊

  • @khaledsazzad
    @khaledsazzad 3 дні тому

    Would love to get the vscode theme or color schemes. It looks so clean but elegant. Thanks.

  • @BokoMoko65
    @BokoMoko65 2 дні тому

    Ideally, a custom Docker image with the bare minimal and uv + zsh preinstalled. A great fit with VScode and dev containers, don´t you think?

  • @thibdub2752
    @thibdub2752 4 дні тому

    Uv is great Arjan, have you also tested pixi as a replacement of conda ?

  • @JonitoFischer
    @JonitoFischer 4 дні тому

    How do you get all these package manager just use your system packages when available?

  • @jkrigelman
    @jkrigelman 5 днів тому

    So it is adding a layer to something like virtualenv or venv or conda?

  • @eugeneL_N1E104
    @eugeneL_N1E104 3 дні тому

    thinking how's crossplatform support, say, torch w/wo cuda is already very tricky on poetry. hope uv can resolve this.

  • @danielcoles1989
    @danielcoles1989 4 дні тому

    Do we need to activate the venv in terminal before adding and removing packages?

    • @Melindrea
      @Melindrea 4 дні тому

      No, if you use "uv add/remove " it will activate the venv as part of that call.

  • @OlliWilkman
    @OlliWilkman 3 дні тому

    I switched from Poetry to PDM a couple of years ago and right now I can't really see much reason to switch to UV. The two points I do see are a) it's much faster, b) that ability to install a specific Python version is neat, but there's other ways to do that too.
    When I first checked out UV I also couldn't figure out how to configure it with my particular usecase with multiple local PyPI indices, but looking at the docs now now I see how to do that, so I might give it a go anyway. It's almost a drop-in replacement for PDM anyway.

  • @CristiNeagu
    @CristiNeagu 5 днів тому

    I have two questions:
    1. How does this play along with VS Code? I use conda, and that is integrated quite well in Code. It knows to load the correct environment both in the terminals I open and in the debugger. Is this an option with uv?
    2. Does it manage the installation of complex packages that need things like compilation? It's been a while, but I seem to recall that Numba was a pain to get working unless you used conda.
    Also, come to think of it, as a result of those two questions: Does uv support conda-forge and conda packages?

    • @prashanthb6521
      @prashanthb6521 4 дні тому

      I want to know the same details, anybody knows ?

  • @pablogomis
    @pablogomis 5 днів тому

    I kind of miss an easy way of opening an interactive python shell within the setup env, do you know if this is a possibility?

    • @jjrrmm
      @jjrrmm 5 днів тому +3

      Do you mean: "uv run python"?

    • @ArjanCodes
      @ArjanCodes  5 днів тому

      That should do it.

    • @benlindsay8268
      @benlindsay8268 5 днів тому +1

      `uvx ipython` if you're fancy?

  • @eduardoprjadko2305
    @eduardoprjadko2305 5 днів тому

    Sounds an awesome tool.... I'm starting to build an app with some CI/CD functionalities to deploy it to AWS... I'll take a look in puffin (oops, I mean, UV) to see if that's useful to me...

  • @Justin-General
    @Justin-General 4 дні тому

    Compatible with docker containerization?

  • @aldrickdev
    @aldrickdev 5 днів тому

    How do you feel about the Hatch project?

  • @teluial
    @teluial 5 днів тому

    Interested in diving into Polylith for Python? There is a new uv mode for the tool

  • @murphygreen8484
    @murphygreen8484 5 днів тому

    Can you ask uv to create a test directory package for you?

    • @murphygreen8484
      @murphygreen8484 5 днів тому

      In the past I've had a devil of a time getting pytest to recognize files in the parent directory

  • @_DRMR_
    @_DRMR_ 4 дні тому

    I only _just_ migrated to poetry .. not a new tool to learn already -_-
    One thing that is still missing from uv is being able to create pyinstaller builds, which is quite nicely integrated in poetry.
    Better integration with test suites (like tox) would be really nice and something that poetry and other tools don't have.
    I'm never an early adopter of technology, so I will probably wait a while to see how the project develops and if we will see some of these improvements included.
    Until then I'm quite happy with poetry for now.

  • @terryjophlin
    @terryjophlin 5 днів тому +6

    Being VC backed means they will have to become profitable at some point.

    • @test-y1p7r
      @test-y1p7r 5 днів тому +2

      Exactly what I was thinking. It's not wise to use it in commercial production because we don't know what direction the company will go

    • @squishy-tomato
      @squishy-tomato 5 днів тому +2

      uv already has over 10% of pypi downloads. At this point I'm confident the community would take over in case something bad happens. It's not a project that is nearly impossible to maintain like a browser engine.

    • @mattk6910
      @mattk6910 3 дні тому

      Being VC backed means keep track of your versions very closely, don’t automatically pull updates, star their repos, and be prepared to switch to open source alternatives on a moment’s notice. Don’t depend too much on this tool. VC ecosystem is about making impossible ROI and otherwise milking every project for all its worth even if that includes burning down and liquidating everything. Is UV open source?

  • @jrduarte99
    @jrduarte99 3 дні тому

    What’s the best way to use UV with Jupyter notebooks?

  • @jjrrmm
    @jjrrmm 5 днів тому

    I do not think an own build backend should be a priority. Rather a "bundle" to substitute pyinstaller. They take the python installations from what indygreg did, and his pyoxidozer wax a nice thing. I hope they could finish it.

  • @akrishnadevotee
    @akrishnadevotee 3 дні тому

    I ran into a lot of issues with uv. Mostly surrounding VSCode detection of uv venv. Went back to using python for now.

    • @jjrrmm
      @jjrrmm 3 дні тому

      VSCode detects the virtual environment in less than one second after the creation.
      It asks you to pick it and confirm. In worse case you select it from the list of environments.
      You probably have old settings for python source in VSCode.
      You need to delete them if you have them.

  • @talideon
    @talideon 5 днів тому

    Bit by bit, functionality in Rye is making its way into uv, and custom scripts will likely be one such piece of functionality.

  • @pietraderdetective8953
    @pietraderdetective8953 4 дні тому +1

    Next topic suggestion: FireDucks ~ Pandas but 100x faster.

    • @halcyonramirez6469
      @halcyonramirez6469 День тому

      Polars is already a 100x faster than pandas

    • @pietraderdetective8953
      @pietraderdetective8953 День тому

      @halcyonramirez6469 checkout the benchmark, FireDucks on average is 20-50% faster than Polars, with zero code change/rewrite.
      You can use existing Pandas code.

    • @pietraderdetective8953
      @pietraderdetective8953 4 години тому

      @halcyonramirez6469 look up some benchmark, FireDucks is overall even faster than Polars. And the best thing is zero code change needed.
      So anyone can use their Pandas code right away without any rewrite to Polars.

    • @pietraderdetective8953
      @pietraderdetective8953 4 години тому

      @halcyonramirez6469 @halcyonramirez6469 look up some benchmark, FireDucks is overall even faster than Polars. And the best thing is zero code change needed.
      So anyone can use their Pandas code right away without any rewrite to Polars.

    • @pietraderdetective8953
      @pietraderdetective8953 4 години тому

      @halcyonramirez6469 look up some benchmark, FireDucks is overall even faster than Polars. And the best thing is zero code change needed.
      So anyone can use their Pandas code right away without any rewrite to Polars.

  • @analyticshub499
    @analyticshub499 5 днів тому

    Version bump is missing

  • @waiitwhaat
    @waiitwhaat 5 днів тому +2

    Something tells me Arjan likes puffin more than uv

  • @frechdaXchs
    @frechdaXchs 4 дні тому

    You compared uvx with pipx but its not quite the same as you said later in the video.
    I still use hatch until uv is more feature complete.
    The binary of uv is pretty big (>50MB) also which i dont understand yet.
    Thank you for the video this is a great tool!

  • @0730pleomax
    @0730pleomax 4 дні тому

    "uv lock --upgrade" Upgrade all the packages.
    "uv lock --upgrade-package openai" Upgrade a specific package.

  • @SHAMIKII
    @SHAMIKII 5 днів тому +2

    Thank you for "puffin"

  • @ikouzaki
    @ikouzaki 3 дні тому

    How does UV compare with Pixi?

  • @alexryderr
    @alexryderr 5 днів тому

    but there is no equivalent to "poetry shell" right?

    • @squishy-tomato
      @squishy-tomato 5 днів тому

      right, but poetry is considering removing poetry shell in v2.
      It will be a plugin and a similar functionality will be accomplished with poetry env activate. I believe that was done because of the problems of running poetry shell in scripts. The new env activate won't change your shell.
      uv has an activate command too (correction: it creates an activate script you can source there is no subcommand to activate it), though I do think it's a crutch. Personally I haven't "activated" an env since I started using poetry. `uv run x` and `poetry run python x` are more reliable. Both in interactive shells and in scripts.

  • @lesliechiang1710
    @lesliechiang1710 2 дні тому +1

    This is great but I don't know how useful for me since I moved to nix recently. On the hindsight, I see quite a few projects are moving in the direction of nix to be declarative and reproducible.

  • @rain-er6537
    @rain-er6537 5 днів тому

    Do I need uv? I just use requirements.txt with docker

    • @squishy-tomato
      @squishy-tomato 5 днів тому +2

      a reqs.txt doesn't track transitive dependencies (deps of deps), required python version, locked versions for reproducibility, and upgrading packages is a mess.
      so yes, I'd use it.

  • @SuperGrimmy
    @SuperGrimmy 4 дні тому

    uv still have some weird problems but it's great for 95%+ of people. Like with poetry it doesn't play that well with pre-release packags and if you have dev requirements that need higher python version than mentioned in the package (like doc dependecies) it completely freaks out. I'm sure these will be ironed out at some point. I guess that mostly affects library developers.

  • @ThomasRStevenson
    @ThomasRStevenson 5 днів тому

    I've been using poetry for some times now, and would love to see a way to convert a poetry project into a uv project. Thanks!

  • @yomajo
    @yomajo 4 дні тому

    VCs will definitely pull the rug lol. pipenv ftw.

  • @aonodensetsu
    @aonodensetsu 7 годин тому

    i still don't like most dependency managers, like, just write a requirements.txt?? freeze the versions??

  • @tylernardone3788
    @tylernardone3788 5 днів тому

    Same guys behind Ruff which I switched to and really like. I’m concerned about how a company like this plans to make money and stick around? Is it worth it to learn a tool like this if it’s possible it might be bought up to go bankrupt? I’d that makes sense?

  • @blanky_nap
    @blanky_nap 5 днів тому

    Rust ist so awesome that it makes other languages even cooler! UV rocks!

  • @hortonew
    @hortonew 5 днів тому

    Fully on uv now, switched from pyenv.

  • @jjxed
    @jjxed 5 днів тому

    My team thought I was crazy when I switched us to UV over a year ago

  • @RohitShere
    @RohitShere 5 днів тому +1

    Does it support groups like poetry?

    • @traal
      @traal 5 днів тому +1

      Yes, but unlike poetry it’s standardized. (PEP 735)

  • @ashkan.arabim
    @ashkan.arabim 4 дні тому

    currently tryna set up a docker container with pytorch using uv and I'm going insane.

  • @ibzilla007
    @ibzilla007 5 днів тому

    great now everytime I type uv I will have the puffin rock jingle in my head

  • @SuperGrimmy
    @SuperGrimmy 4 дні тому

    It's more or less a faster version of pipenv. If you know one of them you more or less know both.