docopt
Pythonic argument parser, that will make you smile
Decision gist · record as of 2026-08-14
No—do not install for new projects. The package is abandoned with no maintenance since 2014-06-16 and was only tested on Python 2.5, 2.6, 2.7, 3.2, and 3.3. Install only if you are maintaining legacy code that already depends on docopt 0.6.2 and cannot be migrated.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Package is abandoned; no updates since 2014.
- Compatibility with modern Python versions is untested and unsupported.
- High install friction: the package is abandoned (last release 2014-06-16, 4442 days ago) with no active maintenance.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2014-06-16 (4442 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 18,662,111 downloads/mo, #1,080 on PyPI
Alternatives
Verify before relying
pip install docopt==0.6.2
from docopt import docopt
if __name__ == '__main__':
doc = """Usage: prog [-h] [--verbose]
Options:
-h --help Show this screen.
--verbose Verbose output.
"""
arguments = docopt(doc)
print(arguments)- Whether the package actually works on Python versions beyond 3.3 despite lack of testing or maintenance.
- Whether any known issues or edge cases have emerged since last release that would affect current use.
What it is and what it does
docopt is a command-line argument parser that inverts the typical workflow: instead of writing parser code to match your help message, you write a clean help message in your module docstring and docopt generates the parser from it. It parses the usage pattern and option descriptions from your docstring, validates command invocations against that pattern, and returns a dictionary of parsed arguments and options.
The package has no runtime dependencies and is small enough to embed directly in a project. However, it is abandoned—the last release was 2014-06-16 and was only tested on Python 2.5, 2.6, 2.7, 3.2, and 3.3. While it may still work on modern Python, there is no active maintenance, no bug fixes, and no forward compatibility guarantees.
Use it for
- Build a simple CLI tool where the help message is your single source of truth for argument parsing.
- Quickly prototype a command-line utility without writing boilerplate argument-parsing code.
- Create a CLI with multiple exclusive command patterns (e.g., different subcommands with different options).
- Add argument parsing to a small script without introducing a heavy dependency.
- Parse custom argument vectors for testing or programmatic CLI invocation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No—do not install for new projects.
The package is abandoned with no maintenance since 2014-06-16 and was only tested on Python 2.5, 2.6, 2.7, 3.2, and 3.3. Install only if you are maintaining legacy code that already depends on docopt 0.6.2 and cannot be migrated.
Install
docopt on PyPI
Before you install
High install friction: the package is abandoned (last release 2014-06-16, 4442 days ago) with no active maintenance. It has zero runtime dependencies, making installation itself straightforward, but the lack of ongoing support poses a long-term risk for bug fixes or compatibility updates.
Package is abandoned; no updates since 2014. Compatibility with modern Python versions is untested and unsupported.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install docopt==0.6.2
from docopt import docopt
if __name__ == '__main__':
doc = """Usage: prog [-h] [--verbose]
Options:
-h --help Show this screen.
--verbose Verbose output.
"""
arguments = docopt(doc)
print(arguments)
Verify before relying
- Whether the package actually works on Python versions beyond 3.3 despite lack of testing or maintenance.
- Whether any known issues or edge cases have emerged since last release that would affect current use.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 4,442 days since the last release |
| First released | |
| Downloads | 18,662,111 / month, #1,080 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Topic :: Utilities |
Evidence: docopt-0.6.2.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “command-line argument parsing”
- docoptParses command-line arguments based on a help message docstring,…
- argparse-extExtends Python's standard argparse module with additional…
- python-gflagsParses command-line flags and arguments for Python programs, but this…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also argparse · docopt-ng · targ · autocommand · argparse-dataclass · rich-argparse · cleo · flynt · entrypoint2 · argparse-ext