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.3.tar.gz (18.3 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.3-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.4.3.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1010-azure

File hashes

Hashes for pywisetransfer-0.3.4.3.tar.gz
Algorithm Hash digest
SHA256 4588b02fffb3612ac370304b5193c4e6a5c22e103dbcbbf1cc33179492b46aeb
MD5 7edeeae8151eabf068cac5c1f3985314
BLAKE2b-256 06883e578fb261e818b30edccb30308061b5edf6364cd74581dd5d380e0532ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.4.3-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1010-azure

File hashes

Hashes for pywisetransfer-0.3.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 29d8612563781c862bc79565bff8b53b8d18356cbfe63ce356df433a3d2660d6
MD5 11a1b02c6f7151e4519b0546014486cc
BLAKE2b-256 0e9967362d1c1e793046fc1499ff231b5220043ac5ef78c12b0299ced70b5eff

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