Skip to content

Batch service: Prepare batch

Build a ZIP package, split it, and encrypt each upload part.

Called on auth.batch
Source src/ksef2/services/batch.py:59 Generated from async source src/ksef2/services/async_batch.py
auth.batch.prepare_batch
auth.batch.prepare_batch(*, invoices: Iterable[BatchInvoice], form_code: FormSchema = FormSchema.FA3, offline_mode: bool = False, max_part_size: int = MAX_BATCH_PART_SIZE) -> PreparedBatch

Returns

PreparedBatch

Parameters

invoices Iterable[BatchInvoice]
required / keyword-only
form_code FormSchema
default FormSchema.FA3 / keyword-only
offline_mode bool
default False / keyword-only
max_part_size int
default MAX_BATCH_PART_SIZE / keyword-only
Called on auth.batch
Source src/ksef2/services/async_batch.py:60 Authored source
await auth.batch.prepare_batch
await auth.batch.prepare_batch(*, invoices: Iterable[BatchInvoice], form_code: FormSchema = FormSchema.FA3, offline_mode: bool = False, max_part_size: int = MAX_BATCH_PART_SIZE) -> PreparedBatch

Returns

PreparedBatch

Parameters

invoices Iterable[BatchInvoice]
required / keyword-only
form_code FormSchema
default FormSchema.FA3 / keyword-only
offline_mode bool
default False / keyword-only
max_part_size int
default MAX_BATCH_PART_SIZE / keyword-only