parseur.schemas.mailbox¶
Attributes¶
Classes¶
Per-document metadata columns a mailbox can expose. |
|
Enumeration of AI engines that can be set on a mailbox when creating or |
|
Identification status accepted when creating/updating a mailbox. |
|
How to read ambiguous dates in documents (the |
|
Decimal separator for numbers in documents (the |
|
Mailbox settings shared by the read and write representations. |
|
Schema for a mailbox as returned by the API. |
|
Schema describing the writable fields of a mailbox. |
|
Validate/serialize the body of a |
|
Validate/serialize the body of a |
Module Contents¶
- class parseur.schemas.mailbox.Metadata[source]¶
Bases:
enum.IntFlagPer-document metadata columns a mailbox can expose.
A
IntFlag, so columns compose with|and can be enabled or disabled together (seeparseur.Mailbox.set_metadata()). Single source of truth for the*_fieldtoggles: a member maps to its API field by lowercasing its name and appending_field(seefield) — e.g.Metadata.SUBJECT->"subject_field". Both the read and write mailbox schemas are derived from this enum so the column list lives in one place.
- class parseur.schemas.mailbox.AIEngine[source]¶
Bases:
str,enum.EnumEnumeration of AI engines that can be set on a mailbox when creating or updating it.
The values mirror the
parser.ai_enginechoices returned by the/bootstrapendpoint.Members:
DISABLED: No AI engine (template-based parsing only).
GCP_AI_2_5: AI Text engine v2.5 (analyzes extracted text).
GCP_AI_3_TXT: AI Text engine v3 (analyzes extracted text).
GCP_AI_2: AI Vision engine v3 (understands layout and images).
- class parseur.schemas.mailbox.IdentificationStatus[source]¶
Bases:
str,enum.EnumIdentification status accepted when creating/updating a mailbox.
- class parseur.schemas.mailbox.DateFormat[source]¶
Bases:
str,enum.EnumHow to read ambiguous dates in documents (the
input_date_format).
- class parseur.schemas.mailbox.DecimalSeparator[source]¶
Bases:
str,enum.EnumDecimal separator for numbers in documents (the
decimal_separator).
- class parseur.schemas.mailbox.PageRangeSchema[source]¶
Bases:
parseur.schemas.BaseSchema
- class parseur.schemas.mailbox.SplitKeyWordsSchema[source]¶
Bases:
parseur.schemas.BaseSchema
- class parseur.schemas.mailbox.MailboxBaseSchema[source]¶
Bases:
parseur.schemas.BaseSchemaMailbox settings shared by the read and write representations.
These fields have the same definition whether a mailbox is read from the API or sent to it, so they are declared once here and inherited by both
MailboxReadSchemaandMailboxWriteSchema.
- class parseur.schemas.mailbox.MailboxReadSchema[source]¶
Bases:
MailboxBaseSchema,MetadataReadFieldsSchema for a mailbox as returned by the API.
- class parseur.schemas.mailbox.MailboxWriteSchema[source]¶
Bases:
MailboxBaseSchema,MetadataWriteFieldsSchema describing the writable fields of a mailbox.
Used to validate and serialize the request body sent when creating or updating a mailbox. Every field is optional, but unknown fields are rejected so that typos and read-only fields never reach the API silently.
- class parseur.schemas.mailbox.MailboxCreateSchema[source]¶
Bases:
MailboxWriteSchemaValidate/serialize the body of a
POST /parser(create) request.
- class parseur.schemas.mailbox.MailboxUpdateSchema[source]¶
Bases:
MailboxWriteSchemaValidate/serialize the body of a
PUT /parser/{id}(update) request.