Starling Python SDK
Unofficial typed client for the Starling Bank Public API. Supports Python 3.11+, synchronous and asynchronous usage.
pip install starling-bank-sdk
import os
from starling_bank import StarlingClient, StarlingEnvironment
with StarlingClient(
access_token=os.environ["STARLING_ACCESS_TOKEN"],
environment=StarlingEnvironment.SANDBOX,
) as client:
accounts = client.accounts.list().accounts or []
if not accounts or not accounts[0].account_uid:
raise ValueError("No account available")
balance = client.accounts.get_balance(account_uid=accounts[0].account_uid)
print(balance.effective_balance)
Omit access_token to read STARLING_ACCESS_TOKEN at construction, or pass a
callable for application-managed tokens. Sandbox is the default; choose
StarlingEnvironment.PRODUCTION explicitly for live access.
Async usage
import asyncio
from starling_bank import AsyncStarlingClient
async def main():
async with AsyncStarlingClient() as client:
response = await client.accounts.list()
print(len(response.accounts or []))
asyncio.run(main())
The clients close only HTTP clients they create. Close any supplied HTTPX client
yourself. Typed models use Python field names such as account_uid; serialize
with model_dump(by_alias=True) when you need Starling's wire names.
Pagination and errors
Use iter_feed(client, account_uid=..., category_uid=..., min_transaction_timestamp=..., max_transaction_timestamp=...) with timezone-aware
datetime values. It follows the paginated endpoint's next links one page at a
time. Use async_iter_feed with async for for the asynchronous client.
ApiError exposes status_code, headers and body. HTTPX connection and timeout
exceptions retain their types. Reads default to two retries; writes never retry
automatically. timeout defaults to 60 seconds using HTTPX's timeout model. A supplied
HTTPX client's timeout is retained when the SDK timeout is omitted.
from starling_bank import ApiError
with StarlingClient() as client:
try:
result = client.accounts.with_raw_response.list()
print(result.status_code)
except ApiError as error:
print(error.status_code)
Authentication and signing
StarlingOAuth and AsyncStarlingOAuth handle code exchange and refresh. Refresh
rotates both tokens; persist them together. Production OAuth requires a client
certificate. Install the optional cryptography dependency for request signing and
V2 webhook verification:
pip install 'starling-bank-sdk[signing]'
Pass signing=RequestSigner(key_id=..., private_key=...) for signed operations.
See the endpoint map for available methods.
Generated from Starling's OpenAPI spec with Fern. Source and maintenance.
Metadata
Release files for starling-bank-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| starling_bank_sdk-0.1.1.tar.gz | 118.2 kB | With provenance | Details for starling_bank_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| starling_bank_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for starling_bank_sdk-0.1.1-py3-none-any.whl |
Total release size: 357.7 kB
Release files / starling_bank_sdk-0.1.1.tar.gz
| Download URL | starling_bank_sdk-0.1.1.tar.gz |
|---|---|
| Size | 118.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16b3ee6a9eebcec4c81e2ef453ab1f543dcfb1edb74ed7ba8f04cadc69626e83
|
|
BLAKE2b-256 checksum How to use checksums |
a0f4fc7b784495575be2af30838c448d9cc252ed8fab0b16b4bd31d5f35940ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / starling_bank_sdk-0.1.1-py3-none-any.whl
| Download URL | starling_bank_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 239.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d2150643634850bac1e7af0c1b0e8091b8774afda5ef7fb0786037c814f0261
|
|
BLAKE2b-256 checksum How to use checksums |
4b28207af8583de28a1f367ab51a539942f8057df9fa348fdf0860c2c37e8438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logSecurity for starling-bank-sdk 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for starling_bank_sdk-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.