A library for interacting with the Criipto signatures GraphQL API.
Project description
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}'
)
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
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 criipto_signatures-1.31.0.tar.gz.
File metadata
- Download URL: criipto_signatures-1.31.0.tar.gz
- Upload date:
- Size: 545.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
460d4a945aecbfec5b69812bf085905857f4f485277e2c34649c7529f078f628
|
|
| MD5 |
070a1a40f55d7f4325507dc91549b4ed
|
|
| BLAKE2b-256 |
1ea9e1c21c400d00b56b23e9149a12db968b1e16b356535051d4b85acdfc07f6
|
File details
Details for the file criipto_signatures-1.31.0-py3-none-any.whl.
File metadata
- Download URL: criipto_signatures-1.31.0-py3-none-any.whl
- Upload date:
- Size: 548.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ce06afc9613230881d6e7939f80a65af56a1b0f09083820a2bd78562c64bc7
|
|
| MD5 |
f70cb9ab9db8ad629e50150cabbba807
|
|
| BLAKE2b-256 |
ccd910b02bcdb34540709123d9de58f7811e83513cc38471e42d85576fe09611
|