Implementing dynamic, use-case dependent argparse in Python

Cpak
2 min readAug 28, 2020

Problem Statement

Python’s argparse works great for specifying dynamic arguments when a Python program is launched/run. However, as your organization’s data analytics capabilities grows, it becomes useful to specify arguments for only specific use-cases. For instance, for some analytics, you may want to specify the department name (but not the product type), and for other analytics, you may want to specify the product type (but not the department name). As the number of use-cases and analytics grows, the number of…

--

--