🎓 All Courses | 📚 Python Programming Syllabus

📋 Study this course on TaskLoco
#python-programming#packaging#distribution

Packaging — Share Your Python Project

Project structure:

myproject/
├── mypackage/
│   ├── __init__.py
│   ├── core.py
│   └── utils.py
├── tests/
│   └── test_core.py
├── README.md
├── requirements.txt
└── pyproject.toml

pyproject.toml (modern standard):

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.backends.legacy:build"

[project]
name = "mypackage"
version = "0.1.0"
description = "My awesome package"
requires-python = ">=3.8"
dependencies = ["requests"]

Build & publish to PyPI:

pip install build twine
python -m build              # creates dist/ folder
twine upload dist/*          # upload to PyPI

Install locally for development:

pip install -e .   # editable install

__init__.py: Makes a folder a Python package. Can be empty or expose public API: from .core import MyClass.


YouTube • Top 10
Python Programming: Packaging & Distributing Your Code
Tap to Watch ›
📸
Google Images • Top 10
Python Programming: Packaging & Distributing Your Code
Tap to View ›

Reference:

Wikipedia: PyPI

image for linkhttps://en.wikipedia.org/wiki/Python_Package_Index

📚 Python Programming — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT