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]
                path

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
  --remove-literal-statements
                        Enable removing statements that are just a literal
                        (including docstrings)
  --no-remove-annotations
                        Disable removing function and variable annotations
  --no-hoist-literals   Disable replacing string and bytes literals with
                        variables
  --no-rename-locals    Disable shortening of local names
  --preserve-locals PRESERVE_LOCALS
                        Comma separated list of local names that will not be
                        shortened
  --rename-globals      Enable shortening of global names
  --preserve-globals PRESERVE_GLOBALS
                        Comma separated list of global names that will not be
                        shortened
  --no-remove-object-base
                        Disable removing object from base class list
  --no-convert-posargs-to-args
                        Disable converting positional only arguments to normal
                        arguments
  -v, --version         show program's version number and exit