Overview¶
This reference is generated from the source docstrings. It is grouped by API area, mirroring the
exported names in docopt2.__all__.
- docopt & results - the
docoptentry point, theArgumentsmapping, theSourceprovenance enum, the inverseformat_argv, andparse_tree. - Cli base class - the class-first
Cli.parse(...)API. - Subcommand dispatch -
Dispatch, routing a matched command path to a handler. - Schema stubs -
generate_stub, codegen for a typed schema. - Usage linting -
check, the static usage-grammar linter. - Formatting usage -
format_usage, aligning and tidying theOptions:block. - Compatibility checking -
check_compat, reporting breaking changes between two usages. - Example generation -
generate_examples, sampling accepted argument vectors. - Config templates -
generate_config_template, scaffolding a TOML config file. - Shell completion -
completeandgenerate_completion. - Exceptions -
DocoptExitandDocoptLanguageError. - Usage grammar - the pattern node classes and the low-level parser primitives, exported for tools that reach into the parse tree.
For a task-oriented view, start from the Guides instead.