Dictum is a Business Intelligence framework written in Python. It includes a general-purpose metrics engine and allows your organization to have a shared, version-controlled and well-documented understanding of what the important metrics are and how they are computed from the source data.
The main features are:
- 🧑🔧 A structured way to describe your metrics. Metrics are defined in simple, readable YAML files. 👉 Learn how to get started with your own project
- 🪄 Interactive analytics in Jupyter. Slice and dice your metrics quickly and easily. Get the data as a Pandas DataFrame. 👉 Learn how to query Dictum
- 🤩 Dataviz powered by Altair. Quickly build visualizations based on your metric data. 👉 Demo Jupyter notebook
- 😎 SQL-like expression language. Write metric expressions in the familiar SQL syntax.
- 🦥 Reusable expressions. Define metrics using other previously-defined metrics.
- 🐇 Automatic multi-hop joins. You define foreign keys for tables, Dictum writes boring boilerplate SQL for you.
- 🤖 Python API. Build data applications powered by your Dictum project.
🚂 Supported backends:
Example Metric definition:
# metrics/revenue.yml
name: Revenue
description: |
Sum of all order amounts excluding
bonus currency spending.
table: orders
expr: sum(amount - coalesce(bonus_spent, 0))
format:
kind: currency
currency: USD
Example Table Definition:
# tables/orders.yml
source:
schema: marts
table: orders
related:
user: user_id -> users.id
product: project_id -> products.id
Install from PyPi:
pip install dictum