Packaging a Python Project Like a Pro

You’ve written a useful Python script. Maybe it’s a data transformation, a CLI tool, or a helper module you keep copying into every project. It works — but something feels off. You’re doing sys.path hacks. You’re copying files around. You’re importing things with weird relative paths that break when you run the script from a different directory. There’s a better way. And it’s not complicated. This article will walk you through packaging a Python project properly. Not “publish to PyPI” packaging (we’ll cover it later maybe) — just “I can install this locally and import it from anywhere” packaging. The kind that makes your code feel like a real project instead of a messy collection of loose scripts. ...

January 15, 2026 · 7 min · Christophe B.