Skip to content

Installation

KSeF2 requires Python 3.12 or newer.

Terminal window
pip install ksef2

With uv:

Terminal window
uv add ksef2

Install PDF support only when you need local invoice visualization:

Terminal window
pip install "ksef2[pdf]"
uv add "ksef2[pdf]"

Runtime type checks are optional and disabled by default. Enable them during development or debugging with the runtime-checks extra:

Terminal window
pip install "ksef2[runtime-checks]"
KSEF2_RUNTIME_CHECKS=1 python -c "import ksef2"
import ksef2
print(ksef2.__version__)
print(ksef2.Client)
print(ksef2.AsyncClient)