kittycad.types.File

class kittycad.types.File(payload, file_name=None, mime_type=None)[source][source]

Bases: object

Contains information for file uploads

Method generated by attrs for class File.

__init__(payload, file_name=None, mime_type=None)[source]

Method generated by attrs for class File.

Methods

__init__(payload[, file_name, mime_type])

Method generated by attrs for class File.

to_tuple()

Return a tuple representation that httpx will accept for multipart/form-data

Attributes

payload

file_name

mime_type

__annotations__ = {'file_name': typing.Optional[str], 'mime_type': typing.Optional[str], 'payload': typing.Union[typing.BinaryIO, typing.TextIO]}[source]
__attrs_attrs__ = (Attribute(name='payload', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Union[typing.BinaryIO, typing.TextIO], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='payload'), Attribute(name='file_name', default=None, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='file_name'), Attribute(name='mime_type', default=None, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='mime_type'))[source]
__dict__ = mappingproxy({'__module__': 'kittycad.types', '__annotations__': {'payload': typing.Union[typing.BinaryIO, typing.TextIO], 'file_name': typing.Optional[str], 'mime_type': typing.Optional[str]}, '__doc__': 'Contains information for file uploads', 'to_tuple': <function File.to_tuple>, '__dict__': <attribute '__dict__' of 'File' objects>, '__weakref__': <attribute '__weakref__' of 'File' objects>, '__attrs_attrs__': (Attribute(name='payload', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Union[typing.BinaryIO, typing.TextIO], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='payload'), Attribute(name='file_name', default=None, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='file_name'), Attribute(name='mime_type', default=None, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=typing.Optional[str], converter=None, kw_only=False, inherited=False, on_setattr=None, alias='mime_type')), '__repr__': <function File.__repr__>, '__eq__': <function File.__eq__>, '__ne__': <function File.__ne__>, '__lt__': <function File.__lt__>, '__le__': <function File.__le__>, '__gt__': <function File.__gt__>, '__ge__': <function File.__ge__>, '__hash__': None, '__init__': <function File.__init__>, '__match_args__': ('payload', 'file_name', 'mime_type')})[source]
__eq__(other)[source]

Method generated by attrs for class File.

__ge__(other)[source]

Method generated by attrs for class File.

__gt__(other)[source]

Method generated by attrs for class File.

__hash__ = None[source]
__init__(payload, file_name=None, mime_type=None)[source]

Method generated by attrs for class File.

__le__(other)[source]

Method generated by attrs for class File.

__lt__(other)[source]

Method generated by attrs for class File.

__match_args__ = ('payload', 'file_name', 'mime_type')[source]
__module__ = 'kittycad.types'[source]
__ne__(other)[source]

Method generated by attrs for class File.

__repr__()[source]

Method generated by attrs for class File.

file_name: Optional[str][source]
mime_type: Optional[str][source]
payload: Union[BinaryIO, TextIO][source]
to_tuple()[source][source]

Return a tuple representation that httpx will accept for multipart/form-data

Return type:

Tuple[Optional[str], Union[BinaryIO, TextIO], Optional[str]]