Overview
ksef2 is a Python SDK for Poland’s KSeF v2 API. It gives you sync and async clients, typed request models, invoice session helpers, and an FA(3) invoice builder.
Unofficial SDK. ksef2 is a community-maintained Python SDK. It is not published, endorsed, or supported by Poland’s Ministry of Finance. Use the official KSeF documentation as the authority for API behavior.
Main pages
Section titled “Main pages”- Workflow overview: task-oriented paths for clients, authentication, invoices, status, tokens, permissions, certificates, limits, public lookup, TEST data, and XAdES.
- Client setup: choose sync or async, public root branches, and authenticated workflow branches.
- Building invoices: build invoice XML with typed Python helpers.
- Sending invoices: open online or batch sessions and submit XML to KSeF.
- Admin workflows: start with tokens, then use permissions, certificates, and limits as needed.
Reference
Section titled “Reference”Use the API reference when you need signatures, return types, model names, or the exact generated sync/async variants.