Command UsageΒΆ

The pyminify command is installed with this package. It can be used to minify python files, and outputs the result to stdout.

usage: pyminify [-h] [--no-combine-imports] [--no-remove-pass]
                [--remove-literal-statements] [--no-remove-annotations]
                [--no-hoist-literals] [--no-rename-locals]
                [--preserve-locals PRESERVE_LOCALS] [--rename-globals]
                [--preserve-globals PRESERVE_GLOBALS]
                [--no-remove-object-base] [--no-convert-posargs-to-args] [-v]

Minify Python source

positional arguments:
  path                  The source file to minify. Use "-" to read from stdin

optional arguments:
  -h, --help            show this help message and exit
  --no-combine-imports  Disable combining adjacent import statements
  --no-remove-pass      Disable removing Pass statements
                        Enable removing statements that are just a literal
                        (including docstrings)
                        Disable removing function and variable annotations
  --no-hoist-literals   Disable replacing string and bytes literals with
  --no-rename-locals    Disable shortening of local names
  --preserve-locals PRESERVE_LOCALS
                        Comma separated list of local names that will not be
  --rename-globals      Enable shortening of global names
  --preserve-globals PRESERVE_GLOBALS
                        Comma separated list of global names that will not be
                        Disable removing object from base class list
                        Disable converting positional only arguments to normal
  -v, --version         show program's version number and exit