Optional Dependencies Extras

Domain: Package Ecosystem

🎯 Motivation

Not every user needs every feature. Extras let users install optional dependencies with pip install yourpkg[feature], keeping the base install lean while enabling power features on demand.

πŸ“‹ Concrete Example

In pyproject.toml: [project.optional-dependencies] plot = ["matplotlib"]. Users run pip install timeflex[plot] to get plotting support; those who do not need it install plain timeflex with no extra weight.

πŸ”— Analogy

A phone’s base model has no headphones. If you want them, you buy the β€œaudio bundle.” Most users skip it; those who want it pay a little more β€” everyone gets exactly what they need.