Praemunio Python SDK
Client officiel pour l'API Praemunio — Python
📦 Installation
pip install praemunio-sdk
Ou avec Poetry :
poetry add praemunio-sdk
🚀 Quick Start (5 minutes)
1. Obtenir vos clés API
Récupérez vos clés depuis le dashboard Praemunio :
- Public Key :
pk_test_...(sandbox) oupk_live_...(production) - Secret Key :
sk_test_...(sandbox) ousk_live_...(production)
2. Initialiser le client
from praemunio_sdk import PraemunioClient
# Mode sandbox (tests)
client = PraemunioClient.sandbox('pk_test_xxx', 'sk_test_xxx')
# Mode production
# client = PraemunioClient.live('pk_live_xxx', 'sk_live_xxx')
3. S'authentifier
client.authenticate()
print(f"Access token: {client.get_access_token()}")
print(f"Refresh token: {client.get_refresh_token()}")
4. Premier appel API
api = client.create_api()
# Lister les workspaces
result = api.workspaces_drive_get()
print(f"Workspaces: {result}")
5. Exemple complet
from praemunio_sdk import PraemunioClient
# Initialiser le client (sandbox)
client = PraemunioClient.sandbox('pk_test_xxx', 'sk_test_xxx')
# Authentification
client.authenticate()
print("Authentifié avec succès !")
# Premier appel API
api = client.create_api()
workspaces = api.workspaces_drive_get()
print(f"Workspaces: {workspaces}")
🔐 Authentification
Le SDK gère automatiquement l'authentification et le refresh des tokens :
# Authentification initiale
client.authenticate()
# Le token est renouvelé automatiquement lors des appels API
# Vous pouvez aussi forcer le refresh :
client.refresh()
🌍 Environnements
| Environnement | URL | Utilisation |
|---|---|---|
| Sandbox | https://sandbox-api.praemunio.org/api/v1 |
Tests et développement |
| Live | https://api.praemunio.org/api/v1 |
Production |
# Sandbox (par défaut)
client = PraemunioClient.sandbox(public_key, secret_key)
# Production
client = PraemunioClient.live(public_key, secret_key)
📚 Documentation complète
📋 Endpoints principaux
| Méthode | Endpoint | Description |
|---|---|---|
POST |
/auth/auth-token |
Authentification |
GET |
/workspaces/drive |
Lister les workspaces |
POST |
/teams/create |
Créer une équipe |
GET |
/folders/{id} |
Détails d'un dossier |
POST |
/documents/archive |
Archiver un document |
🤝 Support
- 📖 Documentation
- 🐛 Signaler un bug
- 💬 Discord
Metadata
Release files for praemunio-sdk 1.0.2
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 | Actions |
|---|---|---|---|---|
| praemunio_sdk-1.0.2.tar.gz | 49.9 kB | Without provenance | Details for praemunio_sdk-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| praemunio_sdk-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for praemunio_sdk-1.0.2-py3-none-any.whl |
Total release size: 141.3 kB
Release files / praemunio_sdk-1.0.2.tar.gz
| Download URL | praemunio_sdk-1.0.2.tar.gz |
|---|---|
| Size | 49.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f9c07933981236d62defd2eddce919d5e440f8ac91e69a71d2b18b265243e96
|
|
BLAKE2b-256 checksum How to use checksums |
628b5a34c965f81ba7fce8257268199b9a2ee99ed170e04a438a1725e0ef2c25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / praemunio_sdk-1.0.2-py3-none-any.whl
| Download URL | praemunio_sdk-1.0.2-py3-none-any.whl |
|---|---|
| Size | 91.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
572247b4b0220fb5e591e1414c1e66632d575de18bf5241d3876777765e18514
|
|
BLAKE2b-256 checksum How to use checksums |
1ba720d4a43c82dcb3e9d61568b25cc8a52b17fa301d6c59eeb69a8c67ec4c39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for praemunio-sdk 1.0.2
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.