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
💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
@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.
A video about semantic versioning would be nice! Keep it up : )
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 ) 😅😅😅😅😅
awesome video Arjan! it would be great to see a video about semantic versioning approaches using poetry, you rock man!
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.
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
Ай бұрын
I'm glad to hear that my content helped you, Ethan! Good luck, remember that you are skilled and capable, fight that imposter syndrome!
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
Ай бұрын
Glad it was helpful!
Great, just missing adding dev dependencies. Thanks as always
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
@Arjan, yes please, numbering of versions is a good idea for a video. Connected with github flow ... even better 😊
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.
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.
Yes please, video on semantic actions for Poetry
Great! thanks for sharing
@ArjanCodes
2 ай бұрын
I'm glad you liked it!
Very useful, thanks!
@ArjanCodes
12 күн бұрын
You're welcome!
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.
Great stuff! thanks man
@ArjanCodes
2 ай бұрын
Glad you liked it!
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…
I've run into pipenv a lot lately. What would be reasons to use poetry vs. pipenv or the other way around?
After I tried uv, pip, poetry and other tools are simply disappeared
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.
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
2 ай бұрын
Glad you liked the video, James! Thank you for the comment :)
A video about semantic versioning would be perfect
I would like to see a semantic versioning video.
Can i use pyinstaller with poetry?
can you do a video about combining conda and poetry
can you please guide or make video on prevetion from SQL injection in django or Ajax request
Waiting for another video about pdm! 😅 Maybe even with comparison
@aflous
2 ай бұрын
Rye is the way to go
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
2 ай бұрын
vu or uv?
please make a video about semantic versioning
Pretty cool stuff
@ArjanCodes
2 ай бұрын
Thank you, Cooper!
Please do video on semantic versioning
Poetry advanced please!!!
Thank you...
@ArjanCodes
2 ай бұрын
My pleasure!
Tried poetry due to previous Arjan video, bet still prefer pipenv over poetry.
Please make a video on rye! It's like Poetry but much faster.
Amazing as always, but the future is not Poetry but UV, same creators of Ruff.
You should try out uv by the creators of Ruff. It is unbelievably quick. More lightweight than Poetry too.
how do the packages end up inside the venv?
@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
2 ай бұрын
@@rfmiotto thanks
Try rye
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
2 ай бұрын
Check out uv!
pip freeze > requirements.txt ftw 😂
Are people using Poetry in 2024 for production code?
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 👍
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. :\
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
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…
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
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
poetry is trash
What is it for?
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"
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
2 ай бұрын
read the comments again, someone did indeed write a poem lol