Skip to content

v0.1.0

Choose a tag to compare

@ryanduguid ryanduguid released this 11 Aug 13:52
· 29 commits to 341ec4c9fea4935d81dd677b674bb09c3aae4cbc since this release

First tagged version of the Xero trial balance exporter.

Three readable Python files that pull a trial balance from the Xero API into a CSV that
Power BI, pandas or Excel loads without cleanup:

  • auth.py runs the OAuth 2.0 authorisation code flow, validating state before trusting any
    error parameter, and stores the token pair durably.
  • xero_client.py handles single-use refresh-token rotation, the rotation grace window, rate
    limiting and Retry-After.
  • export_tb.py reads the trial balance report, uses the YTD column pair as the as-at balances,
    keeps the account GUID as the join key, and refuses to write an export where debits do not
    equal credits.

No SDK and no framework, so every OAuth step is visible. Requires Python 3.10 or newer. Apps
created on or after 2 March 2026 need the granular
accounting.reports.trialbalance.read scope. samples/sample-output.csv shows the output shape.