What does the structure of a modern Python project look like?

Ғылым және технология

Python projects that use modern tooling and standards work best when the files in the project repository follow a certain layout. Learn in this video how to organize a Python project's files and directories, including: using the pyproject.toml file to describe a project's metadata, setting up .gitignore for Python projects, and where to place tests or documentation.
-----------------------------­---
SUBSCRIBE: kzread.info_c...
FACEBOOK: / infoworld
TWITTER: / infoworld
WEBSITE: www.infoworld.com/

Пікірлер: 7

  • @Vnifit
    @Vnifit5 ай бұрын

    Really great stuff, I really like your explanations! Your cadence reminds me a bit of "Bill Hammack the Engineer Guy", and that's great as I find it a very smooth and understandable speech pattern, that isn't racing fast and is pleasent to listen to, despite the complexity of information. Found you from your Cython video. Keep up the great work!

  • @XoloJay
    @XoloJay7 ай бұрын

    I'm lost. requirements.txt is mentioned in the markdown, but I assume now it's no longer used as the toml file now supercedes it as I don't see it in your project structure?

  • @InfoWorld

    @InfoWorld

    6 ай бұрын

    Sorry about that! Yes, in a modern project, you can use pyproject.toml in place of requirements.txt. However: if you want to provide a requirements.txt file for backwards compatibility side-by-side with pyproject.toml, you can do that -- it's just often easier to pick one standard and stick with it. -Serdar

  • @renancalmon9946
    @renancalmon99467 ай бұрын

    I'm currently working on a python project in which I must use python 3.8.10. Does this python version support the toml file? If not, which is the best way to structure the project in this case?

  • @InfoWorld

    @InfoWorld

    7 ай бұрын

    On the whole, I do recommend upgrading to a newer version of Python if you can. 3.8 is only receiving security fixes at this point and will be end-of-life by the end of 2024. That said, any version of Python that supports Setuptools will support pyproject.toml. For details, see this document. which talks about modernizing an existing setup.py based project: packaging.python.org/en/latest/guides/modernize-setup-py-project/ -Serdar

  • @faysoufox
    @faysoufox4 ай бұрын

    The video is interesting, do you have the link to this project ? It's like seeing a toy and not being to try it :)

  • @InfoWorld

    @InfoWorld

    3 ай бұрын

    You can see some additional details about a modern Python project layout at the official site for the Python Packaging Authority: packaging.python.org/en/latest/tutorials/packaging-projects/ -Serdar

Келесі