Client SDK for KSeF API v2
Project description
KSeF Client Python
ksef-client-python jest repozytorium biblioteki (SDK) publikowanej na PyPI jako: ksef-client.
Dokumentacja SDK (kanonicznie w repozytorium): https://github.com/smekcio/ksef-client-python/blob/main/docs/README.md
Zakres
- Klienci API (
KsefClient,AsyncKsefClient) mapujący wywołania na endpointy KSeF. - Warstwa workflow (
ksef_client.services.workflows) porządkująca scenariusze (uwierzytelnianie, sesje online/batch, eksport). - Narzędzia kryptograficzne i pomocnicze (AES/ZIP/Base64Url, linki weryfikacyjne, QR).
- Uwierzytelnianie tokenem KSeF oraz podpisem XAdES (w tym
XadesKeyPairdla PKCS#12 lub zestawu PEM+hasło).
Zachowania protokołu (m.in. pre-signed URL bez nagłówka Authorization, obsługa Retry-After dla 429) są opisane w dokumentacji i odwzorowane w modelach wyjątków.
Wymagania
- Python
>= 3.10
Instalacja (PyPI)
pip install ksef-client
Opcjonalne dodatki (extras):
pip install "ksef-client[xml,qr]"
xml– podpis XAdES (lxml,xmlsec)qr– generowanie PNG z kodami QR (qrcode,pillow)
Instalacja (developerska, lokalnie)
pip install -e .
Dokumentacja
Dokumentacja pakietu znajduje się w katalogu docs/:
- Indeks:
https://github.com/smekcio/ksef-client-python/blob/main/docs/README.md - Start:
https://github.com/smekcio/ksef-client-python/blob/main/docs/getting-started.md - Konfiguracja:
https://github.com/smekcio/ksef-client-python/blob/main/docs/configuration.md - Błędy i retry:
https://github.com/smekcio/ksef-client-python/blob/main/docs/errors.md - API (endpointy):
https://github.com/smekcio/ksef-client-python/blob/main/docs/api/README.md - Workflows:
https://github.com/smekcio/ksef-client-python/blob/main/docs/workflows/README.md - Usługi:
https://github.com/smekcio/ksef-client-python/blob/main/docs/services/README.md - Utils:
https://github.com/smekcio/ksef-client-python/blob/main/docs/utils/README.md - Przykłady (skrypty):
https://github.com/smekcio/ksef-client-python/blob/main/docs/examples/README.md
Narzędzia developerskie
tools/generate_openapi_models.py– generacjasrc/ksef_client/openapi_models.pyna podstawieksef-docs/open-api.json.tools/lint.py– lokalny runner jakości (m.in.compileall,pip check, opcjonalnieruffimypy).
Testy
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ksef_client-0.2.0.tar.gz.
File metadata
- Download URL: ksef_client-0.2.0.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2a53c9bd0f5b1b0c19c7b5c23be966e62a95e12971f4396ef8fcaf0c9c06a93
|
|
| MD5 |
04c58513a18bdaf812e782e14d67586d
|
|
| BLAKE2b-256 |
c4352c0d32ed7ec8e950dab162a034e103a25ff279d8b4426d920057d097bed5
|
Provenance
The following attestation bundles were made for ksef_client-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on smekcio/ksef-client-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ksef_client-0.2.0.tar.gz -
Subject digest:
b2a53c9bd0f5b1b0c19c7b5c23be966e62a95e12971f4396ef8fcaf0c9c06a93 - Sigstore transparency entry: 798573092
- Sigstore integration time:
-
Permalink:
smekcio/ksef-client-python@16278cd5a4e2439c7b82a3854622c5bbe835ab25 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/smekcio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@16278cd5a4e2439c7b82a3854622c5bbe835ab25 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ksef_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ksef_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87c4419f00e57209dacd0699f9d1d30236c58d26f1933787d7fc29968a73a150
|
|
| MD5 |
1868373518205174238613a3935d8d04
|
|
| BLAKE2b-256 |
54d94c10bd719827f05c15d8795fd7cce245f5f09f5ba49e9bc4d795940c1477
|
Provenance
The following attestation bundles were made for ksef_client-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on smekcio/ksef-client-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ksef_client-0.2.0-py3-none-any.whl -
Subject digest:
87c4419f00e57209dacd0699f9d1d30236c58d26f1933787d7fc29968a73a150 - Sigstore transparency entry: 798573098
- Sigstore integration time:
-
Permalink:
smekcio/ksef-client-python@16278cd5a4e2439c7b82a3854622c5bbe835ab25 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/smekcio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@16278cd5a4e2439c7b82a3854622c5bbe835ab25 -
Trigger Event:
push
-
Statement type: