Menu

1 / 2

How to Package Shared Python Libraries with pyproject.toml

DEV Community: cicd·Aniket Abhishek Soni·about 20 hours ago
#RaUNCLb2
#devtocicd#devto#dev#library#pyproject
Reading 0:00
15s threshold

You ship the job. It passes CI. Then, a colleague runs it in a notebook environment, and suddenly your shared utility library throws an ImportError because it pulled in a different version of pandas than the one used in your orchestration layer.

Many data teams still manage shared code by appending directory paths to sys.path or bundling messy setup.py scripts that haven't been updated since the mid-2010s. This is a fragile architecture that invites inconsistency. If you want a robust data platform, you should stop treating your internal tooling like an afterthought and start packaging it as a proper Python distribution using pyproject.toml .

Why the common approach falls short

The "copy-paste-folder" or "sys.path.append" strategy is an engineering debt bomb.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.