Python Poetry in 8 Minutes

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • In this video, I'll guide you through the ins and outs of managing Python virtual environments, while also introducing you to Poetry. You'll learn a host of tips and strategies to manage your projects with greater effectiveness and efficiency.
    💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
    🔥 GitHub Repository: git.arjan.codes/2024/tuesday_...
    💻 ArjanCodes Blog: www.arjancodes.com/blog
    ✍🏻 Take a quiz on this topic: www.learntail.com/quiz/eqwfss
    Try Learntail for FREE ➡️ www.learntail.com/
    🎓 Courses:
    The Software Designer Mindset: www.arjancodes.com/mindset
    The Software Architect Mindset: Pre-register now! www.arjancodes.com/architect
    Next Level Python: Become a Python Expert: www.arjancodes.com/next-level...
    The 30-Day Design Challenge: www.arjancodes.com/30ddc
    🛒 GEAR & RECOMMENDED BOOKS: kit.co/arjancodes.
    👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!
    Social channels:
    💬 Discord: discord.arjan.codes
    🐦Twitter: / arjancodes
    🌍LinkedIn: / arjancodes
    🕵Facebook: / arjancodes
    📱Instagram: / arjancodes
    ♪ Tiktok: / arjancodes
    👀 Code reviewers:
    - Yoriz
    - Ryan Laursen
    - Dale Hagglund
    - Kit Hygh
    - Alexander Milden
    - Bean
    🎥 Video edited by Mark Bacskai: / bacskaimark
    🔖 Chapters:
    0:00 Intro
    0:59 Dependency management
    3:13 Use dependency specification
    6:16 Virtual environments
    6:44 Building and publishing
    8:10 Outro
    #arjancodes #softwaredesign #python
    DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!

