A comprehensive Python library for the Platega.io API
Project description
Platega API Library
A comprehensive Python library for interacting with the Platega.io API.
Features
- Full support for all Platega API endpoints (Payments, Rates, etc.)
- Synchronous and Asynchronous clients
- Pydantic models for request/response validation
- Webhook handler with decorator support
- Type hinting
Installation
pip install platega
Usage
Synchronous Client
from platega import PlategaClient
client = PlategaClient(merchant_id="your-uuid", secret_key="your-secret")
status = client.check_invoice("transaction-uuid")
print(status)
Asynchronous Client
import asyncio
from platega import AsyncPlategaClient
async def main():
client = AsyncPlategaClient(merchant_id="your-uuid", secret_key="your-secret")
async with client:
status = await client.check_invoice("transaction-uuid")
print(status)
asyncio.run(main())
Webhooks
from platega import PlategaWebhookHandler, PaymentStatus
handler = PlategaWebhookHandler()
@handler.on(PaymentStatus.CONFIRMED)
async def handle_confirmed(payload):
print(f"Payment confirmed: {payload.id}")
# In your web framework (e.g., FastAPI/Flask)
# handler.process_webhook(request_json)
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 platega-0.1.5-py3-none-any.whl.
File metadata
- Download URL: platega-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8b63a13882cb5c115189fcada682fdf43cb6b54ce927aa8452e397329a409cf
|
|
| MD5 |
8bb4764f2666ea16ca950be697e84ac8
|
|
| BLAKE2b-256 |
5f5ab95ed5942e490e72cb9011c3f086d1c4582c118c372cb7045ae1bab02e47
|