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.1.tar.gz (17.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.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pywisetransfer-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f2072d02faa8a7f7386905f6c840fec10a6268ebc6a2ef1d9e11286a8d984741
MD5 333a04cc0d2a24dca2cac9e77a06e708
BLAKE2b-256 c8f4540b3da22601f7728ed7b61e69077d32f92c73a221739ea6666d815d1ace

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywisetransfer-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pywisetransfer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66dd30a087341ce86adda77a4e69e81ba86abafad7b8e90d67c4113232b18b55
MD5 2fdb89c4f5dd9d897d36f1adcfd051c7
BLAKE2b-256 7e6dc58a022ddac7bf7ae48d236923e5e362f8098a36a4e7cdcc9fc80b1f503c

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