Komentáře • 78

  • @ArjanCodes
    @ArjanCodes  Před 3 měsíci +2

    💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.

    • @js_dev_uk
      @js_dev_uk Před 2 měsíci

      I just went to download the guide and when I clicked on the link in the email I reveived I got a 404 Not Found error.

  • @vikaspoddar001
    @vikaspoddar001 Před 4 měsíci +24

    Please do a video comparing different tools like linters, formatter, type checker, package manager, project manager and environment manager in terms of python ecosystem
    Another can you do a video covering the state of rustpython ( rust based python interpreter) and pyiodide ( wasm port for python ) 😅😅😅😅😅

  • @miguelangelfernandezguerre1681
    @miguelangelfernandezguerre1681 Před 4 měsíci +9

    awesome video Arjan! it would be great to see a video about semantic versioning approaches using poetry, you rock man!

  • @raffritter6766
    @raffritter6766 Před 4 měsíci +20

    A video about semantic versioning would be nice! Keep it up : )

  • @armenmkrtchyan6000
    @armenmkrtchyan6000 Před 4 měsíci +5

    Useful video, Thank you!
    Will be great to have a video explaining versioning of the project, synchronizing it with git tag etc. So, complete versioning workflow will be great.

  • @ethancarter2664
    @ethancarter2664 Před 3 měsíci +3

    Thank you Arjan! I got in over my head and somehow landed a job at a cutting edge 'move fast and break things' place as a SWE, as the sole developer on a team, with no onboarding docs (in response, I pilfered onboarding docs from other teams) and had to quickly learn docker, poetry, vscode, AWS, fastapi and even MacOS, all at once.
    I was a pireqs pip-venv guy, but they require me to learn poetry, so this was helpful.
    Oh and my previous SWE experience? Officially none. I've been a solo cowboy my whole life.
    All that's left to do is fight my encroaching imposter syndrome.

    • @ArjanCodes
      @ArjanCodes  Před 3 měsíci +1

      I'm glad to hear that my content helped you, Ethan! Good luck, remember that you are skilled and capable, fight that imposter syndrome!

  • @LordKaos666
    @LordKaos666 Před 2 měsíci

    Nice short version of your previous Poetry video...very useful for me to refresh concepts. Design guides downloaded to take a peek later ;-) Thanks!

  • @3agoskin
    @3agoskin Před 6 dny

    Thank you for this quick tutorial, very useful!

  • @frantisekcastek174
    @frantisekcastek174 Před 4 měsíci +2

    @Arjan, yes please, numbering of versions is a good idea for a video. Connected with github flow ... even better 😊

  • @norbertocammayo2334
    @norbertocammayo2334 Před 4 měsíci +4

    Great, just missing adding dev dependencies. Thanks as always

  • @mariochi1499
    @mariochi1499 Před 4 měsíci

    Great video as always! Wondering if Poetry would be helpful for managing the dependencies that are being used in lambda layers? SInce there is a size limit for a single lambda layer and they need to be divided up to 5 layers for a single lambda.

  • @fabrelambeau5858
    @fabrelambeau5858 Před 3 měsíci

    Yes please, a video on versioning with poetry would be great. I’m using the poetry-dynamic-versioning plugin but I’m not sure it’s really warranted…

  • @depressedknight369
    @depressedknight369 Před 3 měsíci +1

    Yes please, video on semantic actions for Poetry

  • @christopheanfry2425
    @christopheanfry2425 Před 4 měsíci +1

    Very nice video!!! Do you recommend to completely use poetry instead of using venv and pip install. If I understood well it does all of that? Thanks

  • @James-vd3xj
    @James-vd3xj Před 4 měsíci +2

    It's been a while since I've tried Poetry and hope to try it again after this video. I think the issue I had was that it was consistently unable to install packages or some packages did not contain the proper poetry requirements. I just reverted back to venv. But I always forget to pip freeze.
    Now this is the content I love. Keep it up and thank you!!

    • @ArjanCodes
      @ArjanCodes  Před 3 měsíci

      Glad you liked the video, James! Thank you for the comment :)

  • @haimroizman6440
    @haimroizman6440 Před 22 dny

    As always it was really a great video in all aspects.... Thanks a lot

  • @demasjaring5435
    @demasjaring5435 Před 4 měsíci

    Hi, I have a question about the wheel files. When I want to install it on a production environment, it is common to create a new spiritual environment on that production environment or you can just install the package there.

  • @VadimSuharnikov
    @VadimSuharnikov Před 4 měsíci +9

    I found pdm to be a better alternative to poetry. Three years ago, poetry was too buggy and had low-level errors. That was my reason for moving from poetry to pdm.

  • @gerardorosiles8918
    @gerardorosiles8918 Před 3 měsíci

    I've run into pipenv a lot lately. What would be reasons to use poetry vs. pipenv or the other way around?

  • @poke_champ
    @poke_champ Před 3 měsíci

    can you do a video about combining conda and poetry

  • @Doppelwulf
    @Doppelwulf Před 4 měsíci +1

    I would like to see a semantic versioning video.

  • @vladrybin8847
    @vladrybin8847 Před 4 měsíci +1

    Using poetry is more complicated than venv if you have a lot of projects/microservises with different python versions. Especially if it's in one major version. For example python12.0, python12.2, python11.

  • @Alebobb
    @Alebobb Před měsícem

    Very useful, thanks!

  • @arturabizgeldin9890
    @arturabizgeldin9890 Před 4 měsíci

    please make a video about semantic versioning

  • @florenciaracciatti6465
    @florenciaracciatti6465 Před 4 měsíci

    Great! thanks for sharing

  • @dolamuoludare4383
    @dolamuoludare4383 Před 3 měsíci

    A video about semantic versioning would be perfect

  • @israrhussainrao8022
    @israrhussainrao8022 Před 4 měsíci

    can you please guide or make video on prevetion from SQL injection in django or Ajax request

  • @yuujin1337
    @yuujin1337 Před měsícem

    I'm confused, how can you activate venv (with poetry shell) right after installing dependencies? isn't should be activate the venv first? Sorry I'm still new to poetry, someone pls explain

  • @VitthalMirji
    @VitthalMirji Před 3 měsíci

    Please do video on semantic versioning

  • @murtadha96
    @murtadha96 Před 4 měsíci

    Great stuff! thanks man

  • @KA3AHOBA94
    @KA3AHOBA94 Před 4 měsíci

    Can i use pyinstaller with poetry?

  • @blanky_nap
    @blanky_nap Před 4 měsíci +3

    After I tried uv, pip, poetry and other tools are simply disappeared

  • @Lexaire
    @Lexaire Před 4 měsíci

    Please make a video on rye! It's like Poetry but much faster.

  • @MadToroLoco
    @MadToroLoco Před 20 dny

    great video

  • @AlexanderWhillas
    @AlexanderWhillas Před 3 měsíci +1

    I gave up on Poetry (the software, I still love poetry!) and pipenv coz at some point they always messed up the vir. env. Now I just use the native `python3.x -m venv __venv__` (note gives control over python version) and VU to handle locking `vu pip compile requirements.in` (blindingly fast!). Poetry and pipenv are not transparent in the way they work so when something goes wrong you don't know where to start.

  • @baterosmith2
    @baterosmith2 Před 4 měsíci +1

    Poetry advanced please!!!

  • @AndyTutify
    @AndyTutify Před 4 měsíci +2

    You should try out uv by the creators of Ruff. It is unbelievably quick. More lightweight than Poetry too.

  • @manchenkoff
    @manchenkoff Před 4 měsíci +5

    Waiting for another video about pdm! 😅 Maybe even with comparison

    • @aflous
      @aflous Před 4 měsíci +4

      Rye is the way to go

  • @yomajo
    @yomajo Před 4 měsíci

    Tried poetry due to previous Arjan video, bet still prefer pipenv over poetry.

  • @hubstrangers3450
    @hubstrangers3450 Před 4 měsíci

    Thank you...

  • @coopernik
    @coopernik Před 4 měsíci

    Pretty cool stuff

  • @alejandroenriquez8508
    @alejandroenriquez8508 Před 4 měsíci

    Amazing as always, but the future is not Poetry but UV, same creators of Ruff.

  • @DM-py7pj
    @DM-py7pj Před 4 měsíci

    how do the packages end up inside the venv?

    • @rfmiotto
      @rfmiotto Před 3 měsíci +1

      By default, poetry will not install the dependencies inside your project folder. To do so, you need to configure it using this command:
      poetry config virtualenvs.in-project true

    • @DM-py7pj
      @DM-py7pj Před 3 měsíci

      @@rfmiotto thanks

  • @0110101110
    @0110101110 Před 16 dny

    i prefer pdm over poetry. Make a video about pdm

  • @zskater1234
    @zskater1234 Před 4 měsíci +1

    Try rye

  • @ExplicableCashew
    @ExplicableCashew Před 4 měsíci +3

    For various reasons, not the least one being legacy systems, I've been sticking to plain venvs and pip.
    So.
    Witnessing poetry actually uninstall unneeded dependencies during the remove operation gave me a small nerdgasm

  • @DSingh-ej3cu
    @DSingh-ej3cu Před 3 měsíci

    Are people using Poetry in 2024 for production code?

  • @kokokokoalabrothers6009
    @kokokokoalabrothers6009 Před 4 měsíci +1

    pip freeze > requirements.txt ftw 😂

  • @sany2k8
    @sany2k8 Před 4 měsíci +4

    Need another video about poetry with "poetry update", "poetry lock --no-update", "poetry update ", symantic versioning, and some more features of poetry e.g. dev dependencies, private package, test case conf. etc.
    Thanks in advanced sir 👍

  • @Nalewkarz
    @Nalewkarz Před 4 měsíci +20

    I don't like it, it reminds me javascript node ecosystem and often behaves unstable. Poetry tries to do too much stuff at once and has plugins. You can't even use .env files without installing a plugin. For dependencies only i like Pipenv. Does the job well, don't try to do everything.

    • @southpole76
      @southpole76 Před 4 měsíci +1

      Replicating the node workflow is exactly the point. We use it in a system where js frontend and python backend tool chains need to be managed in parallel

  • @bennetb01
    @bennetb01 Před 4 měsíci

    Poetry doesn't sit right with me. Lack of support or any plans on supporting PEP 621. I like lockfiles but PyPA needs to get their shit together and there needs to be one way to build packages in python and I don't feel like poetry is it.
    I don't do a lot of Python though and I look at things like NPM/Yarn, Rust's Cargo, and the Go tool and they are ubiquitous because they are standardized.

    • @Am6-9
      @Am6-9 Před 3 měsíci

      I’m still relatively new to python, and even newer to python packaging, and tbh to me it seems like one hot, ever changing mess, and consequently a plethora of different third party tools around it. When the python packaging user guide lists seven different techniques for single sourcing the package version, there is something wrong…

  • @ReRubis
    @ReRubis Před 4 měsíci

    Poetry is too overloaded with unnecessary stuff. Why the hell do you need to manage Python versions inside your project? :\
    Why does it hide .venv from me in who knows where? :\
    Although I love dev containers, maybe that's why I hate poetry.
    If you are using pycharm with a ton of "quality of life"(no) features, poetry is probably good then. :\

  • @payrus963
    @payrus963 Před 3 měsíci +1

    poetry is trash

  • @rikschaaf
    @rikschaaf Před 4 měsíci +1

    Python poetry:
    In Python's syntax, lines elegantly align,
    Indentation guides, like a poet's rhyme.
    Lists, loops, and logic, all in one dance,
    In Python's embrace, solutions advance.
    Libraries shine like stars in the night,
    NumPy, Pandas, unlocking insight.
    From novice to master, its simplicity charms,
    In Python's realm, creativity swarms.
    Python Poetry:
    [build-system]
    requires = ["poetry-core"]
    build-backend = "poetry.core.masonry.api"

  • @User-rm9cw
    @User-rm9cw Před 3 měsíci

    What is it for?

  • @edgeeffect
    @edgeeffect Před 3 měsíci +1

    Very nice... shades of `package.json` or `cargo.toml` ... but since I've become obsessed with Docker, and I develop in Docker, deploy in Docker... "Docker, Docker, Docker!!!", then a pip install in my Dockerfile seems to be the right place to do this sort of thing...
    I think I deserve some kind of prize for stupidity! I came here expecting... I dunno.... poems written about Python... poems written IN Python??? The fact that there might be a Python package simply called "poetry" was light years away from my mind.... Yeah, can I have that stupidity prize now please?

    • @julians.2597
      @julians.2597 Před 3 měsíci +1

      read the comments again, someone did indeed write a poem lol