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

Поділитися
Вставка
  • Опубліковано 19 лип 2023
  • 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: ua-cam.com/users/subscription_c...
    FACEBOOK: / infoworld
    TWITTER: / infoworld
    WEBSITE: www.infoworld.com/
  • Наука та технологія

КОМЕНТАРІ • 17

  • @user-bk4wk2fe5b
    @user-bk4wk2fe5b 2 місяці тому +3

    Thanks! I've been using an older setup.py approach, but I found pyproject.toml much more convenient.

  • @davidpaez_co
    @davidpaez_co Місяць тому +1

    This was an excellent explanation. Thank you so much Serdar!

  • @felipealvarez1982
    @felipealvarez1982 4 місяці тому +3

    Very useful for newbs like me, to do things following best practices. Thanks

  • @ayeameen
    @ayeameen 8 місяців тому +2

    Thanks so much for such a concise introduction!

  • @xzenor
    @xzenor 7 місяців тому

    That was useful. Thanks. Great explanation

  • @bryanrosiles899
    @bryanrosiles899 5 місяців тому

    You are a saint, thank you!

  • @DominikJagoda
    @DominikJagoda 3 місяці тому

    Thanks, for help

  • @pettymanny6487
    @pettymanny6487 2 місяці тому +1

    Useful, thanks

    • @InfoWorld
      @InfoWorld  2 місяці тому

      You're welcome.
      -Serdar

  • @serufim
    @serufim 6 місяців тому +1

    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 2 місяці тому +1

    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  2 місяці тому

      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

  • @johncompassion9054
    @johncompassion9054 7 місяців тому

    Thank you so much. Can you please explain what are .venv, .gitignore, input.md? And the general directory structure. Thank you again.

    • @ashrasmun1
      @ashrasmun1 6 місяців тому

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

  • @xzenor
    @xzenor 7 місяців тому

    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  7 місяців тому

      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.

  • @jamieo8307
    @jamieo8307 11 місяців тому

    🙋 'PromoSM'