[tutorial] Build your own python package
๐ Introduction
Building your own Python package is beneficial for maintaining large projects, as it helps manage code that is otherwise scattered across directories.
๐ Quick Start
- Create a
setup.py
file:
1 | from setuptools import setup, find_packages |
- Create a
pyproject.toml
file:
1 | [tool.poetry] |
- Sign up for a PyPI account at https://pypi.org/ to publish your package.
๐ Recap
- Building a Python package helps maintain code organization in larger projects.
- Using
setup.py
is the traditional method, whilepyproject.toml
is the modern approach with Poetry. - Itโs essential to have an account on PyPI to publish your package.
๐ References
[tutorial] Build your own python package