
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
The argparse module makes it easy to write user friendly command line interfaces.
The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv. The argparse module also automatically generates help and usage messages and issues errors when users give the program invalid arguments.
As of Python >= 2.7 and >= 3.2, the argparse module is maintained within the Python standard library. For users who still need to support Python < 2.7 or < 3.2, it is also provided as a separate package, which tries to stay compatible with the module in the standard library, but also supports older Python versions.
Also, we can fix bugs here for users who are stuck on some non-current python version, like e.g. 3.2.3 (which has bugs that were fixed in a later 3.2.x release).
argparse is licensed under the Python license, for details see LICENSE.txt.
argparse should work on Python >= 2.3, it was tested on:
Try one of these:
python setup.py install
easy_install argparse
pip install argparse
putting argparse.py in some directory listed in sys.path should also work
If you find a bug in argparse (pypi), please try to reproduce it with latest python 2.7 and 3.4 (and use argparse from stdlib).
If it happens there also, please file a bug in the python.org issue tracker. If it does not happen there, file a bug in the argparse package issue tracker.
FAQs
Python command-line parsing library
We found that argparse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.