Flashlight
Make cloud spend easy to see.
FOCUS-based, multi-cloud cloud-spend visualization.
Flashlight ingests cloud billing in the FinOps FOCUS format, standardizes it into a layered data model, and serves a bundled NiceGUI dashboard plus an MCP server for agents. It answers one question well: what are we actually spending — across every cloud and data platform on one FOCUS-normalized bill, plus how much of it is recoverable waste.
It installs with pip install getflashlight — no Docker, no database server.
Persistence is Parquet under FLASHLIGHT_HOME, queried by an in-memory DuckDB.
Flashlight identifies recoverable-spend candidates; it never applies cloud changes or performs automatic remediation.
Cross-platform. The lake home defaults to the OS user-data dir
(platformdirs) — ~/Library/Application Support/flashlight on macOS,
%LOCALAPPDATA%\flashlight\flashlight on Windows, ~/.local/share/flashlight on Linux
— or set FLASHLIGHT_HOME to override. Secrets load from a .env in the working
directory (or real shell env, which wins). Windows is supported: the atomic GOLD
publish retries the per-file rename to ride out a reader's brief open handle.
Architecture
flowchart LR
subgraph sources[Cloud sources]
aws_export["AWS FOCUS Data Export"]
aws_ce["AWS Cost Explorer"]
databricks["Databricks system tables"]
redshift["Amazon Redshift telemetry"]
end
subgraph writer[Writer process]
ingest["flashlight ingest<br/>the sole writer"]
end
subgraph lake[Parquet lake • FLASHLIGHT_HOME]
bronze["BRONZE<br/>canonical FOCUS records"]
silver["SILVER<br/>normalized in-memory model"]
gold["GOLD<br/>published metric views"]
end
subgraph readers[Read-only consumers]
dashboard["flashlight dashboard serve<br/>human interface"]
mcp["flashlight mcp serve<br/>agent interface"]
end
aws_export --> ingest
aws_ce --> ingest
databricks --> ingest
redshift --> ingest
ingest --> bronze
bronze --> silver
silver --> gold
gold --> dashboard
gold --> mcp
Flashlight has one writer and any number of readers. flashlight ingest writes
source data and publishes completed GOLD views. flashlight dashboard serve and
flashlight mcp serve each open their own in-memory DuckDB connection over that
published data; neither process changes the lake.
| Layer | Location | Purpose |
|---|---|---|
| BRONZE | bronze/ |
Canonical FOCUS records, partitioned by connector and charge month. Re-ingestion replaces the requested partitions, so retries are idempotent. |
| SILVER | In memory | Cleaned, normalized source model. Every cost metric derives from its single canonical EffectiveCost column at charge-period grain. |
| GOLD | gold/*.parquet |
Published metric contract for both the dashboard and MCP server. It is built with DuckDB and atomically published, so readers do not observe half-written results. |
There is no database server, REST API, or migration layer. Parquet is the persistent
store; FocusRecord is the canonical ingestion schema.
Quick start
pip install getflashlight
# Generate linked FOCUS, Redshift, and Databricks demo data in the local lake.
flashlight sample
# Open the dashboard at http://127.0.0.1:8501.
flashlight dashboard serve
flashlight sample is the zero-config way to see the dashboard with deterministic,
schema-validated demo data. For your own sources, open Connections in the dashboard,
select Add connection, and save an AWS, Databricks, Redshift, or Snowflake source. The
dashboard stores entered credentials in the operating-system keychain, not in YAML. Choose a
continuous sync range of at least six months before selecting Sync now; that establishes
enough history for trend and month-over-month analysis. See the UI-first
connection guide for the fields, required permissions,
and queries. The CLI remains useful for automation and headless deployments:
# Create <FLASHLIGHT_HOME>/config/ with commented starter files.
flashlight init
# Pull enabled connectors, then publish fresh GOLD metrics.
flashlight ingest
- Dashboard:
http://127.0.0.1:8501(NiceGUI; consumer surface for humans) - MCP:
http://localhost:8002(flashlight mcp serve; streamable HTTP, for agents) — also startable and watchable from the dashboard's MCP server page. The port has no authentication, so setFLASHLIGHT_MCP_HOST=127.0.0.1unless you intentionally provide a private, authenticated network boundary. - CLI:
flashlight init | ingest | transform | mcp serve | dashboard serve | aws create-export - Config:
<home>/config/{connections,policies,assistant}.yml— never any secrets; those go to your OS keychain or the env vars the config names.
FOCUS handling (why the numbers are trustworthy)
The SILVER/GOLD layer enforces the rules that make FOCUS data safe to sum:
one cost metric per view (EffectiveCost), charge-period grain only, partial
current period flagged, credit/refund signs preserved, single-currency asserted
at ingest, and AWS spend that can't be attributed to a cluster shown as an
explicit unattributed bucket rather than hidden.
Source connectors & FOCUS mappings
| Connector | Source | How it maps to FOCUS |
|---|---|---|
aws_focus |
AWS Data Exports (FOCUS 1.x Parquet in S3), or Cost Explorer via cost_source="cost_explorer" |
S3 export: already FOCUS, light coercion. Cost Explorer: coarser account-level totals, mapped in Python |
databricks |
Databricks system tables | vendored Databricks → FOCUS 1.3 SQL (below) |
redshift |
Redshift Data API or read-only SQL (efficiency telemetry only; cost arrives through AWS FOCUS) | — |
snowflake |
Snowflake ORGANIZATION_USAGE |
Python FOCUS mapper from USAGE_IN_CURRENCY_DAILY; optional driver-health telemetry |
bigquery |
— | stub (planned) |
Databricks mapping (based on the Databricks FOCUS query)
The databricks connector does not hand-roll the billing math. It runs the
authoritative Databricks System Tables → FOCUS 1.3 query, vendored verbatim at
src/flashlight/ingest/connectors/sql/databricks_focus_1_3.sql
from the Databricks solution accelerator
databricks-solutions/cloud-infra-costs.
The connector executes it on a SQL warehouse, then feeds the FOCUS-columned output
through the same shared mapper used by the file/S3 connectors. The only field we add
is x_compute_class (classic vs serverless), derived from the SKU — FOCUS doesn't
carry it, and it's how you tell all-in serverless billing from classic compute that
also shows up as separate cloud infra lines.
This SQL is repurposable — that's a feature, not a one-off:
- Run it standalone. Paste it into Databricks SQL / a notebook (set the
:account_pricesparameter) to materialize a FOCUS table, export it to Parquet/Delta, and ingest viaaws_focus's S3 FOCUS export path — no live API needed. - Template for other warehouses. It's the reference pattern for source-side
FOCUS mapping; the planned
bigqueryconnector follows the same shape (run a warehouse-native FOCUS query, thenmap_focus_row). Snowflake is already live and mapsORGANIZATION_USAGEin Python. - Fork & extend. The upstream mapping is explicitly "best-effort"; edit the
vendored copy to add columns or refine the
billing_origin_producttaxonomy. To refresh it, re-pull the upstream file and re-apply the header.
FOCUS™ is a trademark of the FinOps Foundation; the FOCUS spec is licensed CC-BY 4.0. The vendored query retains its source attribution in its header.
Development
uv sync
uv run ruff check src tests scripts
uv run mypy src tests scripts
uv run pytest
Layout
src/flashlight/
focus/ canonical FOCUS model + enums
ingest/ connectors (aws_focus, databricks, redshift) + runner
lake/ the Parquet layer: paths, schema, bronze writes, DuckDB, publish
transform/ SILVER/GOLD SQL + runner (builds gold/*.parquet) + metric catalog
gold/ reader.py — the shared GOLD read surface (MCP + dashboard)
mcp/ MCP server over the GOLD views (the agent consumer surface)
dashboard/ NiceGUI app over the GOLD views (the human consumer surface)
cli.py the unified `flashlight` command (init / ingest / transform / mcp / dashboard / aws)
flashlight mcp serve and flashlight dashboard serve are independent read-only
processes over gold/*.parquet. There is no REST API, no database, and no
migrations — Parquet is self-describing and FocusRecord is the schema.
Metadata
Release files for getflashlight 0.2.0
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 |
|---|---|---|---|---|
| getflashlight-0.2.0.tar.gz | 1.3 MB | With provenance | Details for getflashlight-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getflashlight-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for getflashlight-0.2.0-py3-none-any.whl |
Total release size: 1.9 MB
Release files / getflashlight-0.2.0.tar.gz
| Download URL | getflashlight-0.2.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4372427fbea092d4429901ce6fc423a7e1d22e6586766c43aec369d417076bd9
|
|
BLAKE2b-256 checksum How to use checksums |
b21f3fd1bc6d73bc4ca7ca616708543b9f99446919f97fb3f33b5488255f1acc
|
| 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 Aug 11, 2026.
Transparency logRelease files / getflashlight-0.2.0-py3-none-any.whl
| Download URL | getflashlight-0.2.0-py3-none-any.whl |
|---|---|
| Size | 547.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a616575621c2fa334b8299eb3324d28afb0516a937aecb7e1f10519a6a38c7e6
|
|
BLAKE2b-256 checksum How to use checksums |
4a1d5133cbe9b9d35d0eb2194555cea95ac629447864c6ba893a54eca504a7aa
|
| 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 Aug 11, 2026.
Transparency logSecurity for getflashlight 0.2.0
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 getflashlight-0.2.0.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 Aug 11, 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.