pydalle.functional.api.response package
Submodules
This module contains dataclasses which represent the Labs API’s response objects.
- class pydalle.functional.api.response.labs.BillingInfo(raw: dict, aggregate_credits: int, next_grant_ts: int, breakdown: pydalle.functional.api.response.labs.Breakdown)
Bases:
object- aggregate_credits: int
- classmethod from_dict(d: dict) BillingInfo
- next_grant_ts: int
- raw: dict
- class pydalle.functional.api.response.labs.Breakdown(raw: dict, free: int)
Bases:
object- free: int
- raw: dict
- class pydalle.functional.api.response.labs.Collection(raw: dict, object: Literal['collection'], id: str, created: int, name: str, description: str, is_public: bool, alias: str)
Bases:
object- alias: str
- created: int
- description: str
- classmethod from_dict(d: dict) Collection
- id: str
- is_public: bool
- name: str
- object: Literal['collection']
- raw: dict
- class pydalle.functional.api.response.labs.Features(raw: dict, public_endpoints: bool, image_uploads: bool)
Bases:
object- image_uploads: bool
- public_endpoints: bool
- raw: dict
- class pydalle.functional.api.response.labs.Generation(raw: dict, id: str, object: Literal['generation'], created: int, generation_type: Literal['ImageGeneration'], generation: 'GenerationData', task_id: str, prompt_id: str, is_public: bool)
Bases:
object- created: int
- classmethod from_dict(d: dict) Generation
- generation: GenerationData
- generation_type: Literal['ImageGeneration']
- id: str
- is_public: bool
- object: Literal['generation']
- prompt_id: str
- raw: dict
- task_id: str
- class pydalle.functional.api.response.labs.GenerationData(raw: dict, image_path: str)
Bases:
object- classmethod from_dict(d: dict) GenerationData
- image_path: str
- raw: dict
- class pydalle.functional.api.response.labs.GenerationList(raw: dict, object: Literal['list'], data: List[ForwardRef('Generation')])
Bases:
object- data: List[Generation]
- classmethod from_dict(d: dict) GenerationList
- object: Literal['list']
- raw: dict
- class pydalle.functional.api.response.labs.Login(raw: dict, object: Literal['login'], user: pydalle.functional.api.response.labs.User, invites: List[Any], features: pydalle.functional.api.response.labs.Features, billing_info: pydalle.functional.api.response.labs.BillingInfo)
Bases:
object- billing_info: BillingInfo
- invites: List[Any]
- object: Literal['login']
- raw: dict
- class pydalle.functional.api.response.labs.Organization(raw: dict, object: Literal['organization'], id: str, created: int, title: str, name: str, description: str, personal: bool, is_default: bool, role: str, groups: List[str])
Bases:
object- created: int
- description: str
- classmethod from_dict(d: dict) Organization
- groups: List[str]
- id: str
- is_default: bool
- name: str
- object: Literal['organization']
- personal: bool
- raw: dict
- role: str
- title: str
- class pydalle.functional.api.response.labs.OrganizationList(raw: dict, object: Literal['list'], data: List[pydalle.functional.api.response.labs.Organization])
Bases:
object- data: List[Organization]
- classmethod from_dict(d: dict) OrganizationList
- object: Literal['list']
- raw: dict
- class pydalle.functional.api.response.labs.Prompt(raw: dict, id: str, object: Literal['prompt'], created: int, prompt_type: Union[Literal['CaptionlessImagePrompt'], Literal['CaptionImagePrompt'], Literal['CaptionPrompt']], prompt: 'PromptData', parent_generation_id: Optional[str] = None)
Bases:
object- created: int
- id: str
- object: Literal['prompt']
- parent_generation_id: Optional[str] = None
- prompt: PromptData
- prompt_type: Union[Literal['CaptionlessImagePrompt'], Literal['CaptionImagePrompt'], Literal['CaptionPrompt']]
- raw: dict
- class pydalle.functional.api.response.labs.PromptData(raw: dict, caption: Optional[str] = None, image_path: Optional[str] = None, masked_image_path: Optional[str] = None)
Bases:
object- caption: Optional[str] = None
- classmethod from_dict(d: dict) PromptData
- image_path: Optional[str] = None
- masked_image_path: Optional[str] = None
- raw: dict
- class pydalle.functional.api.response.labs.Session(raw: dict, sensitive_id: str, object: Literal['session'], created: int, last_use: int, publishable: bool)
Bases:
object- created: int
- last_use: int
- object: Literal['session']
- publishable: bool
- raw: dict
- sensitive_id: str
- class pydalle.functional.api.response.labs.StatusInformation(raw: dict, type: Optional[Literal['error']] = None, message: Optional[Literal['Your task failed as a result of our safety system.']] = None, code: Optional[Literal['task_failed_text_safety_system']] = None)
Bases:
object- code: Optional[Literal['task_failed_text_safety_system']] = None
- classmethod from_dict(d: dict) StatusInformation
- message: Optional[Literal['Your task failed as a result of our safety system.']] = None
- raw: dict
- type: Optional[Literal['error']] = None
- class pydalle.functional.api.response.labs.Task(raw: dict, object: Literal['task'], id: str, created: int, task_type: Union[Literal['inpainting'], Literal['text2im'], Literal['variations']], status: Union[Literal['succeeded'], Literal['pending'], Literal['rejected']], status_information: 'StatusInformation', prompt_id: str, generations: Optional[ForwardRef('GenerationList')], prompt: 'Prompt')
Bases:
object- created: int
- generations: Optional[GenerationList]
- id: str
- object: Literal['task']
- prompt_id: str
- raw: dict
- status: Union[Literal['succeeded'], Literal['pending'], Literal['rejected']]
- status_information: StatusInformation
- task_type: Union[Literal['inpainting'], Literal['text2im'], Literal['variations']]
- class pydalle.functional.api.response.labs.TaskList(raw: dict, object: Literal['list'], data: List[ForwardRef('Task')])
Bases:
object- object: Literal['list']
- raw: dict
- class pydalle.functional.api.response.labs.User(raw: dict, object: Literal['user'], id: str, email: str, name: str, picture: str, created: int, accepted_terms_at: int, session: pydalle.functional.api.response.labs.Session, groups: List[str], orgs: pydalle.functional.api.response.labs.OrganizationList, intercom_hash: str, accepted_terms: int, seen_upload_guidelines: int, seen_billing_onboarding: int)
Bases:
object- accepted_terms: int
- accepted_terms_at: int
- created: int
- email: str
- groups: List[str]
- id: str
- intercom_hash: str
- name: str
- object: Literal['user']
- orgs: OrganizationList
- picture: str
- raw: dict
- seen_billing_onboarding: int
- seen_upload_guidelines: int
Module contents
This package contains modules which are used handle defining the responses expected from external APIs.