|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +""" |
| 3 | + click |
| 4 | + ~~~~~ |
| 5 | +
|
| 6 | + Click is a simple Python module that wraps the stdlib's optparse to make |
| 7 | + writing command line scripts fun. Unlike other modules, it's based around |
| 8 | + a simple API that does not come with too much magic and is composable. |
| 9 | +
|
| 10 | + In case optparse ever gets removed from the stdlib, it will be shipped by |
| 11 | + this module. |
| 12 | +
|
| 13 | + :copyright: (c) 2014 by Armin Ronacher. |
| 14 | + :license: BSD, see LICENSE for more details. |
| 15 | +""" |
| 16 | + |
| 17 | +# Core classes |
| 18 | +from .core import Context, BaseCommand, Command, MultiCommand, Group, \ |
| 19 | + CommandCollection, Parameter, Option, Argument |
| 20 | + |
| 21 | +# Globals |
| 22 | +from .globals import get_current_context |
| 23 | + |
| 24 | +# Decorators |
| 25 | +from .decorators import pass_context, pass_obj, make_pass_decorator, \ |
| 26 | + command, group, argument, option, confirmation_option, \ |
| 27 | + password_option, version_option, help_option |
| 28 | + |
| 29 | +# Types |
| 30 | +from .types import ParamType, File, Path, Choice, IntRange, Tuple, \ |
| 31 | + STRING, INT, FLOAT, BOOL, UUID, UNPROCESSED |
| 32 | + |
| 33 | +# Utilities |
| 34 | +from .utils import echo, get_binary_stream, get_text_stream, open_file, \ |
| 35 | + format_filename, get_app_dir, get_os_args |
| 36 | + |
| 37 | +# Terminal functions |
| 38 | +from .termui import prompt, confirm, get_terminal_size, echo_via_pager, \ |
| 39 | + progressbar, clear, style, unstyle, secho, edit, launch, getchar, \ |
| 40 | + pause |
| 41 | + |
| 42 | +# Exceptions |
| 43 | +from .exceptions import ClickException, UsageError, BadParameter, \ |
| 44 | + FileError, Abort, NoSuchOption, BadOptionUsage, BadArgumentUsage, \ |
| 45 | + MissingParameter |
| 46 | + |
| 47 | +# Formatting |
| 48 | +from .formatting import HelpFormatter, wrap_text |
| 49 | + |
| 50 | +# Parsing |
| 51 | +from .parser import OptionParser |
| 52 | + |
| 53 | + |
| 54 | +__all__ = [ |
| 55 | + # Core classes |
| 56 | + 'Context', 'BaseCommand', 'Command', 'MultiCommand', 'Group', |
| 57 | + 'CommandCollection', 'Parameter', 'Option', 'Argument', |
| 58 | + |
| 59 | + # Globals |
| 60 | + 'get_current_context', |
| 61 | + |
| 62 | + # Decorators |
| 63 | + 'pass_context', 'pass_obj', 'make_pass_decorator', 'command', 'group', |
| 64 | + 'argument', 'option', 'confirmation_option', 'password_option', |
| 65 | + 'version_option', 'help_option', |
| 66 | + |
| 67 | + # Types |
| 68 | + 'ParamType', 'File', 'Path', 'Choice', 'IntRange', 'Tuple', 'STRING', |
| 69 | + 'INT', 'FLOAT', 'BOOL', 'UUID', 'UNPROCESSED', |
| 70 | + |
| 71 | + # Utilities |
| 72 | + 'echo', 'get_binary_stream', 'get_text_stream', 'open_file', |
| 73 | + 'format_filename', 'get_app_dir', 'get_os_args', |
| 74 | + |
| 75 | + # Terminal functions |
| 76 | + 'prompt', 'confirm', 'get_terminal_size', 'echo_via_pager', |
| 77 | + 'progressbar', 'clear', 'style', 'unstyle', 'secho', 'edit', 'launch', |
| 78 | + 'getchar', 'pause', |
| 79 | + |
| 80 | + # Exceptions |
| 81 | + 'ClickException', 'UsageError', 'BadParameter', 'FileError', |
| 82 | + 'Abort', 'NoSuchOption', 'BadOptionUsage', 'BadArgumentUsage', |
| 83 | + 'MissingParameter', |
| 84 | + |
| 85 | + # Formatting |
| 86 | + 'HelpFormatter', 'wrap_text', |
| 87 | + |
| 88 | + # Parsing |
| 89 | + 'OptionParser', |
| 90 | +] |
| 91 | + |
| 92 | + |
| 93 | +# Controls if click should emit the warning about the use of unicode |
| 94 | +# literals. |
| 95 | +disable_unicode_literals_warning = False |
| 96 | + |
| 97 | + |
| 98 | +__version__ = '6.6' |
0 commit comments