Optik is a powerful, flexible, extensible, easy-to-use commandline parsing library for Python. Using Optik, you can add intelligent, sophisticated handling of commandline options to your scripts with very little overhead. Optik implements the conventional GNU/Unix commandline syntax. Features include typed options (if you say you want an integer, you'll get an integer) and automatic help generation.
| Tags | Software Development Libraries |
|---|---|
| Licenses | BSD Original |
| Operating Systems | OS Independent POSIX |
| Implementation | Python |
Recent releases


Changes: The help-formatting code was reorganized so that it's easier to customize and extend. The notion of "option groups" was added to help with this. A "description" was added for the whole program and for each option group, to make the help more useful. The "choice" option type was added.


Changes: This release loosens the rules, so you can get away with not specifiying a 'type' or 'dest' for many options. Some code has been refactored for easier subclassing. An examples directory has been added.


Changes: This release fixes the handling of bare "--" and "-" for consistency with GNU getopt. Documentation of callback options has been expanded. Methods for querying/manipulating an OptionParser's option list have been added, as well as a standard "--version" option.


Changes: Documentation enhancements, and a fix for a bug that broke --foo="" (empty option argument) syntax.


Changes: This release allows interspersed options and positional arguments, and allows options to take multiple arguments. The test script has been split up. There is lots of refactoring that should make life easier for people subclassing Optik classes.
A security filter for vulnerable sites using regex patterns.