UV for Python… (Almost) All Batteries Included

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 286

  • @ArjanCodes
    @ArjanCodes  หลายเดือนก่อน +4

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

    • @greendsnow
      @greendsnow หลายเดือนก่อน

      please time tag your videos sir,

    • @GoldPhoenix99
      @GoldPhoenix99 22 วันที่ผ่านมา

      By-the-by, there's another rust-based tool for python package management called pixi. This has become the no-brainer tool for me, especially because it contains the runner functionality you mention. Plus it allows for conda packages, as well, and it's SAT solver actually puts pypi and conda packages dependencies on identical footing. And it's blindingly fast.

  • @charlesconway
    @charlesconway หลายเดือนก่อน +106

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

    • @Mahj111
      @Mahj111 หลายเดือนก่อน

      "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 หลายเดือนก่อน +8

      Conda has been a thing for ages.

    • @jjrrmm
      @jjrrmm หลายเดือนก่อน +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 หลายเดือนก่อน +1

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

    • @evankiefl
      @evankiefl หลายเดือนก่อน

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

  • @manomancan
    @manomancan หลายเดือนก่อน +46

    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  หลายเดือนก่อน +2

      You’re most welcome! 😊

    • @miguelg.sanchezweckx4523
      @miguelg.sanchezweckx4523 หลายเดือนก่อน +1

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

    • @jestermaxxing
      @jestermaxxing 16 วันที่ผ่านมา +1

      ai spying on yo browsing habits

    • @waynelau3256
      @waynelau3256 วันที่ผ่านมา

      Hey since u mentioned company, how do u use shared environments for uv? for example i used to have a folder on a shared dir that contains conda envs

  • @edsanville
    @edsanville หลายเดือนก่อน +14

    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  หลายเดือนก่อน +3

      Glad you find the videos helpful!

  • @_indrid_cold_
    @_indrid_cold_ หลายเดือนก่อน +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!

  • @j_atkinson
    @j_atkinson หลายเดือนก่อน +1

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

  • @albertolanaro2341
    @albertolanaro2341 หลายเดือนก่อน +40

    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.

    • @maleldil1
      @maleldil1 หลายเดือนก่อน +2

      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.

    • @perarneng
      @perarneng 24 วันที่ผ่านมา +1

      ​@maleldil1 hopefully editors will catch up

  • @Rumpelstiltskin357
    @Rumpelstiltskin357 หลายเดือนก่อน +14

    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

  • @ChrisGVE
    @ChrisGVE หลายเดือนก่อน +2

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

  • @Incertophile
    @Incertophile หลายเดือนก่อน +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.

  • @mykolamorozov2099
    @mykolamorozov2099 หลายเดือนก่อน

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

  • @isaac10231
    @isaac10231 หลายเดือนก่อน +1

    UV is the goat.
    I know it sounds awful on the surface, another python package manager, but I've been using it for months and it really is extraordinary.
    I have had times where I was doing uv pip install, and it was so fast I ran it twice because I wasn't sure if it actually worked the first time lol.

  • @urknidoj422
    @urknidoj422 หลายเดือนก่อน +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 หลายเดือนก่อน

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

    • @urknidoj422
      @urknidoj422 หลายเดือนก่อน

      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.

  • @mikeplockhart
    @mikeplockhart หลายเดือนก่อน +9

    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 หลายเดือนก่อน

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

    • @KarlRichard2
      @KarlRichard2 หลายเดือนก่อน +1

      Oh that would be wonderful

    • @maleldil1
      @maleldil1 หลายเดือนก่อน +1

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

    • @maleldil1
      @maleldil1 หลายเดือนก่อน

      @@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 หลายเดือนก่อน

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

  • @benlindsay8268
    @benlindsay8268 หลายเดือนก่อน +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 หลายเดือนก่อน

      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 หลายเดือนก่อน +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?

  • @limitless-codes
    @limitless-codes 4 วันที่ผ่านมา

    all arjancode videos are not banger, but when its banger, its dayumn

  • @limitless-codes
    @limitless-codes 4 วันที่ผ่านมา

    goated, I just nagged about this issue on any social media, happy to see it fixed and I wish, wish, wish, the build backend be added, and a better publish workflow, and as your said, a script runner system, maybe a mix of make/just files but with python like xonsh might be a goated combo for complex workflows

  • @sonotley
    @sonotley หลายเดือนก่อน +14

    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.

  • @Aristocle
    @Aristocle หลายเดือนก่อน +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 หลายเดือนก่อน

      "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 หลายเดือนก่อน

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

  • @Igor_Grey
    @Igor_Grey หลายเดือนก่อน

    Already use uv) Thanks for video!

  • @pcdoc8
    @pcdoc8 หลายเดือนก่อน +3

    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!

  • @Michael201078
    @Michael201078 หลายเดือนก่อน

    Thanks for sharing this convenient tool!

    • @ArjanCodes
      @ArjanCodes  28 วันที่ผ่านมา

      You're welcome!

  • @tpag20
    @tpag20 8 วันที่ผ่านมา

    We've been getting confused between 8 package managers for a while now,
    and UV finally came along to solve this problem...
    now we have 9 package managers!

  • @smibssmibs
    @smibssmibs หลายเดือนก่อน +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.

  • @dragonoha
    @dragonoha หลายเดือนก่อน +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

    • @maleldil1
      @maleldil1 หลายเดือนก่อน +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 หลายเดือนก่อน

      @@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

  • @LuckyDealTrade
    @LuckyDealTrade หลายเดือนก่อน

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

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน

      Glad it was helpful!

  • @freepythoncode
    @freepythoncode หลายเดือนก่อน +3

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

  • @Diapolo10
    @Diapolo10 หลายเดือนก่อน +10

    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 หลายเดือนก่อน +3

      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 หลายเดือนก่อน +2

      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.

  • @AndyTutify
    @AndyTutify หลายเดือนก่อน +10

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

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน +1

      It was about time :)

    • @AndyTutify
      @AndyTutify หลายเดือนก่อน

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

  • @kipsta1993
    @kipsta1993 หลายเดือนก่อน +177

    i just got comfortable with poetry

    • @0730pleomax
      @0730pleomax หลายเดือนก่อน +26

      Drop it now

    • @rain-er6537
      @rain-er6537 หลายเดือนก่อน +10

      I never tried poetry because i hated the name

    • @VeejayRampay
      @VeejayRampay หลายเดือนก่อน +13

      uv is really superior

    • @dummymummy8347
      @dummymummy8347 หลายเดือนก่อน +8

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

    • @simonl8284
      @simonl8284 หลายเดือนก่อน +6

      You’ll love uv then

  • @borkempire
    @borkempire หลายเดือนก่อน +4

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

  • @dane2565
    @dane2565 หลายเดือนก่อน

    This is great! I hope some day it works with pantsbuild, which we use for our monorepo. Speaking of.. itd be great to do a video on pantsbuild as a monorepo build tool.

  • @BrianClancy
    @BrianClancy หลายเดือนก่อน +1

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

  • @Bøølæn
    @Bøølæn หลายเดือนก่อน +4

    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😝).

  • @myworldletsplay
    @myworldletsplay หลายเดือนก่อน

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

  • @TheInterestingObject
    @TheInterestingObject หลายเดือนก่อน

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

  • @minorandrianarivo661
    @minorandrianarivo661 หลายเดือนก่อน

    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 :)

  • @MrAlFuture
    @MrAlFuture หลายเดือนก่อน +1

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

  • @UTJK.
    @UTJK. หลายเดือนก่อน

    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.

  • @manualdidact
    @manualdidact หลายเดือนก่อน

    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.

  • @dragonfly-7
    @dragonfly-7 หลายเดือนก่อน +1

    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 ? ... 😇

  • @Martin-lv1xw
    @Martin-lv1xw หลายเดือนก่อน

    So great stuff!

  • @mydetlef
    @mydetlef หลายเดือนก่อน

    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.

  • @ricardomartinez9895
    @ricardomartinez9895 13 วันที่ผ่านมา

    hello, one question, if there is a package that cannot be installed via uv, shall we use pip on the environment of the project ?
    For instance, activate a virtual environment in my_project and then , pip install ?

  • @UldisBojars
    @UldisBojars 7 วันที่ผ่านมา

    Thanks for a great video!
    How could uv be used for running tox tests with multiple Python versions? As I understand, running e.g. uv python install 3.9 does not make this Python version callable from the command line and tox would not find it when needed. How can this be solved?

  • @ayoubthegreat
    @ayoubthegreat หลายเดือนก่อน

    This look very good!

  • @jheiss
    @jheiss หลายเดือนก่อน

    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.

  • @kaanakdeniz
    @kaanakdeniz หลายเดือนก่อน

    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.

  • @Machiuka
    @Machiuka หลายเดือนก่อน

    Very useful, thank you!

  • @daveys
    @daveys หลายเดือนก่อน +1

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

  • @soul67
    @soul67 หลายเดือนก่อน

    Real Banger thx😊

  • @paw565
    @paw565 หลายเดือนก่อน +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

      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

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

  • @kamikaz1k
    @kamikaz1k หลายเดือนก่อน

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

  • @a0um
    @a0um หลายเดือนก่อน

    how to configure it to have all sources under a `src` folder? Will JetBrains IDEs understand it as well?

  • @khaledsazzad
    @khaledsazzad หลายเดือนก่อน +1

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

  • @zuowang5185
    @zuowang5185 หลายเดือนก่อน +4

    Should you use uv base image in prod

    • @nathannowack6459
      @nathannowack6459 หลายเดือนก่อน

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

    • @nathannowack6459
      @nathannowack6459 หลายเดือนก่อน

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

  • @chuckynorris616
    @chuckynorris616 29 วันที่ผ่านมา

    Great video uv has almost replaced poetry for me

  • @jasonma3449
    @jasonma3449 หลายเดือนก่อน +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?

  • @talideon
    @talideon หลายเดือนก่อน +1

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

  • @alexsoldin8610
    @alexsoldin8610 หลายเดือนก่อน

    Hey Arjan, great video and really enjoy using uv in smaller projects. I was using ruff religiously before and, similarly, this package is fast, neat and easy to use.
    Do you know if uv could manage various dependencies depending on your local/deployed environments? For example, it would be great to have pytest installed on the local virtual environment and not on any staging or production environments. Thanks!

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน +1

      Hi Alex, yes, UV has support for dev and group dependencies. This allows you to define groups of dependencies as you wish and then indicate which of these groups you want to be installed. See the documentation: docs.astral.sh/uv/concepts/projects/dependencies/#dependency-groups

  • @Christopher-lb6rf
    @Christopher-lb6rf หลายเดือนก่อน +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.

  • @mmilerngruppe
    @mmilerngruppe หลายเดือนก่อน

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

  • @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?

  • @JonitoFischer
    @JonitoFischer หลายเดือนก่อน

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

  • @jwalsh2me
    @jwalsh2me หลายเดือนก่อน

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

  • @BokoMoko65
    @BokoMoko65 หลายเดือนก่อน

    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?

  • @OptimizeWealthRansomJohnson
    @OptimizeWealthRansomJohnson หลายเดือนก่อน

    Should VS Code be set up to run python with uv run?

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน

      Although you could, it’s not necessary. Once you created the virtual environment with uv, you can select that in VSCode and then run your Python script directly from there.

  • @agamemnonc
    @agamemnonc หลายเดือนก่อน

    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?

  • @danielcoles1989
    @danielcoles1989 หลายเดือนก่อน

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

    • @Melindrea
      @Melindrea หลายเดือนก่อน

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

  • @eugeneL_N1E104
    @eugeneL_N1E104 หลายเดือนก่อน

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

  • @Justin-General
    @Justin-General หลายเดือนก่อน

    Compatible with docker containerization?

  • @michaelthomas3235
    @michaelthomas3235 หลายเดือนก่อน

    Is anyone else having issues with pylance in vscode with module recognition when using uv? Been using # type: ignore and uv run for my scripts which all work, but feel like I am missing something in my setup.

  • @ciscoh8402
    @ciscoh8402 หลายเดือนก่อน

    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 หลายเดือนก่อน +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.

  • @teluial
    @teluial หลายเดือนก่อน

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

  • @alexandarjelenic2880
    @alexandarjelenic2880 หลายเดือนก่อน +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?

  • @jkrigelman
    @jkrigelman หลายเดือนก่อน

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

  • @rikschaaf
    @rikschaaf หลายเดือนก่อน +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 หลายเดือนก่อน +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 หลายเดือนก่อน +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…

  • @eduardoprjadko2305
    @eduardoprjadko2305 หลายเดือนก่อน

    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...

  • @CristiNeagu
    @CristiNeagu หลายเดือนก่อน

    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 หลายเดือนก่อน

      I want to know the same details, anybody knows ?

  • @mattk6910
    @mattk6910 หลายเดือนก่อน +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

  • @thibdub2752
    @thibdub2752 หลายเดือนก่อน

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

  • @murphygreen8484
    @murphygreen8484 หลายเดือนก่อน

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

    • @murphygreen8484
      @murphygreen8484 หลายเดือนก่อน

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

  • @pablogomis
    @pablogomis หลายเดือนก่อน

    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 หลายเดือนก่อน +3

      Do you mean: "uv run python"?

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน

      That should do it.

    • @benlindsay8268
      @benlindsay8268 หลายเดือนก่อน +1

      `uvx ipython` if you're fancy?

  • @analyticshub499
    @analyticshub499 หลายเดือนก่อน

    Version bump is missing

  • @optimiserlenergie1094
    @optimiserlenergie1094 11 วันที่ผ่านมา

    The multiple jokes on puffin could have been avoided !

  • @_DRMR_
    @_DRMR_ หลายเดือนก่อน

    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.

  • @OlliWilkman
    @OlliWilkman หลายเดือนก่อน

    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.

  • @alexryderr
    @alexryderr หลายเดือนก่อน

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

  • @aldrickdev
    @aldrickdev หลายเดือนก่อน

    How do you feel about the Hatch project?

  • @terryjophlin
    @terryjophlin หลายเดือนก่อน +7

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

    • @test-y1p7r
      @test-y1p7r หลายเดือนก่อน +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

    • @mattk6910
      @mattk6910 หลายเดือนก่อน +1

      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?

  • @ikouzaki
    @ikouzaki หลายเดือนก่อน

    How does UV compare with Pixi?

  • @SHAMIKII
    @SHAMIKII หลายเดือนก่อน +3

    Thank you for "puffin"

  • @akrishnadevotee
    @akrishnadevotee หลายเดือนก่อน

    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 หลายเดือนก่อน +1

      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.

  • @rain-er6537
    @rain-er6537 หลายเดือนก่อน

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

  • @M3MYS3LF1979
    @M3MYS3LF1979 หลายเดือนก่อน +9

    Never mention puffin rock again

    • @ArjanCodes
      @ArjanCodes  หลายเดือนก่อน +3

      I puffin…. I mean promise!

    • @mattk6910
      @mattk6910 หลายเดือนก่อน

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

  • @jrduarte99
    @jrduarte99 หลายเดือนก่อน

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

  • @frechdaXchs
    @frechdaXchs หลายเดือนก่อน

    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!

  • @pietraderdetective8953
    @pietraderdetective8953 หลายเดือนก่อน +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 หลายเดือนก่อน

      @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 หลายเดือนก่อน

      @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 หลายเดือนก่อน

      @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.

  • @waiitwhaat
    @waiitwhaat หลายเดือนก่อน +3

    Something tells me Arjan likes puffin more than uv

  • @jjrrmm
    @jjrrmm หลายเดือนก่อน

    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.