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
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


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.4.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

pywisetransfer-0.3.4-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file pywisetransfer-0.3.4.tar.gz.

File metadata

  • Download URL: pywisetransfer-0.3.4.tar.gz
  • Upload date:
  • Size: 18.5 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

Hashes for pywisetransfer-0.3.4.tar.gz
Algorithm Hash digest
SHA256 1d06c5f33814888c81d14381bd993f52dd7fd51954eaa68bab8ec4b1b9c48c04
MD5 a18316e24a0774c1be37a25b7e09a69a
BLAKE2b-256 8ce32ff5cc82b1beb5fe56d43403a53ef86d7e268fd5db0ace63344dce49b562

See more details on using hashes here.

File details

Details for the file pywisetransfer-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: pywisetransfer-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 23.0 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

Hashes for pywisetransfer-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab5fbecadf7a038425e4e006855965be9dd3ade9e67be63a5e39e754419b151
MD5 9bf6ade3ceb7dde8538c537830c3738e
BLAKE2b-256 8f70cef43e91e05ef8921fc5976607bc0ab11baf20bc510f7e6c4e9f317e42d0

See more details on using hashes here.

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