Skip to main content

opacte — SDK Python de l'API Opacte

Attestez et vérifiez des documents depuis votre logiciel, sans captcha ni code. Comme sur opacte.eu, le document n'est jamais conservé : Opacte n'en garde que les empreintes, et la preuve est ancrée dans Bitcoin.

Installation

pip install opacte

Python 3.10 ou plus. Créez un compte sur opacte.eu, puis une clé API dans Réglages, et rendez-la disponible dans la variable d'environnement OPACTE_API_KEY (jamais dans votre code).

Exemple

from opacte import Client, CreditsInsuffisants

client = Client()  # clé lue dans OPACTE_API_KEY
print(client.compte().solde)

# Attester un fichier : 1 crédit. Envoyé en flux, lu à la volée, jamais conservé.
attestation = client.attestations.creer("facture-2026-118.pdf", email_visible=False)
print(attestation.id_attestation, attestation.url_recu)  # gardez url_recu : accès pérenne au reçu

# Vérifier un document reçu : ses empreintes sont calculées ici, le fichier ne part pas. Gratuit.
for candidate in client.verifier("document-recu.pdf"):
    print(candidate["id_attestation"], candidate["horodatage"])

Ce que fait le SDK

  • Fichiers en flux : un fichier est envoyé par blocs, jamais chargé en entier en mémoire.
  • Nouvelles tentatives : sur coupure, 429 ou 5xx, l'appel est rejoué avec la même Idempotency-Key : jamais de second débit.
  • Erreurs typées : CleInvalide, CreditsInsuffisants (avec solde), TropDeDemandes, Introuvable…
  • Typé : annotations complètes, vérifiables par votre éditeur ou mypy.

Liens

La signature électronique par l'API, avec le document chiffré chez vous, arrive dans une prochaine version.

Licence MIT.

Metadata

Release files for opacte 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opacte 0.1.0
File Size Uploaded Provenance Actions
opacte-0.1.0.tar.gz 8.0 kB Without provenance Details for opacte-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opacte 0.1.0
File Interpreter ABI Platform Actions
opacte-0.1.0-py3-none-any.whl Python 3 none any Details for opacte-0.1.0-py3-none-any.whl

Total release size: 16.5 kB

Release files / opacte-0.1.0.tar.gz

Download URL opacte-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
da8fc0df82684dac23710d34b029cbcb70549d990f35d26fcba618bdae055995
BLAKE2b-256 checksum
How to use checksums
9fafa84afaa6903383b473b518764d760225ec8cd4f4178242786f1cf5a491e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / opacte-0.1.0-py3-none-any.whl

Download URL opacte-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b11bb25e1088c9c188b54e27af40ecad17bd30a0528f64c1f106c6605076794
BLAKE2b-256 checksum
How to use checksums
4fa1cdc1ee482fe7a3b44614dc2fed81abde7070ee4abc60c76a6846e9aa72b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for opacte 0.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page