Pyproject.toml: The modern Python project definition file, explained

  Рет қаралды 13,901

InfoWorld

InfoWorld

Жыл бұрын

Modern Python projects use pyproject.toml files to describe a project's metadata, dependencies, and other valuable attributes. Learn in this video the basics of how pyproject.toml works -- how it can be used to describe a simple project, install its dependencies, and define other things such as command-line scripts used with the project.
-----------------------------­---
SUBSCRIBE: kzfaq.info_c...
FACEBOOK: / infoworld
TWITTER: / infoworld
WEBSITE: www.infoworld.com/

Пікірлер: 17
@user-bk4wk2fe5b
@user-bk4wk2fe5b 4 ай бұрын
Thanks! I've been using an older setup.py approach, but I found pyproject.toml much more convenient.
@felipealvarez1982
@felipealvarez1982 5 ай бұрын
Very useful for newbs like me, to do things following best practices. Thanks
@davidpaez_co
@davidpaez_co 2 ай бұрын
This was an excellent explanation. Thank you so much Serdar!
@ayeameen
@ayeameen 9 ай бұрын
Thanks so much for such a concise introduction!
@xzenor
@xzenor 9 ай бұрын
That was useful. Thanks. Great explanation
@bryanrosiles899
@bryanrosiles899 6 ай бұрын
You are a saint, thank you!
@DominikJagoda
@DominikJagoda 4 ай бұрын
Thanks, for help
@pettymanny6487
@pettymanny6487 3 ай бұрын
Useful, thanks
@InfoWorld
@InfoWorld 3 ай бұрын
You're welcome. -Serdar
@serufim
@serufim 7 ай бұрын
God dam. i have learn python when an actual version was 3.5 and since python project have changed so much, that i think that python today and 7 years ago its quite different languages and i have to learn it again
@tascsolutions6483
@tascsolutions6483 3 ай бұрын
Thanks, you helped explain things as I have been trying out poetry in my new apps. Curious if you use it. I find it cumbersome up front but will keep using to see if more usage will streamline things. Where exactly does your .egg folder reside?
@InfoWorld
@InfoWorld 3 ай бұрын
When you use pyproject.toml and create an editable install of your package, the .egg-info directory is side by side with the directory where the source for the package is. E.g., if you have /src/myapp, it'll be /src/myapp.egg-info -Serdar
@xzenor
@xzenor 9 ай бұрын
So you don't need a requirements.txt anymore but 'can' you add one anyway for people that prefer it? Or would that cause conflicts?
@InfoWorld
@InfoWorld 8 ай бұрын
You can use a requirements.txt side by side with a pyproject.toml file, but it would be your responsibility to keep the requirements in sync with each other in both files. My own personal feeling is to use one or the other, as a signal to the user about how to handle things.
@johncompassion9054
@johncompassion9054 8 ай бұрын
Thank you so much. Can you please explain what are .venv, .gitignore, input.md? And the general directory structure. Thank you again.
@ashrasmun1
@ashrasmun1 8 ай бұрын
.venv is a directory created when you create a python virtual environment using virtualenv module. It basically ensures, that whatever you install, it's only available within that environment instead of whole system. You may want to read about it in detail more. .gitignore is a file in which you list which files you would like to ignore when commiting to your git repository. You may want to read more about "git" to understand context a bit better.
@jamieo8307
@jamieo8307 Жыл бұрын
🙋 'PromoSM'
Learn TOML in 10 Minutes (Tutorial)
10:51
Indently
Рет қаралды 24 М.
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 19 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
why I will never use python-poetry
9:09
anthonywritescode
Рет қаралды 57 М.
Python 3.13's new JIT and no-GIL modes
6:54
InfoWorld
Рет қаралды 2,7 М.
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 382 М.
Setup a Python project with PDM
12:22
Orchard Dweller
Рет қаралды 4,6 М.
How to Use Poetry in Python to avoid Dependency Hell
20:21
Earthly
Рет қаралды 12 М.
8 things in Python you didn't realize are descriptors
14:21
Intermediate Python Tutorial: How to Use the __init__.py File
6:22
Eric O Meehan
Рет қаралды 131 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 175 М.
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 881 М.
Better Than Smart Phones☠️🤯 | #trollface
0:11
Not Sanu Moments
Рет қаралды 15 МЛН
Kumanda İle Bilgisayarı Yönetmek #shorts
0:29
Osman Kabadayı
Рет қаралды 2,3 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33