Skip to main content

Python command-line parsing library

Project description

The argparse module provides an easy, declarative interface for creating command line tools, which knows how to:

  • parse the arguments and flags from sys.argv
  • convert arg strings into objects for your program
  • format and print informative help messages
  • and much more…

The argparse module improves on the standard library optparse module in a number of ways including:

  • handling positional arguments
  • supporting sub-commands
  • allowing alternative option prefixes like + and /
  • handling zero-or-more and one-or-more style arguments
  • producing more informative usage messages
  • providing a much simpler interface for custom types and actions

The latest version of argparse, along with API documentation and examples can be found at:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for argparse, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size argparse-1.1.win32.msi (163.8 kB) File type Windows MSI Installer Python version any Upload date Hashes View
Filename, size (151.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page