Skip to main content

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

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

import pywisetransfer
from pywisetransfer.webhooks import verify_signature

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
pip install .[dev]
pytest

Project details


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.2.0.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

pywisetransfer-0.2.0-py3-none-any.whl (18.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page