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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.4.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.3 Linux/6.8.0-1017-azure

File hashes

Hashes for pywisetransfer-0.3.4.1.tar.gz
Algorithm Hash digest
SHA256 37b21e14b17fb075e4916a7e624f54cff7f69bb62bcd186e82b0584bd52b7f05
MD5 30272844ae118eaeda850f461285ecf5
BLAKE2b-256 95681325f496f08b695bc2d6955a6b11f90baffd4df18ce0a75acc8a346decd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.4.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.3 Linux/6.8.0-1017-azure

File hashes

Hashes for pywisetransfer-0.3.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14c378bfda544986e4fef78ba6c3b9aba31a54b1bca6a7f5737205bd6b77e9cb
MD5 12cd632d233fadd9b0ce82df0bf036dc
BLAKE2b-256 5806a84904d14ac0b295ffd26f8452ced36d9fb1135c545057d2f122d3615f8d

See more details on using hashes here.

Supported by

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