pywisetransfer


Namepywisetransfer JSON
Version 0.3.4.1 PyPI version JSON
download
home_pagehttps://www.github.com/jayaddison/pywisetransfer
SummaryPython library for the TransferWise API
upload_time2025-01-05 17:46:50
maintainerNone
docs_urlNone
authorJames Addison
requires_python<4.0,>3.9.1
licenseAGPL-3.0
keywords payments transferwise
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.github.com/jayaddison/pywisetransfer",
    "name": "pywisetransfer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>3.9.1",
    "maintainer_email": null,
    "keywords": "payments, transferwise",
    "author": "James Addison",
    "author_email": "jay@jp-hosting.net",
    "download_url": "https://files.pythonhosted.org/packages/95/68/1325f496f08b695bc2d6955a6b11f90baffd4df18ce0a75acc8a346decd6/pywisetransfer-0.3.4.1.tar.gz",
    "platform": null,
    "description": "# pywisetransfer\n\nAn unofficial, experimental Python client library for the [TransferWise API](https://api-docs.transferwise.com).\n\n:warning: The classes, functions and interfaces that this library provides are very much in-development and prone to change.\n\n## Installation\n\n```bash\n# Within your project directory\npip install pywisetransfer\n```\n\n## Usage\n\n### API Requests\n\n```python\nimport pywisetransfer\n\nclient = pywisetransfer.Client(api_key=\"your-api-key-here\")\n\nfor profile in client.profiles.list():\n    accounts = client.borderless_accounts.list(profile_id=profile.id)\n    for account in accounts:\n        currencies = [balance.currency for balance in account.balances]\n        print(f\"AccountID={account.id}, Currencies={currencies}\")\n```\n\n### Webhook signature verification\n\n```python\nfrom flask import abort, request\nfrom pywisetransfer.webhooks import validate_request\n\n@app.route(\"/payments/wise/webhooks\")\ndef handle_wise_webhook():\n    try:\n        validate_request(request)\n    except Exception as e:\n        logger.error(f\"Wise webhook request validation failed: {e}\")\n        abort(400)\n\n    ...\n```\n\n## Run tests\n\n```bash\n# Within the pywisetransfer working directory\npip install .[dev]\npytest\n```\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Python library for the TransferWise API",
    "version": "0.3.4.1",
    "project_urls": {
        "Homepage": "https://www.github.com/jayaddison/pywisetransfer",
        "Repository": "https://www.github.com/jayaddison/pywisetransfer"
    },
    "split_keywords": [
        "payments",
        " transferwise"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5806a84904d14ac0b295ffd26f8452ced36d9fb1135c545057d2f122d3615f8d",
                "md5": "12cd632d233fadd9b0ce82df0bf036dc",
                "sha256": "14c378bfda544986e4fef78ba6c3b9aba31a54b1bca6a7f5737205bd6b77e9cb"
            },
            "downloads": -1,
            "filename": "pywisetransfer-0.3.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12cd632d233fadd9b0ce82df0bf036dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>3.9.1",
            "size": 23023,
            "upload_time": "2025-01-05T17:46:48",
            "upload_time_iso_8601": "2025-01-05T17:46:48.727247Z",
            "url": "https://files.pythonhosted.org/packages/58/06/a84904d14ac0b295ffd26f8452ced36d9fb1135c545057d2f122d3615f8d/pywisetransfer-0.3.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95681325f496f08b695bc2d6955a6b11f90baffd4df18ce0a75acc8a346decd6",
                "md5": "30272844ae118eaeda850f461285ecf5",
                "sha256": "37b21e14b17fb075e4916a7e624f54cff7f69bb62bcd186e82b0584bd52b7f05"
            },
            "downloads": -1,
            "filename": "pywisetransfer-0.3.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "30272844ae118eaeda850f461285ecf5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>3.9.1",
            "size": 17889,
            "upload_time": "2025-01-05T17:46:50",
            "upload_time_iso_8601": "2025-01-05T17:46:50.885351Z",
            "url": "https://files.pythonhosted.org/packages/95/68/1325f496f08b695bc2d6955a6b11f90baffd4df18ce0a75acc8a346decd6/pywisetransfer-0.3.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-05 17:46:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jayaddison",
    "github_project": "pywisetransfer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pywisetransfer"
}
        
Elapsed time: 7.25894s