Python Poetry in 8 Minutes

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!

Пікірлер: 72

  • @ArjanCodes
    @ArjanCodes2 ай бұрын

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

  • @js_dev_uk

    @js_dev_uk

    Ай бұрын

    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.

  • @raffritter6766
    @raffritter67662 ай бұрын

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

  • @vikaspoddar9456
    @vikaspoddar94562 ай бұрын

    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
    @miguelangelfernandezguerre16812 ай бұрын

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

  • @armenmkrtchyan6000
    @armenmkrtchyan60002 ай бұрын

    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Ай бұрын

    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

    Ай бұрын

    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Ай бұрын

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

  • @ArjanCodes

    @ArjanCodes

    Ай бұрын

    Glad it was helpful!

  • @norbertocammayo2334
    @norbertocammayo23342 ай бұрын

    Great, just missing adding dev dependencies. Thanks as always

  • @christopheanfry2425
    @christopheanfry24252 ай бұрын

    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

  • @frantisekcastek174
    @frantisekcastek1742 ай бұрын

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

  • @VadimSuharnikov
    @VadimSuharnikov2 ай бұрын

    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.

  • @mariochi1499
    @mariochi14992 ай бұрын

    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.

  • @depressedknight369
    @depressedknight369Ай бұрын

    Yes please, video on semantic actions for Poetry

  • @florenciaracciatti6465
    @florenciaracciatti64652 ай бұрын

    Great! thanks for sharing

  • @ArjanCodes

    @ArjanCodes

    2 ай бұрын

    I'm glad you liked it!

  • @Alebobb
    @Alebobb13 күн бұрын

    Very useful, thanks!

  • @ArjanCodes

    @ArjanCodes

    12 күн бұрын

    You're welcome!

  • @demasjaring5435
    @demasjaring54352 ай бұрын

    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.

  • @murtadha96
    @murtadha962 ай бұрын

    Great stuff! thanks man

  • @ArjanCodes

    @ArjanCodes

    2 ай бұрын

    Glad you liked it!

  • @fabrelambeau5858
    @fabrelambeau58582 ай бұрын

    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…

  • @gerardorosiles8918
    @gerardorosiles89182 ай бұрын

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

  • @blanky_nap
    @blanky_nap2 ай бұрын

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

  • @vladrybin8847
    @vladrybin88472 ай бұрын

    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.

  • @James-vd3xj
    @James-vd3xj2 ай бұрын

    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

    2 ай бұрын

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

  • @dolamuoludare4383
    @dolamuoludare43832 ай бұрын

    A video about semantic versioning would be perfect

  • @Doppelwulf
    @Doppelwulf2 ай бұрын

    I would like to see a semantic versioning video.

  • @KA3AHOBA94
    @KA3AHOBA942 ай бұрын

    Can i use pyinstaller with poetry?

  • @poke_champ
    @poke_champ2 ай бұрын

    can you do a video about combining conda and poetry

  • @israrhussainrao8022
    @israrhussainrao80222 ай бұрын

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

  • @manchenkoff
    @manchenkoff2 ай бұрын

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

  • @aflous

    @aflous

    2 ай бұрын

    Rye is the way to go

  • @AlexanderWhillas
    @AlexanderWhillas2 ай бұрын

    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.

  • @ChristopheFurmaniak

    @ChristopheFurmaniak

    2 ай бұрын

    vu or uv?

  • @arturabizgeldin9890
    @arturabizgeldin98902 ай бұрын

    please make a video about semantic versioning

  • @coopernik
    @coopernik2 ай бұрын

    Pretty cool stuff

  • @ArjanCodes

    @ArjanCodes

    2 ай бұрын

    Thank you, Cooper!

  • @VitthalMirji
    @VitthalMirji2 ай бұрын

    Please do video on semantic versioning

  • @baterosmith2
    @baterosmith22 ай бұрын

    Poetry advanced please!!!

  • @hubstrangers3450
    @hubstrangers34502 ай бұрын

    Thank you...

  • @ArjanCodes

    @ArjanCodes

    2 ай бұрын

    My pleasure!

  • @yomajo
    @yomajo2 ай бұрын

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

  • @Lexaire
    @Lexaire2 ай бұрын

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

  • @alejandroenriquez8508
    @alejandroenriquez85082 ай бұрын

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

  • @AndyTutify
    @AndyTutify2 ай бұрын

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

  • @DM-py7pj
    @DM-py7pj2 ай бұрын

    how do the packages end up inside the venv?

  • @rfmiotto

    @rfmiotto

    2 ай бұрын

    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

    2 ай бұрын

    @@rfmiotto thanks

  • @zskater1234
    @zskater12342 ай бұрын

    Try rye

  • @ExplicableCashew
    @ExplicableCashew2 ай бұрын

    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

  • @AndyTutify

    @AndyTutify

    2 ай бұрын

    Check out uv!

  • @kokokokoalabrothers6009
    @kokokokoalabrothers60092 ай бұрын

    pip freeze > requirements.txt ftw 😂

  • @DSingh-ej3cu
    @DSingh-ej3cu2 ай бұрын

    Are people using Poetry in 2024 for production code?

  • @sany2k8
    @sany2k82 ай бұрын

    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 👍

  • @ReRubis
    @ReRubis2 ай бұрын

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

  • @bennetb01
    @bennetb012 ай бұрын

    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

    2 ай бұрын

    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…

  • @Nalewkarz
    @Nalewkarz2 ай бұрын

    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

    2 ай бұрын

    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

  • @payrus963
    @payrus9632 ай бұрын

    poetry is trash

  • @User-rm9cw
    @User-rm9cw2 ай бұрын

    What is it for?

  • @rikschaaf
    @rikschaaf2 ай бұрын

    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"

  • @edgeeffect
    @edgeeffect2 ай бұрын

    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

    2 ай бұрын

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