pywisetransfer


Namepywisetransfer JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://www.github.com/jayaddison/pywisetransfer
SummaryPython library for the TransferWise API
upload_time2024-03-29 10:35:24
maintainerNone
docs_urlNone
authorJames Addison
requires_python<4.0,>=3.8
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.8",
    "maintainer_email": null,
    "keywords": "payments, transferwise",
    "author": "James Addison",
    "author_email": "jay@jp-hosting.net",
    "download_url": "https://files.pythonhosted.org/packages/8c/e3/2ff5cc82b1beb5fe56d43403a53ef86d7e268fd5db0ace63344dce49b562/pywisetransfer-0.3.4.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",
    "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": "8f70cef43e91e05ef8921fc5976607bc0ab11baf20bc510f7e6c4e9f317e42d0",
                "md5": "9bf6ade3ceb7dde8538c537830c3738e",
                "sha256": "9ab5fbecadf7a038425e4e006855965be9dd3ade9e67be63a5e39e754419b151"
            },
            "downloads": -1,
            "filename": "pywisetransfer-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9bf6ade3ceb7dde8538c537830c3738e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 23011,
            "upload_time": "2024-03-29T10:35:23",
            "upload_time_iso_8601": "2024-03-29T10:35:23.198662Z",
            "url": "https://files.pythonhosted.org/packages/8f/70/cef43e91e05ef8921fc5976607bc0ab11baf20bc510f7e6c4e9f317e42d0/pywisetransfer-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ce32ff5cc82b1beb5fe56d43403a53ef86d7e268fd5db0ace63344dce49b562",
                "md5": "a18316e24a0774c1be37a25b7e09a69a",
                "sha256": "1d06c5f33814888c81d14381bd993f52dd7fd51954eaa68bab8ec4b1b9c48c04"
            },
            "downloads": -1,
            "filename": "pywisetransfer-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a18316e24a0774c1be37a25b7e09a69a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 18461,
            "upload_time": "2024-03-29T10:35:24",
            "upload_time_iso_8601": "2024-03-29T10:35:24.741854Z",
            "url": "https://files.pythonhosted.org/packages/8c/e3/2ff5cc82b1beb5fe56d43403a53ef86d7e268fd5db0ace63344dce49b562/pywisetransfer-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 10:35:24",
    "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: 9.44430s