Data EngineeringFDE engineering foundations

Design a small package with explicit dependencies

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 2 min read
Technically reviewed by Ishaan Sharma
In this article (3 sections)

Imports hidden in one laptop’s global environment make a project irreproducible. Declare what the application needs and keep test/tool dependencies separate.

Inspect two groups

The engineering foundations lab uses constrained fixture requirements.

python
from engineering_cases import dependency_case

result = dependency_case()
assert result["separated"] is True
assert result["unbounded"] == []
assert result["runtime"] == ["httpx>=0.27,<1", "pydantic>=2,<3"]
assert result["installed"] is False

No package installation occurs; compatibility still needs a real clean-environment test.

Put import-time requirements in [project.dependencies]. Put test, lint and docs tools in dependency groups or documented extras suitable for the chosen toolchain. Set requires-python, use defensible version ranges and produce a lock or fully resolved deployment artifact for applications.

Avoid listing standard-library modules. Remove unused dependencies and inspect transitive licenses/security updates. CI should create a clean environment from declarations, install the package and run tests. A successful local import after undeclared global installation proves little.

The FDE for Freshers course connects package design to CI and container builds.

Exercise

Move a three-file script into a package, remove one undeclared dependency from the global environment and prove the clean CI install either fails clearly or succeeds from metadata.

Continue learning

This article is part of the FDE engineering foundations sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

Reference: PyPA `pyproject.toml` specification.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our FDE for Freshers programme — 6–7 months. Build your engineering foundations, then take AI from discovery to delivery.

Explore FDE for Freshers
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.