Casso API v2 SDK for Python
A lightweight Python SDK to integrate with the Casso API v2 bank transaction synchronization platform.
Installation
Install using pip:
pip install casso-pg
Features
- Double Authentication Method: Supports both API Keys and OAuth 2.0.
- Transactions Sync: Easily query bank transactions with advanced filters or manually trigger transaction syncs.
- Webhook Management: Register webhook endpoints programmatically.
- Webhook Verification: Verify incoming webhook calls using your configured secure token.
Quick Start
1. Initialize Client
Initialize using your API Key:
from casso_pg import CassoClient
casso = CassoClient(
api_key="YOUR_CASSO_API_KEY",
secure_token="YOUR_WEBHOOK_SECURE_TOKEN"
)
2. Query Transactions
filters = {
"sort": "DESC",
"page": 1,
"pageSize": 10,
"fromDate": "2026-07-01"
}
response = casso.get_transactions(filters)
for txn in response.get("data", {}).get("records", []):
print(f"ID: {txn['id']}, Amount: {txn['amount']}, Description: {txn['description']}")
3. Sync Transactions Manually
sync_res = casso.sync_transactions()
print("Manual sync triggered:", sync_res)
4. Verify Webhook Authenticity
When Casso posts transaction data to your webhook endpoint, check the token sent in the secure-token header:
# Inside your Webhook API handler (Flask / FastAPI / Django):
received_token = request.headers.get("secure-token")
if casso.verify_webhook(received_token):
# Webhook is verified, safe to parse payload
payload = request.get_json()
for item in payload.get("data", []):
print(f"Transaction detected: {item['amount']} VND, Memo: {item['description']}")
else:
print("Unauthorized webhook access attempts.")
License
MIT License.
Metadata
Release files for casso-pg 1.0.0
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 |
|---|---|---|---|---|
| casso_pg-1.0.0.tar.gz | 4.4 kB | Without provenance | Details for casso_pg-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| casso_pg-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for casso_pg-1.0.0-py3-none-any.whl |
Total release size: 9.1 kB
Release files / casso_pg-1.0.0.tar.gz
| Download URL | casso_pg-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91031dfc599fa71097b5dd689ab3c363f2e9621d443c4a1de9cc4ed9dd247fdf
|
|
BLAKE2b-256 checksum How to use checksums |
27a9de8afabf8ccde3108486d717788e98a30e18b7a37adba2528d1cb1b67f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / casso_pg-1.0.0-py3-none-any.whl
| Download URL | casso_pg-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2085bc9a45983601224f78c6e10496f64bf884e22e50660c68bd6a2a7bf7e87
|
|
BLAKE2b-256 checksum How to use checksums |
760550ebc35cbc65e396f139c99e6d500a83d0e215ee985185a3efc8b8717523
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for casso-pg 1.0.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.