Python library for the TransferWise API
Project description
pywisetransfer
An unofficial, experimental Python client library for the TransferWise API.
:warning: The classes, functions and interfaces that this library provides are very much in-development and prone to change.
Installation
# Within your project directory
pip install pywisetransfer
Usage
API Requests
import pywisetransfer
client = pywisetransfer.Client(api_key="your-api-key-here")
for profile in client.profiles.list():
accounts = client.borderless_accounts.list(profile_id=profile.id)
for account in accounts:
currencies = [balance.currency for balance in account.balances]
print(f"AccountID={account.id}, Currencies={currencies}")
Webhook signature verification
from flask import abort, request
from pywisetransfer.webhooks import validate_request
@app.route("/payments/wise/webhooks")
def handle_wise_webhook():
try:
validate_request(request)
except Exception as e:
logger.error(f"Wise webhook request validation failed: {e}")
abort(400)
...
Run tests
# Within the pywisetransfer working directory
pip install .[dev]
pytest
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 Distribution
pywisetransfer-0.3.3.1.tar.gz
(18.3 kB
view details)
Built Distribution
File details
Details for the file pywisetransfer-0.3.3.1.tar.gz
.
File metadata
- Download URL: pywisetransfer-0.3.3.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3684156cb435f80b654b161cabd9f43f8c371f72f07f2686bde208622fc6750b |
|
MD5 | 32ac6c1e767411bac90d251af5a41576 |
|
BLAKE2b-256 | 0a184d1d34c3db9467103add37f9a3041e78c00bb0bdc4a74d81ac44b1c70882 |
File details
Details for the file pywisetransfer-0.3.3.1-py3-none-any.whl
.
File metadata
- Download URL: pywisetransfer-0.3.3.1-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc014e2629c31442d4099b29fa5d2e74267b3d2ea5f60403f80f867e0f9ccff |
|
MD5 | cfd82e9b8d574be157ffdd84f77bbed1 |
|
BLAKE2b-256 | f0b1e11c66dc352a0312c07708fdc8c05b1850ac2be436907acfb03c294e09f2 |