Up Bank API
This is an unofficial Python API wrapper for the Australian Bank Up's API.
This package is fully typed, documented, and it has an intuitive structure, so I'd recommend just having quick look at the docs, and letting syntax completion take the wheel.
Installation
pip install up-bank-api
To include async support
pip install up-bank-api[async]
Usage
To use this library you will need a personal access token which can be retrieved from https://developer.up.com.au. When using this library you can either provide the token directly or use the environment variable UP_TOKEN.
Synchronous Client
from upbankapi import Client, NotAuthorizedException
# implicitly use the environment variable UP_TOKEN
client = Client()
# or directly provide token
client = Client(token="MY_TOKEN")
# check the token is valid
try:
user_id = client.ping()
print(f"Authorized: {user_id}")
except NotAuthorizedException:
print("The token is invalid")
Asynchronous Client
import asyncio
from upbankapi import AsyncClient, NotAuthorizedException
async def main():
# implicitly use the environment variable UP_TOKEN
client = AsyncClient()
# or directly provide token
client = AsyncClient(token="MY_TOKEN")
# use a context manager to automatically close the aiohttp session
async with AsyncClient() as client:
try:
user_id = await client.ping()
print(f"Authorized: {user_id}")
except NotAuthorizedException:
print("The token is invalid")
if __name__ == "__main__":
asyncio.run(main())
See the docs for more information, examples and code reference.
Metadata
Release files for up-bank-api 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| up_bank_api-1.2.0.tar.gz | 117.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| up_bank_api-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.4 kB
Release files / up_bank_api-1.2.0.tar.gz
| Download URL | up_bank_api-1.2.0.tar.gz |
|---|---|
| Size | 117.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1f6be8c3843519e4999e56395ccb489e4f933d0bc46565806e037d9a8726407
|
|
BLAKE2b-256 checksum How to use checksums |
9fac6f98ab5a8a45ea7e6c565f364619f729f76fa6e3889b2a959b1552a29f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.5.4
|
Release files / up_bank_api-1.2.0-py3-none-any.whl
| Download URL | up_bank_api-1.2.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
627fc1cbefbef170be7c05069e85a0fbd0b39767675fa6247403492973b502ee
|
|
BLAKE2b-256 checksum How to use checksums |
27091517ec6d95b52c71454dc80e22d2ce0fdad3bbd3af45efac425988045b81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.5.4
|