https://github.com/jcwillox/up-bank-api
💎 Fully typed Python client for (a)sync interaction with Up's banking API
https://github.com/jcwillox/up-bank-api
api api-wrapper bank banking python up
Last synced: about 2 months ago
JSON representation
💎 Fully typed Python client for (a)sync interaction with Up's banking API
- Host: GitHub
- URL: https://github.com/jcwillox/up-bank-api
- Owner: jcwillox
- License: mit
- Created: 2020-08-15T03:24:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-03T01:00:36.000Z (11 months ago)
- Last Synced: 2025-07-08T03:26:07.783Z (3 months ago)
- Topics: api, api-wrapper, bank, banking, python, up
- Language: Python
- Homepage: https://jcwillox.github.io/up-bank-api
- Size: 672 KB
- Stars: 56
- Watchers: 3
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Up Bank API
[](https://pypi.python.org/pypi/up-bank-api)
[](https://pypi.python.org/pypi/up-bank-api)
[](https://github.com/jcwillox/up-bank-api/blob/main/LICENSE)
[](https://www.codefactor.io/repository/github/jcwillox/up-bank-api)
[](https://pypistats.org/packages/up-bank-api)
[](https://pepy.tech/project/up-bank-api)
[](https://github.com/psf/black)This is an unofficial Python API wrapper for the Australian Bank [Up's](https://up.com.au/) API.
This package is fully typed, documented, and it has an intuitive structure, so I'd recommend just having quick look at the [docs](https://jcwillox.github.io/up-bank-api), and letting syntax completion take the wheel.
- 📚 [Package Documentation](https://jcwillox.github.io/up-bank-api)
- 🕶️ [The Up Website](https://up.com.au)
- 📖 [Up API Documentation](https://developer.up.com.au)
- 🔗 [Up API on GitHub](https://github.com/up-banking/api)## Installation
```shell
pip install up-bank-api
```To include async support
```shell
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**
```python
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**
```python
import asyncio
from upbankapi import AsyncClient, NotAuthorizedExceptionasync 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](https://jcwillox.github.io/up-bank-api) for more information, examples and code reference.