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
poetry add pywisetransfer
Usage
API Requests
import pywisetransfer
pywisetransfer.api_key = "your-api-key-here"
# pywisetransfer.environment = "live"
client = pywisetransfer.Client()
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
import pywisetransfer
from pywisetransfer.webhooks import verify_signature
# pywisetransfer.environment = "live"
payload = b"webhook-request-body-here"
signature = "webhook-signature-data-here"
valid = verify_signature(payload, signature)
print(f"Valid webhook signature: {valid}")
Run tests
# Within the pywisetransfer working directory
poetry install
poetry run pytest --forked
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.1.5.tar.gz
(15.3 kB
view details)
File details
Details for the file pywisetransfer-0.1.5.tar.gz.
File metadata
- Download URL: pywisetransfer-0.1.5.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad2003b8054f049dd1b2323d18adf7748ed0513e163956aa18c8071fc2d2d3ff
|
|
| MD5 |
c834fba3b85593fb6ef1955cbd378e7d
|
|
| BLAKE2b-256 |
be85bc3840d461d6474364cf75b7704c9661a44d0912bb3c65a4983cb96d9517
|