From 55ee7e61b5b9f905abbc6901e3dabc5555f8ad7c Mon Sep 17 00:00:00 2001 From: jethro Date: Wed, 13 May 2026 17:12:35 +1200 Subject: [PATCH] initial work on akahu client --- AkahuClient/akahuclient.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 AkahuClient/akahuclient.py diff --git a/AkahuClient/akahuclient.py b/AkahuClient/akahuclient.py new file mode 100644 index 0000000..5aad4eb --- /dev/null +++ b/AkahuClient/akahuclient.py @@ -0,0 +1,31 @@ +import requests +import os +from dotenv import load_dotenv + +load_dotenv() + + +class AkahuClient: + def __init__(self, token: str, app_id: str): + self.token = token + self.app_id = app_id + self.api_url = "https://api.akahu.io/v1" + self.headers = { + "Authorization": f"Bearer {self.token}", + "X-Akahu-Id": self.app_id, + "Accept": "application/json" + } + + def get_accounts(self): + client = AkahuClient(self.token, self.app_id) + return client.get_accounts() + + def get_transactions(self, account_id: str): + client = AkahuClient(self.token, self.app_id) + return client.get_transactions(account_id) + + +if __name__ == "__main__": + client = AkahuClient(TOKEN, APP_ID) + accounts = client.get_accounts() + print(accounts) \ No newline at end of file