Title: How to Manage Python Projects With pyproject.toml – Real Python
Open Graph Title: How to Manage Python Projects With pyproject.toml – Real Python
Description: Learn how to manage Python projects with the pyproject.toml configuration file. In this tutorial, you'll explore key use cases of the pyproject.toml file, including configuring your build, installing your package locally, managing dependencies, and publishing your package to PyPI.
Open Graph Description: Learn how to manage Python projects with the pyproject.toml configuration file. In this tutorial, you'll explore key use cases of the pyproject.toml file, including configuring your build, installing your package locally, managing dependencies, and publishing your package to PyPI.
Mail addresses
?subject=Python article for you&body=How to Manage Python Projects With pyproject.toml on Real Python
https://realpython.com/python-pyproject-toml/
Opengraph URL: https://realpython.com/python-pyproject-toml/
X: @realpython
Domain: realpython.com
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "How to Manage Python Projects With pyproject.toml",
"image": {
"@type": "ImageObject",
"url": "https://files.realpython.com/media/How-to-Set-Up-a-pyproject.toml-File-for-Your-Python-Project_Watermarked.51dc34160c1d.jpg",
"width": 1920,
"height": 1080
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://realpython.com/python-pyproject-toml/",
"lastReviewed": "2024-10-25",
"author": {
"@type": "Person",
"name": "Ian Currie",
"image": "https://realpython.com/cdn-cgi/image/width=480,height=480,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/5sK42VEQ_-_Copy_-_Copy.b8a1a4a9ca1f.jpeg",
"url": "https://realpython.com/team/icurrie/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"reviewedBy": [
{
"@type": "Person",
"name": "Aldren Santos",
"image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
"url": "https://realpython.com/team/asantos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Brenda Weleschuk",
"image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
"url": "https://realpython.com/team/bweleschuk/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Geir Arne Hjelle",
"image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
"url": "https://realpython.com/team/gahjelle/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
}
]
},
"datePublished": "2025-02-19T14:00:00+00:00",
"dateModified": "2024-10-25T06:53:28.555146+00:00",
"publisher": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": {
"@type": "ImageObject",
"url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
"width": 512,
"height": 512
},
"description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
"slogan": "Become a Python Expert",
"email": "info@realpython.com",
"sameAs": [
"https://github.com/realpython",
"https://www.youtube.com/realpython",
"https://twitter.com/realpython",
"https://x.com/realpython",
"https://www.linkedin.com/company/realpython-com/",
"https://www.facebook.com/learnrealpython",
"https://www.instagram.com/realpython",
"https://www.tiktok.com/@realpython.com"
]
},
"author": {
"@type": "Person",
"name": "Ian Currie",
"image": "https://realpython.com/cdn-cgi/image/width=480,height=480,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/5sK42VEQ_-_Copy_-_Copy.b8a1a4a9ca1f.jpeg",
"url": "https://realpython.com/team/icurrie/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"description": "Learn how to manage Python projects with the pyproject.toml configuration file. In this tutorial, you'll explore key use cases of the pyproject.toml file, including configuring your build, installing your package locally, managing dependencies, and publishing your package to PyPI.",
"hasPart": {
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is a pyproject.toml file?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You use a pyproject.toml file to configure Python projects, specifying build systems, dependencies, and project metadata in a standardized format.
"
}
},
{
"@type": "Question",
"name": "How do you create a pyproject.toml file?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You create a pyproject.toml file by placing it at the root of your project and including necessary configuration tables, such as [build-system] and [project].
"
}
},
{
"@type": "Question",
"name": "How do you structure a Python project?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You structure a Python project with a root directory containing essential files like pyproject.toml, source code directories, and optional files like README and LICENSE.
"
}
},
{
"@type": "Question",
"name": "What should be included in a pyproject.toml file?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You should include build system requirements, project metadata, dependencies, and optional configurations for scripts and additional tools in your pyproject.toml file.
"
}
},
{
"@type": "Question",
"name": "What is the difference between pyproject.toml and requirements.txt?",
"acceptedAnswer": {
"@type": "Answer",
"text": "You use pyproject.toml for comprehensive project configuration, including dependencies, whereas requirements.txt lists only the dependencies.
"
}
}
]
}
}
| author | Real Python |
| twitter:card | summary_large_image |
| twitter:image | https://files.realpython.com/media/How-to-Set-Up-a-pyproject.toml-File-for-Your-Python-Project_Watermarked.51dc34160c1d.jpg |
| og:image | https://files.realpython.com/media/How-to-Set-Up-a-pyproject.toml-File-for-Your-Python-Project_Watermarked.51dc34160c1d.jpg |
| twitter:creator | @realpython |
| og:type | article |
Links:
Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover
Robots: max-image-preview:large