Buckets:

download
raw
1.52 kB
import click
from leggen.api_client import LeggenAPIClient
from leggen.main import cli
from leggen.utils.text import datefmt, echo, info, print_table
@cli.command()
@click.pass_context
def status(ctx: click.Context):
"""
List all connected banks and their status
"""
api_client = LeggenAPIClient.from_context(ctx)
# Get bank connection status
bank_connections = api_client.get_bank_status()
sessions = []
for conn in bank_connections:
sessions.append(
{
"Bank": conn["aspsp_name"],
"Country": conn["aspsp_country"],
"Status": conn["status"],
"Created at": datefmt(conn["created_at"]),
"Session ID": conn["session_id"],
}
)
info("Banks")
print_table(sessions)
# Get account details
accounts = api_client.get_accounts()
account_details = []
for account in accounts:
account_details.append(
{
"ID": account["id"],
"Bank": account["institution_id"],
"Status": account["status"],
"IBAN": account.get("iban", "N/A"),
"Created at": datefmt(account["created"]),
"Last accessed at": (
datefmt(account["last_accessed"])
if account.get("last_accessed")
else "N/A"
),
}
)
echo()
info("Accounts")
print_table(account_details)

Xet Storage Details

Size:
1.52 kB
·
Xet hash:
92b92a0e756fd13e6a6aaf252a0bc7d60419f67230cc97a755d890b71818c20d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.