Metadata-Version: 2.4
Name: pywisetransfer
Version: 0.3.4.3
Summary: Python library for the TransferWise API
License-Expression: AGPL-3.0
License-File: LICENSE
Keywords: payments,transferwise
Author: James Addison
Author-email: jay@jp-hosting.net
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: dev
Provides-Extra: docs
Requires-Dist: apiron (>=9.0.0,<10)
Requires-Dist: black (>=26.3.1,<27) ; extra == "dev"
Requires-Dist: cryptography (>=48.0.0,<49)
Requires-Dist: munch (>=4.0.0,<5)
Requires-Dist: munch-stubs (>=0.1.2,<0.2) ; extra == "dev"
Requires-Dist: pytest (>=9.0.2,<10) ; extra == "dev"
Requires-Dist: responses (>=0.26.0,<0.27) ; extra == "dev"
Requires-Dist: sphinx (>=7.2.6,<8) ; extra == "docs"
Requires-Dist: types-cryptography (>=3.3.23.2,<3.4) ; extra == "dev"
Project-URL: Documentation, https://pywisetransfer.github.io/pywisetransfer
Project-URL: Homepage, https://pypi.org/project/pywisetransfer
Project-URL: Repository, https://github.com/pywisetransfer/pywisetransfer
Description-Content-Type: text/markdown

# pywisetransfer

An unofficial, experimental Python client library for the [TransferWise API](https://api-docs.transferwise.com).

:warning: The classes, functions and interfaces that this library provides are very much in-development and prone to change.

## Installation

```bash
# Within your project directory
pip install pywisetransfer
```

## Usage

### API Requests

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

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

```bash
# Within the pywisetransfer working directory
pip install .[dev]
pytest
```

