swimlane.core.resources.attachment module

class swimlane.core.resources.attachment.Attachment(swimlane, raw)[source]

Bases: swimlane.core.resources.base.APIResource

Abstraction of an attachment from an AttachmentsField

file_id

str – Full file ID used in download request URL

filename

str – Attachment filename

upload_date

pendulum.Pendulum – Pendulum datetime when attachment was uploaded

download(chunk_size=1024)[source]

Download attachment

Parameters:chunk_size (int) – Byte-size of chunked download request stream
Returns:Stream ready for reading containing the attachment file contents
Return type:BytesIO