kittycad.types.Response

class kittycad.types.Response(status_code, content, headers, parsed)[source][source]

Bases: Generic[T]

A response from an endpoint

Method generated by attrs for class Response.

__init__(status_code, content, headers, parsed)[source]

Method generated by attrs for class Response.

Methods

__init__(status_code, content, headers, parsed)

Method generated by attrs for class Response.

Attributes

status_code

content

headers

parsed

__annotations__ = {'content': <class 'bytes'>, 'headers': typing.MutableMapping[str, str], 'parsed': typing.Optional[~T], 'status_code': <class 'int'>}[source]
__attrs_attrs__ = (Attribute(name='status_code', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'int'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='status_code'), Attribute(name='content', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'bytes'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='content'), Attribute(name='headers', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.MutableMapping[str, str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='headers'), Attribute(name='parsed', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[~T], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='parsed'))[source]
classmethod __class_getitem__(params)[source]

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ....

__dict__ = mappingproxy({'__module__': 'kittycad.types', '__annotations__': {'status_code': <class 'int'>, 'content': <class 'bytes'>, 'headers': typing.MutableMapping[str, str], 'parsed': typing.Optional[~T]}, '__doc__': 'A response from an endpoint', '__orig_bases__': (typing.Generic[~T],), '__dict__': <attribute '__dict__' of 'Response' objects>, '__weakref__': <attribute '__weakref__' of 'Response' objects>, '__parameters__': (~T,), '__attrs_attrs__': (Attribute(name='status_code', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'int'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='status_code'), Attribute(name='content', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=<class 'bytes'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='content'), Attribute(name='headers', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.MutableMapping[str, str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='headers'), Attribute(name='parsed', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[~T], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='parsed')), '__repr__': <function Response.__repr__>, '__eq__': <function Response.__eq__>, '__ne__': <function Response.__ne__>, '__lt__': <function Response.__lt__>, '__le__': <function Response.__le__>, '__gt__': <function Response.__gt__>, '__ge__': <function Response.__ge__>, '__hash__': None, '__init__': <function Response.__init__>, '__match_args__': ('status_code', 'content', 'headers', 'parsed')})[source]
__eq__(other)[source]

Method generated by attrs for class Response.

__ge__(other)[source]

Method generated by attrs for class Response.

__gt__(other)[source]

Method generated by attrs for class Response.

__hash__ = None[source]
__init__(status_code, content, headers, parsed)[source]

Method generated by attrs for class Response.

classmethod __init_subclass__(*args, **kwargs)[source]

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__(other)[source]

Method generated by attrs for class Response.

__lt__(other)[source]

Method generated by attrs for class Response.

__match_args__ = ('status_code', 'content', 'headers', 'parsed')[source]
__module__ = 'kittycad.types'[source]
__ne__(other)[source]

Method generated by attrs for class Response.

__orig_bases__ = (typing.Generic[~T],)[source]
__parameters__ = (~T,)[source]
__repr__()[source]

Method generated by attrs for class Response.

__slots__ = ()[source]
_is_protocol = False[source]
content: bytes[source]
headers: MutableMapping[str, str][source]
parsed: Optional[TypeVar(T)][source]
status_code: int[source]