parseur.cli

Attributes

Functions

progress_printer()

Return an on_poll(elapsed, status) callback rendering a progress bar.

write_download(content, output)

Write downloaded bytes to output if given, otherwise to stdout.

headers_to_dict(headers)

cli()

Parseur CLI - manage Parseur.com from the command line.

init(api_key, api_base)

Initialize the CLI with your API token and optional base URL.

list_mailboxes(search, order_by, descending)

List all mailboxes with optional filtering and sorting.

get_mailbox(mailbox_id)

Get details of a mailbox.

get_mailbox_schema(mailbox_id)

Get schema of a mailbox.

download_mailbox(mailbox_id, fmt, output)

Download all parsed results of a mailbox (one row per document).

list_parser_fields(mailbox_id)

List the parser fields configured on a mailbox.

download_field(mailbox_id, field_id, fmt, output)

Download a table field's rows (one row per line item).

list_export_configs(mailbox_id)

List the export configurations of a mailbox.

download_export(mailbox_id, export_config_id, fmt, output)

Download a custom export configuration's file.

list_documents(mailbox_id, search, order_by, ...)

List all documents in a mailbox with optional filtering, sorting, and result inclusion.

get_document(document_id)

Get details of a document.

reprocess_document(document_id)

Reprocess a document.

skip_document(document_id)

Skip a document.

copy_document(document_id, target_mailbox_id)

Copy a document to another mailbox.

split_document(document_id)

Split a multi-page document per the mailbox's split settings.

reverse_split_document(document_id)

Undo a previous split of a document.

get_document_logs(document_id)

Get logs of a document.

delete_document(document_id)

Delete a document.

upload_file(mailbox_id, file_path, wait)

Upload a document file to a mailbox (optionally wait for processing).

upload_folder(mailbox_id, folder_path)

Upload all files from a glob path.

upload_text(recipient, subject, sender, body_html, ...)

Upload text content to a mailbox (optionally wait for processing).

create_webhook(event, target_url, mailbox_id, ...)

Create a new custom webhook for your Parseur account.

get_webhook(webhook_id)

Get details of a webhook.

delete_webhook(webhook_id)

Delete a registered webhook by its ID.

enable_webhook(mailbox_id, webhook_id)

Enable a webhook for the specified mailbox.

pause_webhook(mailbox_id, webhook_id)

Pause a webhook for the specified mailbox.

list_webhooks()

List all registered webhooks.

listen(event, mailbox_id, table_field_id, header, ...)

Listen to a Parseur event in real time with a temporary webhook.

mcp()

Run the Parseur MCP server (requires the [mcp] extra).

Module Contents

parseur.cli.WAIT_OPTION[source]
parseur.cli.progress_printer()[source]

Return an on_poll(elapsed, status) callback rendering a progress bar.

Progress is written to stderr so stdout stays a clean JSON document.

parseur.cli.DOWNLOAD_FORMATS = ['csv', 'json', 'xlsx'][source]
parseur.cli.EXPORT_FORMATS = ['csv', 'xlsx'][source]
parseur.cli.write_download(content, output)[source]

Write downloaded bytes to output if given, otherwise to stdout.

Binary formats (xlsx) are written through the raw stdout buffer so they survive redirection, e.g. parseur download-mailbox 123 > results.csv.

parseur.cli.headers_to_dict(headers)[source]
parseur.cli.cli()[source]

Parseur CLI - manage Parseur.com from the command line.

parseur.cli.init(api_key, api_base)[source]

Initialize the CLI with your API token and optional base URL.

parseur.cli.list_mailboxes(search, order_by, descending)[source]

List all mailboxes with optional filtering and sorting.

parseur.cli.get_mailbox(mailbox_id)[source]

Get details of a mailbox.

parseur.cli.get_mailbox_schema(mailbox_id)[source]

Get schema of a mailbox.

parseur.cli.download_mailbox(mailbox_id, fmt, output)[source]

Download all parsed results of a mailbox (one row per document).

parseur.cli.list_parser_fields(mailbox_id)[source]

List the parser fields configured on a mailbox.

parseur.cli.download_field(mailbox_id, field_id, fmt, output)[source]

Download a table field’s rows (one row per line item).

parseur.cli.list_export_configs(mailbox_id)[source]

List the export configurations of a mailbox.

parseur.cli.download_export(mailbox_id, export_config_id, fmt, output)[source]

Download a custom export configuration’s file.

parseur.cli.list_documents(mailbox_id, search, order_by, descending, received_after, received_before, with_result)[source]

List all documents in a mailbox with optional filtering, sorting, and result inclusion.

parseur.cli.get_document(document_id)[source]

Get details of a document.

parseur.cli.reprocess_document(document_id)[source]

Reprocess a document.

parseur.cli.skip_document(document_id)[source]

Skip a document.

parseur.cli.copy_document(document_id, target_mailbox_id)[source]

Copy a document to another mailbox.

parseur.cli.split_document(document_id)[source]

Split a multi-page document per the mailbox’s split settings.

parseur.cli.reverse_split_document(document_id)[source]

Undo a previous split of a document.

parseur.cli.get_document_logs(document_id)[source]

Get logs of a document.

parseur.cli.delete_document(document_id)[source]

Delete a document.

parseur.cli.upload_file(mailbox_id, file_path, wait)[source]

Upload a document file to a mailbox (optionally wait for processing).

parseur.cli.upload_folder(mailbox_id, folder_path)[source]

Upload all files from a glob path.

parseur.cli.upload_text(recipient, subject, sender, body_html, body_plain, wait)[source]

Upload text content to a mailbox (optionally wait for processing).

parseur.cli.create_webhook(event, target_url, mailbox_id, table_field_id, header, name)[source]

Create a new custom webhook for your Parseur account.

parseur.cli.get_webhook(webhook_id)[source]

Get details of a webhook.

parseur.cli.delete_webhook(webhook_id)[source]

Delete a registered webhook by its ID.

This command permanently removes the webhook from your Parseur account.

parseur.cli.enable_webhook(mailbox_id, webhook_id)[source]

Enable a webhook for the specified mailbox.

Activates the webhook by adding it to the mailbox.

parseur.cli.pause_webhook(mailbox_id, webhook_id)[source]

Pause a webhook for the specified mailbox.

Removes the webhook from the mailbox without deleting it.

parseur.cli.list_webhooks()[source]

List all registered webhooks.

parseur.cli.listen(event, mailbox_id, table_field_id, header, name, redirect_url, redirect_port, silent)[source]

Listen to a Parseur event in real time with a temporary webhook.

Example:

parseur listen --event document.processed --mailbox-id 12345
parseur listen --event document.processed --mailbox-id 12345 --redirect-url http://localhost --redirect-port 8000
parseur.cli.mcp()[source]

Run the Parseur MCP server (requires the [mcp] extra).

Exposes Parseur as Model Context Protocol tools over stdio so AI assistants (Claude Desktop, Cursor, …) can manage your mailboxes, documents, and webhooks.

Install with: pip install “parseur-py[mcp]”