parseur.schemas.mailbox

Attributes

Classes

Metadata

Per-document metadata columns a mailbox can expose.

AIEngine

Enumeration of AI engines that can be set on a mailbox when creating or

IdentificationStatus

Identification status accepted when creating/updating a mailbox.

DateFormat

How to read ambiguous dates in documents (the input_date_format).

DecimalSeparator

Decimal separator for numbers in documents (the decimal_separator).

PageRangeSchema

SplitKeyWordsSchema

MailboxBaseSchema

Mailbox settings shared by the read and write representations.

MailboxReadSchema

Schema for a mailbox as returned by the API.

MailboxWriteSchema

Schema describing the writable fields of a mailbox.

MailboxCreateSchema

Validate/serialize the body of a POST /parser (create) request.

MailboxUpdateSchema

Validate/serialize the body of a PUT /parser/{id} (update) request.

Module Contents

parseur.schemas.mailbox.SUPPORTED_FILE_EXTENSIONS[source]
class parseur.schemas.mailbox.Metadata[source]

Bases: enum.IntFlag

Per-document metadata columns a mailbox can expose.

A IntFlag, so columns compose with | and can be enabled or disabled together (see parseur.Mailbox.set_metadata()). Single source of truth for the *_field toggles: a member maps to its API field by lowercasing its name and appending _field (see field) — 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.

ATTACHMENTS[source]
BCC[source]
CC[source]
CONTENT[source]
CREATED_DATE[source]
CREATED[source]
CREATED_TIME[source]
CREDIT_COUNT[source]
DOCUMENT_ID[source]
DOCUMENT_URL[source]
HEADERS[source]
HTML_DOCUMENT[source]
LAST_REPLY[source]
MAILBOX_ID[source]
ORIGINAL_DOCUMENT[source]
ORIGINAL_RECIPIENT[source]
PAGE_COUNT[source]
PARSING_ENGINE[source]
PROCESSED_DATE[source]
PROCESSED[source]
PROCESSED_TIME[source]
PUBLIC_DOCUMENT_URL[source]
RECEIVED_DATE[source]
RECEIVED[source]
RECEIVED_TIME[source]
RECIPIENT[source]
RECIPIENT_SUFFIX[source]
REPLY_TO[source]
SEARCHABLE_PDF[source]
SENDER[source]
SENDER_NAME[source]
SPLIT_PAGE_RANGE[source]
SPLIT_PARENT_ID[source]
SUBJECT[source]
TEMPLATE[source]
TEXT_DOCUMENT[source]
TO[source]
property field: str[source]

The mailbox schema field this column maps to (e.g. subject_field).

parseur.schemas.mailbox.MetadataReadFields[source]
parseur.schemas.mailbox.MetadataWriteFields[source]
class parseur.schemas.mailbox.AIEngine[source]

Bases: str, enum.Enum

Enumeration of AI engines that can be set on a mailbox when creating or updating it.

The values mirror the parser.ai_engine choices returned by the /bootstrap endpoint.

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).

DISABLED = 'DISABLED'[source]
GCP_AI_2_5 = 'GCP_AI_2_5'[source]
GCP_AI_3_TXT = 'GCP_AI_3_TXT'[source]
GCP_AI_2 = 'GCP_AI_2'[source]
class parseur.schemas.mailbox.IdentificationStatus[source]

Bases: str, enum.Enum

Identification status accepted when creating/updating a mailbox.

REQUESTED = 'REQUESTED'[source]
PROGRESS = 'PROGRESS'[source]
COMPLETED = 'COMPLETED'[source]
MANUAL = 'MANUAL'[source]
class parseur.schemas.mailbox.DateFormat[source]

Bases: str, enum.Enum

How to read ambiguous dates in documents (the input_date_format).

MONTH_FIRST = 'MONTH_FIRST'[source]
DAY_FIRST = 'DAY_FIRST'[source]
class parseur.schemas.mailbox.DecimalSeparator[source]

Bases: str, enum.Enum

Decimal separator for numbers in documents (the decimal_separator).

DOT = '.'[source]
COMMA = ','[source]
class parseur.schemas.mailbox.PageRangeSchema[source]

Bases: parseur.schemas.BaseSchema

start_index[source]
end_index[source]
class parseur.schemas.mailbox.SplitKeyWordsSchema[source]

Bases: parseur.schemas.BaseSchema

is_before[source]
keyword[source]
class parseur.schemas.mailbox.MailboxBaseSchema[source]

Bases: parseur.schemas.BaseSchema

Mailbox 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 MailboxReadSchema and MailboxWriteSchema.

ai_instructions[source]
decimal_separator[source]
default_timezone[source]
default_language[source]
input_date_format[source]
retention_policy[source]
allowed_extensions[source]
use_whitelist_instead_of_blacklist[source]
emails_or_domains[source]
page_range_set[source]
split_page[source]
split_page_range_set[source]
split_keywords[source]
class parseur.schemas.mailbox.MailboxReadSchema[source]

Bases: MailboxBaseSchema, MetadataReadFields

Schema for a mailbox as returned by the API.

id[source]
name[source]
email_prefix[source]
account_uuid[source]
ai_engine[source]
is_ai_split_enabled[source]
ai_split_instructions[source]
process_attachments[source]
attachments_only[source]
even_pages[source]
odd_pages[source]
document_count[source]
webhook_count[source]
template_count[source]
parser_object_count[source]
document_per_status_count[source]
last_activity[source]
template_set_last_modified[source]
parser_object_set_last_modified[source]
csv_download[source]
json_download[source]
xls_download[source]
available_webhook_set[source]
webhook_set[source]
table_set[source]
parser_object_set[source]
class parseur.schemas.mailbox.MailboxWriteSchema[source]

Bases: MailboxBaseSchema, MetadataWriteFields

Schema 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 Meta[source]
unknown[source]
ordered = True[source]
name[source]
ai_engine[source]
identification_status[source]
process_attachments[source]
attachments_only[source]
even_pages[source]
odd_pages[source]
is_ai_split_enabled[source]
ai_split_instructions[source]
allowed_extensions[source]
parser_object_set[source]
class parseur.schemas.mailbox.MailboxCreateSchema[source]

Bases: MailboxWriteSchema

Validate/serialize the body of a POST /parser (create) request.

class parseur.schemas.mailbox.MailboxUpdateSchema[source]

Bases: MailboxWriteSchema

Validate/serialize the body of a PUT /parser/{id} (update) request.

id[source]