autosignly
Python client for the Autosignly API - eIDAS electronic signatures and document workflows.
Not published yet. This package is being built. Install from source for now.
Install
pip install autosignly
Requires Python 3.10 or newer.
Quickstart
from autosignly import AutosignlyClient, Signer
with AutosignlyClient(api_key="api_key_...", api_secret="api_sct_...") as client:
document_id = client.upload_and_sign(
pdf=open("contract.pdf", "rb").read(),
document_name="Consulting agreement",
signers=[
Signer(
first_name="Anna",
last_name="Nowak",
email="anna@example.com",
country="PL",
)
],
)
print(document_id)
The key and secret decide which environment you are working in. Every environment, production or sandbox, has its own pair, so pointing a script at the sandbox is a matter of swapping credentials.
The secret must stay on your server. It must never be shipped to a browser or a mobile app.
Reading documents
document = client.get_document(document_id)
print(document.status, [s.email for s in document.signers])
for summary in client.iter_documents(status="SIGNED"):
print(summary.id, summary.name)
Downloading the file
A document carries a short-lived link to its file. The link expires, so fetch the document again for a fresh one rather than storing it.
document = client.get_document(document_id)
print(document.file_url)
pdf = client.download_document(document_id)
open("signed.pdf", "wb").write(pdf)
A document that is still being signed can be downloaded as well - it then carries only the signatures collected so far.
Tags
tag = client.create_tag("contracts")
client.set_document_tags(document_id, tag_ids=[tag.id], names=["2026"])
Setting tags replaces the whole set: tags left out are removed, and names that do not exist yet are added to the company tag pool.
Verifying webhooks
Autosignly signs every delivery. Check the signature against the raw request body, before parsing it - re-serialising the JSON changes the bytes and the signature will not match.
from autosignly import webhooks
webhooks.verify(
request.body,
request.headers["X-Webhook-Signature"],
webhook_key,
request.headers["X-Webhook-Timestamp"],
)
The signature covers the timestamp as well as the body, and a delivery older than five minutes is rejected even when its signature matches, so a captured request cannot be replayed later.
While a webhook key is being rotated a delivery carries several signatures; it is accepted when any of them matches, so rotation needs no change on your side.
verify raises InvalidSignatureError on a mismatch; webhooks.is_valid(...) returns a boolean
instead.
Errors
Every failure raises a subclass of AutosignlyError carrying the HTTP status and the error type
returned by the API.
from autosignly import AutosignlyError, NotFoundError
try:
client.get_document("does-not-exist")
except NotFoundError:
...
except AutosignlyError as error:
print(error.status_code, error.error_type, error.error_id)
Connection problems and server errors are retried automatically, with an exponential backoff and jitter. Client errors are not retried, since repeating a rejected request cannot change its outcome.
Rate limits are retried too, honouring the delay the API asks for. When that delay is longer than a
minute the call fails instead of blocking your thread, and RateLimitError.retry_after tells you
how long to wait.
The client does not implement a circuit breaker. It runs inside your process, on calls you asked
for, so refusing to even attempt one would be surprising - and your own infrastructure is the right
place for that policy. Pass your own http_client if you want to add one.
Links
- Website: https://autosignly.eu
- API documentation: https://docs.16it.eu/docs/intro/
- Source and issues: https://github.com/16it-pl/autosignly-sdk
License
Apache-2.0
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 autosignly-0.1.0.tar.gz.
File metadata
- Download URL: autosignly-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47f4185df3eedb0d540aa40502f7e0430daed062294244c96fe97eb703ef64b
|
|
| MD5 |
a1fc5faba292c254aecc4bb93e8d4a87
|
|
| BLAKE2b-256 |
fd108d35ffb3239fcb82c41bf802493f74d2cd42d4efd5f36a4acaf66937ca31
|
Provenance
The following attestation bundles were made for autosignly-0.1.0.tar.gz:
Publisher:
publish-python.yml on 16it-pl/autosignly-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autosignly-0.1.0.tar.gz -
Subject digest:
a47f4185df3eedb0d540aa40502f7e0430daed062294244c96fe97eb703ef64b - Sigstore transparency entry: 2570403885
- Sigstore integration time:
-
Permalink:
16it-pl/autosignly-sdk@b401255c065099c358fa9f4231217bd836ca1487 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/16it-pl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b401255c065099c358fa9f4231217bd836ca1487 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file autosignly-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autosignly-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8db24d5fc8e48bfa20a4e3cd6cf3da9b52ebe4ee7230c3969762d971c31b28b7
|
|
| MD5 |
4f5424490b2e27123da6295663a42926
|
|
| BLAKE2b-256 |
a7fa3e46d9b69ae9741b1c1a257c23c9af8d0b2ee4830aea606a9712bdaadf01
|
Provenance
The following attestation bundles were made for autosignly-0.1.0-py3-none-any.whl:
Publisher:
publish-python.yml on 16it-pl/autosignly-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autosignly-0.1.0-py3-none-any.whl -
Subject digest:
8db24d5fc8e48bfa20a4e3cd6cf3da9b52ebe4ee7230c3969762d971c31b28b7 - Sigstore transparency entry: 2570403972
- Sigstore integration time:
-
Permalink:
16it-pl/autosignly-sdk@b401255c065099c358fa9f4231217bd836ca1487 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/16it-pl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b401255c065099c358fa9f4231217bd836ca1487 -
Trigger Event:
workflow_dispatch
-
Statement type: