"Fossies" - the Fresh Open Source Software Archive

Member "http-prompt-2.1.0/http_prompt/options.py" (5 Mar 2021, 2591 Bytes) of package /linux/www/http-prompt-2.1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "options.py" see the Fossies "Dox" file reference documentation.

    1 """Meta data for HTTPie options."""
    2 
    3 FLAG_OPTIONS = [
    4     ('--body', 'Print only response body'),
    5     ('--check-status', 'Check HTTP status code'),
    6     ('--continue', 'Resume an interrupted download'),
    7     ('--debug', 'Print debug information'),
    8     ('--download', 'Download as a file'),
    9     ('--follow', 'Allow full redirects'),
   10     ('--form', 'Send as form fields'),
   11     ('--headers', 'Print only response headers'),
   12     ('--help', 'Show tool (HTTPie, cURL) help message'),
   13     ('--ignore-stdin', 'Do not read stdin'),
   14     ('--json', 'Send as a JSON object (default)'),
   15     ('--stream', 'Stream the output'),
   16     ('--traceback', 'Print exception traceback'),
   17     ('--verbose', 'Print the whole request and response'),
   18     ('--version', 'Show version'),
   19     ('-b', 'Shorthand for --body'),
   20     ('-c', 'Shorthand for --continue'),
   21     ('-d', 'Shorthand for --download'),
   22     ('-f', 'Shorthand for --form'),
   23     ('-h', 'Shorthand for --headers'),
   24     ('-j', 'Shorthand for --json'),
   25     ('-S', 'Shorthand for --stream'),
   26     ('-v', 'Shorthand for --verbose'),
   27 ]
   28 
   29 VALUE_OPTIONS = [
   30     ('--auth', 'Do authentication'),
   31     ('--auth-type', 'Authentication mechanism to be used'),
   32     ('--cert', 'Specify client SSL certificate'),
   33     ('--cert-key', 'The private key to use with SSL'),
   34     ('--output', 'Save output to a file'),
   35     ('--pretty', 'Control output processing'),
   36     ('--print', 'Specify what output should contain'),
   37     ('--proxy', 'Specify proxy URL'),
   38     ('--session', 'Create, or reuse and update a session'),
   39     ('--session-read-only', 'Create or read a session'),
   40     ('--style', 'Output coloring style'),
   41     ('--timeout', 'Connection timeout in seconds'),
   42     ('--verify', 'Set to "no" to skip SSL certificate checking'),
   43     ('-a', 'Shorthand for --auth'),
   44     ('-o', 'Shorthand for --output'),
   45     ('-p', 'Shorthand for --print'),
   46     ('-s', 'Shorthand for --style'),
   47 ]
   48 
   49 PRETTY_CHOICES = ('all', 'colors', 'format', 'none')
   50 
   51 STYLE_CHOICES = ('algol', 'algol_nu', 'autumn', 'borland', 'bw', 'colorful',
   52                  'default', 'emacs', 'friendly', 'fruity', 'igor', 'lovelace',
   53                  'manni', 'monokai', 'murphy', 'native', 'paraiso-dark',
   54                  'paraiso-light', 'pastie', 'perldoc', 'rrt', 'solarized',
   55                  'tango', 'trac', 'vim', 'vs', 'xcode')
   56 
   57 AUTH_TYPE_CHOICES = ('basic', 'digest')
   58 
   59 VERIFY_CHOICES = ('no', 'yes')
   60 
   61 OPTION_VALUE_CHOICES = {
   62     '--auth-type': AUTH_TYPE_CHOICES,
   63     '--pretty': PRETTY_CHOICES,
   64     '--style': STYLE_CHOICES,
   65     '--verify': VERIFY_CHOICES,
   66     '-p': PRETTY_CHOICES,
   67     '-s': STYLE_CHOICES,
   68 }