Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Return BinOpAdd BinOpAdd BinOpAdd BinOpAdd NameLoad Str NameLoad Str NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Num Assign NameStore TupleLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr keyword Str keyword Str If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assert Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr ImportFrom alias Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad decorator_list ClassDef bases NameLoad NameLoad body Expr Str decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr NameLoad If CompareIn NameLoad NameLoad body Pass orelse If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr Str Num CompareIn Str NameLoad body TryExcept body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Call AttributeLoad Call AttributeLoad NameLoad attr attr Str handlers ExceptHandler type NameLoad body Pass orelse TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore SubscriptStore NameLoad Index Str Call NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad If CompareNotIn Str NameLoad body If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str If UnaryOpNot Call NameLoad GeneratorExp CompareIn Str NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd NameLoad NameLoad FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list TryFinally body TryExcept body Assign NameStore Call NameLoad keyword NameLoad NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body If NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Expr Call NameLoad Raise ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Raise orelse If BoolOpAnd UnaryOpNot NameLoad CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Raise Call NameLoad Call AttributeLoad Str attr NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list
N/A N/A Utilities for HTTPie test suite. N/A os N/A sys N/A time N/A json N/A tempfile httpie ExitStatus EXIT_STATUS_LABELS httpie.context Environment httpie.core main httpie.compat bytes str N/A TESTS_ROOT N/A N/A N/A os path abspath N/A N/A N/A os path dirname __file__ N/A CRLF N/A COLOR [ N/A HTTP_OK 200 OK N/A HTTP_OK_COLOR HTTP[39m[38;5;245m/[39m[38;5;37m1.1[39m[38;5;245m [39m[38;5;37m200[39m[38;5;245m [39m[38;5;136mOK mk_config_dir N/A N/A N/A N/A N/A dirname N/A N/A tempfile mkdtemp prefix httpie_config_ N/A dirname N/A add_auth N/A N/A url auth N/A N/A N/A N/A proto rest N/A N/A url split :// 1 N/A N/A N/A N/A N/A proto :// auth @ rest N/A TestEnvironment N/A Environment N/A N/A Environment subclass with reasonable defaults for testing. N/A colors 0 N/A stdin_isatty N/A True N/A stdout_isatty True N/A is_windows False __init__ N/A N/A self N/A kwargs N/A N/A N/A stdout kwargs N/A N/A N/A kwargs N/A stdout N/A N/A tempfile TemporaryFile mode w+b prefix httpie_stdout N/A N/A stderr kwargs N/A N/A N/A kwargs N/A stderr N/A N/A tempfile TemporaryFile mode w+t prefix httpie_stderr N/A N/A N/A N/A super TestEnvironment self __init__ kwargs N/A N/A self _delete_config_dir False N/A config N/A N/A self N/A N/A N/A N/A N/A N/A N/A self config_dir startswith N/A N/A tempfile gettempdir N/A N/A N/A self config_dir N/A mk_config_dir N/A N/A self _delete_config_dir True N/A N/A N/A super TestEnvironment self config N/A property cleanup N/A N/A self N/A N/A N/A N/A self _delete_config_dir N/A N/A N/A N/A N/A self config_dir startswith N/A N/A tempfile gettempdir shutil rmtree N/A N/A rmtree N/A self config_dir N/A __del__ N/A N/A self N/A N/A N/A N/A N/A N/A N/A self cleanup N/A N/A N/A Exception N/A N/A N/A N/A BaseCLIResponse N/A object N/A N/A 
    Represents the result of simulated `$ http' invocation  via `http()`.

    Holds and provides access to:

        - stdout output: print(self)
        - stderr output: print(self.stderr)
        - exit_status output: print(self.exit_status)

     N/A stderr None N/A json None N/A exit_status None N/A BytesCLIResponse N/A bytes BaseCLIResponse N/A N/A 
    Used as a fallback when a StrCLIResponse cannot be used.

    E.g. when the output contains binary data or when it is colorized.

    `.json` will always be None.

     N/A StrCLIResponse N/A str BaseCLIResponse N/A json N/A N/A self N/A N/A N/A 
        Return deserialized JSON body, if one included in the output
        and is parseable.

         N/A N/A N/A hasattr self _json N/A N/A N/A self _json None N/A N/A COLOR self N/A N/A N/A N/A N/A N/A N/A N/A self strip startswith { N/A N/A N/A self _json N/A N/A json loads self N/A N/A N/A N/A N/A N/A self count Content-Type: 1 N/A application/json self N/A N/A N/A N/A j N/A N/A N/A self strip N/A N/A N/A N/A N/A self strip rindex N/A N/A N/A ValueError N/A N/A N/A N/A N/A N/A N/A self _json N/A N/A json loads j N/A N/A N/A ValueError N/A N/A N/A N/A self _json N/A property N/A ExitStatusError N/A Exception N/A N/A N/A http N/A N/A N/A args kwargs N/A N/A 
    Run HTTPie and capture stderr/out and exit status.

    Invoke `httpie.core.main()` with `args` and `kwargs`,
    and return a `CLIResponse` subclass instance.

    The return value is either a `StrCLIResponse`, or `BytesCLIResponse`
    if unable to decode the output.

    The response has the following attributes:

        `stdout` is represented by the instance itself (print r)
        `stderr`: text written to stderr
        `exit_status`: the exit status
        `json`: decoded JSON (if possible) or `None`

    Exceptions are propagated.

    If you pass ``error_exit_ok=True``, then error exit statuses
    won't result into an exception.

    Example:

    $ http --auth=user:password GET httpbin.org/basic-auth/user/password

        >>> httpbin = getfixture('httpbin')
        >>> r = http('-a', 'user:pw', httpbin.url + '/basic-auth/user/pw')
        >>> type(r) == StrCLIResponse
        True
        >>> r.exit_status
        0
        >>> r.stderr
        ''
        >>> 'HTTP/1.1 200 OK' in r
        True
        >>> r.json == {'authenticated': True, 'user': 'user'}
        True

     N/A error_exit_ok N/A N/A kwargs pop error_exit_ok False N/A env N/A N/A kwargs get env N/A N/A env N/A N/A env N/A kwargs N/A env N/A TestEnvironment N/A stdout N/A env stdout N/A stderr N/A env stderr N/A args N/A list args N/A args_with_config_defaults N/A args N/A N/A env config default_options N/A add_to_args N/A N/A N/A --debug args_with_config_defaults N/A N/A N/A --traceback args_with_config_defaults N/A N/A N/A N/A add_to_args append --traceback N/A N/A N/A any N/A N/A --timeout arg N/A arg args_with_config_defaults N/A N/A N/A N/A add_to_args append --timeout=3 N/A args N/A add_to_args args dump_stderr N/A N/A N/A N/A N/A N/A N/A stderr seek 0 N/A N/A N/A N/A sys stderr write N/A N/A stderr read N/A N/A N/A N/A N/A N/A exit_status N/A main args args kwargs N/A N/A --download args N/A N/A N/A N/A time sleep 0.5 N/A N/A N/A SystemExit N/A N/A error_exit_ok N/A N/A exit_status N/A ExitStatus ERROR N/A N/A N/A dump_stderr N/A N/A N/A Exception N/A N/A N/A N/A stderr seek 0 N/A N/A N/A N/A sys stderr write N/A N/A stderr read N/A N/A N/A N/A N/A error_exit_ok N/A exit_status N/A ExitStatus OK N/A N/A N/A dump_stderr N/A N/A ExitStatusError N/A N/A httpie.core.main() unexpectedly returned a non-zero exit status: {0} ({1}) format exit_status N/A EXIT_STATUS_LABELS N/A exit_status N/A N/A N/A stdout seek 0 N/A N/A N/A stderr seek 0 N/A output N/A N/A stdout read N/A N/A N/A output N/A N/A output decode utf8 N/A N/A N/A UnicodeDecodeError N/A N/A r N/A BytesCLIResponse output N/A N/A r N/A StrCLIResponse output N/A N/A r stderr N/A N/A stderr read N/A N/A r exit_status exit_status N/A N/A N/A r exit_status N/A ExitStatus OK N/A N/A N/A N/A N/A sys stderr write N/A r stderr N/A r N/A N/A N/A N/A stdout close N/A N/A N/A stderr close N/A N/A N/A env cleanup N/A