criipto-signatures
A python SDK for Criipto Signatures.
Sign PAdeS-LTA documents using MitID, BankID or any other eID supported by Criipto.
Getting started
Requirements
This library supports python 3.13 and later.
Installation
The SDK is available on PYPI:
python3 -m pip install criipto-signatures
Configure the SDK
The SDK is available in both a sync and an async version
from criipto_signatures import (
CriiptoSignaturesSDKAsync,
CriiptoSignaturesSDKSync,
)
asyncClient = CriiptoSignaturesSDKAsync(
'{YOUR_CRIIPTO_CLIENT_ID}',
'{YOUR_CRIIPTO_CLIENT_SECRET}'
)
syncClient = CriiptoSignaturesSDKSync(
'{YOUR_CRIIPTO_CLIENT_ID}',
'{YOUR_CRIIPTO_CLIENT_SECRET}'
)
Overriding the GraphQL endpoint
By default the SDK targets https://signatures.idura.app/v1/graphql. You can override the endpoint by passing an endpoint argument to either client:
from criipto_signatures import CriiptoSignaturesSDKAsync
client = CriiptoSignaturesSDKAsync(
'{YOUR_CRIIPTO_CLIENT_ID}',
'{YOUR_CRIIPTO_CLIENT_SECRET}',
endpoint='https://signatures.idura.app/v1/graphql',
)
Basic example
from criipto_signatures import CriiptoSignaturesSDKAsync
from criipto_signatures.models import (
CreateSignatureOrderInput,
DocumentInput,
PadesDocumentInput,
DocumentStorageMode,
AddSignatoryInput,
CloseSignatureOrderInput,
)
client = CriiptoSignaturesSDKAsync(
'{YOUR_CRIIPTO_CLIENT_ID}',
'{YOUR_CRIIPTO_CLIENT_SECRET}'
)
# Create signature order
signatureOrder = await client.createSignatureOrder(
CreateSignatureOrderInput(
documents=[
DocumentInput(
pdf=PadesDocumentInput(
title="My document",
blob=data, # bytes object, or a base64 encoded string
storageMode=DocumentStorageMode.Temporary,
)
)
]
)
)
# Add signatory to signature order
signatory = await client.addSignatory(
AddSignatoryInput(
signatureOrderId=signatureOrder.id
)
)
print(signatory.href)
# ... Wait for the signatory to sign
# And close the order
await client.closeSignatureOrder(
CloseSignatureOrderInput(
signatureOrderId=signatureOrder.id,
retainDocumentsForDays=1
)
)
For a more complete example, see the example project
Metadata
Release files for criipto-signatures 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| criipto_signatures-2.0.1.tar.gz | 546.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| criipto_signatures-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / criipto_signatures-2.0.1.tar.gz
| Download URL | criipto_signatures-2.0.1.tar.gz |
|---|---|
| Size | 546.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15552abffa526b053ef0825c22723021c4600c924c90be3eb49bd916e5340e41
|
|
BLAKE2b-256 checksum How to use checksums |
47915e86983fa6e0ad34e8c100fb1241042293e6eb3aad179a21502e413e09bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.5
|
Release files / criipto_signatures-2.0.1-py3-none-any.whl
| Download URL | criipto_signatures-2.0.1-py3-none-any.whl |
|---|---|
| Size | 549.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ab47550a0b483e548309ba7e823162f392ed49e0f65657195180f9919cc08a8
|
|
BLAKE2b-256 checksum How to use checksums |
3daf94f202d9ccd4a0faf8ed4e5ce9303571098437656d571134b0f427dd8136
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.5
|
Security for criipto-signatures 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.