FinOS automation client SDK — Clerk M2M token minting, Ledger/Platform API clients, and Sentry telemetry for automation scripts (Spec 035 / FINOS-214)
Project description
finos-automation-sdk
The FinOS automation client SDK (import name finos.automation). Automation
scripts import it to follow the FinOS automation calling contract without
re-implementing it: it calls only the public Ledger and Platform API endpoints
over HTTPS with a Clerk-signed bearer token, and grants no capability the API
would not already grant that token.
It is standalone — it depends only on PyPI packages, so it installs anywhere (e.g. on a Windmill worker) without the FinOS monorepo:
pip install finos-automation-sdk # API calling + token minting
pip install "finos-automation-sdk[telemetry]" # + Sentry telemetry
# Pre-release dry runs are published to TestPyPI:
pip install -i https://test.pypi.org/simple/ finos-automation-sdk
Three independent capabilities
# API calling (any automation) — built from a JWT the caller already has.
from finos.automation import FinOSAPIClient
async with FinOSAPIClient(received_jwt) as api:
ledgers = await api.ledger.ledgers.list_ledgers()
me = await api.platform.users.read_own_profile()
# Token generation (dispatcher only) — Clerk M2M, hidden behind TokenMinter.
from finos.automation import TokenMinter
minter = TokenMinter() # CLERK_MACHINE_SECRET_KEY from env
obo = await minter.mint_for_user("user_123") # signed on_behalf_of claim
# Telemetry (every client) — optional Sentry extra, safe no-op without a DSN.
from finos.automation import init_telemetry, TelemetryContext
init_telemetry(context=TelemetryContext("import-csv", run_id, "manual"))
Plus verify_user_token (JWKS verification of a received token) and a typed error
taxonomy in finos.automation.errors.
Operations under api.ledger / api.platform are reflected from the
OpenAPI-generated clients by tag (api.<service>.<tag>.<operation>(...)), so no
operation is hand-written and none needs re-writing when the clients are
regenerated.
Configuration
Every constructor argument is optional and falls back to an environment variable
when None. The one value with no env fallback is the API client's JWT — it is
always passed by the caller.
| Env var | Used by |
|---|---|
CLERK_MACHINE_SECRET_KEY |
TokenMinter |
LEDGER_API_URL / PLATFORM_API_URL |
FinOSAPIClient base URLs |
SENTRY_DSN / SENTRY_ENVIRONMENT |
init_telemetry (optional) |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finos_automation_sdk-0.1.1.tar.gz.
File metadata
- Download URL: finos_automation_sdk-0.1.1.tar.gz
- Upload date:
- Size: 140.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d2e9509d629d25f4bbc1c3bcaa9c03c2bd1a363b977e2af004c8b88903c0577
|
|
| MD5 |
dcad8335037bc5e2c13c45b5fe041668
|
|
| BLAKE2b-256 |
08972adb8e07e6e86f28e76b0a5ddac774662abe5db7d6b840676b17606a7de2
|
File details
Details for the file finos_automation_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: finos_automation_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 350.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0944ba3689881fd67861514c54ba556474376e6a7ce55183ee3b23d9b70e9a
|
|
| MD5 |
d269f8b95a1bac5490d5b0acec1b2c1f
|
|
| BLAKE2b-256 |
fa05a7f28aa172832b7eb380b05fb82174d726f7e99adab38f5b067d5c11eb33
|