Heroku for ML Features
Project description
Meridian
The Heroku for ML Features
Define features in Python. Get training data and production serving for free.
Stop paying the infrastructure tax. Meridian takes you from Jupyter to Production in 30 seconds.
⚡ The 30-Second Quickstart
Option A: The "I just want to see it work" (Clone & Run)
git clone https://github.com/davidahmann/meridian.git
cd meridian
pip install -e ".[ui]"
meridian serve examples/basic_features.py
Option B: The "Builder" (Pip Install)
- Install Meridian
pip install "meridian-oss[ui]"
- Create a file named
my_features.py:
from meridian.core import FeatureStore, entity, feature
from datetime import timedelta
store = FeatureStore()
@entity(store)
class User:
user_id: str
@feature(entity=User, refresh=timedelta(minutes=5), materialize=True)
def user_click_count(user_id: str) -> int:
return 42
- Serve it immediately:
meridian serve my_features.py
# 🚀 Meridian server running on http://localhost:8000
- Query it:
curl -X POST http://localhost:8000/features \
-H "Content-Type: application/json" \
-d '{"entity_name": "User", "entity_id": "u1", "features": ["user_click_count"]}'
# Output: {"user_click_count": 42}
🚀 Why Meridian?
Most feature stores are built for the 1% of companies (Uber, DoorDash) with platform teams. They require Kubernetes, Spark, and complex microservices.
Meridian is built for the rest of us.
| Feature | The "Old Way" | The Meridian Way |
|---|---|---|
| Config | 500 lines of YAML | Python Decorators (@feature) |
| Infra | Kubernetes + Spark | Runs on your Laptop (DuckDB) |
| Serving | Complex API Gateway | meridian serve file.py |
| Philosophy | "Google Scale" | "Get it Shipped" |
Key Features
- Local-First, Cloud-Ready: Runs on your laptop with zero dependencies (DuckDB + In-Memory). Scales to production with boring technology (Postgres + Redis).
- No Magic: Your code is your config. Explicit caching (
materialize=True) and explicit refresh logic. - Production Reliability: Built-in circuit breakers, fallback chains (Cache -> Compute -> Default), and Prometheus metrics (
meridian_feature_requests_total). - Rich UI & TUI: Includes a Streamlit dashboard and a production-grade Terminal UI for live monitoring.
- Hybrid Features (v1.0.2): Mix Python logic (for complex math) and SQL (for heavy joins) in the same API.
- Point-in-Time Correctness (v1.1.0): Zero data leakage using
ASOF JOIN(DuckDB) andLATERAL JOIN(Postgres). - Write Once, Run Anywhere (v1.1.0): Switch from Dev to Prod just by setting
MERIDIAN_ENV=production. No code changes.
🏗️ Architecture
Meridian is designed to grow with you.
graph TD
subgraph Dev [Tier 1: Local Development]
A[Laptop] -->|Uses| B(DuckDB)
A -->|Uses| C(In-Memory Dict)
style Dev fill:#e1f5fe,stroke:#01579b
end
subgraph Prod [Tier 2: Production]
D[API Pods] -->|Async| E[(Postgres)]
D -->|Async| F[(Redis)]
style Prod fill:#fff3e0,stroke:#ff6f00
end
Switch{MERIDIAN_ENV} -->|development| Dev
Switch -->|production| Prod
Tier 1: Local Development (The "Wedge")
- Perfect for prototyping and single-developer projects.
- Offline Store: DuckDB (Embedded)
- Online Store: Python Dictionary (In-Memory)
- Infra: None (Just
pip install)
Tier 2: Production (The "Standard")
- Robust, scalable, and boring.
- Offline Store: Postgres / Snowflake / BigQuery
- Online Store: Redis
- Infra: 1x Postgres, 1x Redis, Nx API Pods
🗺️ Roadmap
- ✅ Phase 1 (Now): Core API, DuckDB/Postgres support, Redis caching, FastAPI serving, PIT Correctness, Async I/O.
- 🚧 Phase 2: Drift detection, RBAC, and multi-region support.
🤝 Contributing
We love contributions! This is a community-driven project. Please read our CONTRIBUTING.md to get started.
📄 License
Apache 2.0
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 meridian_oss-1.1.0.tar.gz.
File metadata
- Download URL: meridian_oss-1.1.0.tar.gz
- Upload date:
- Size: 271.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
137cb6249fa8a649dea1ce446dfec1fc95d103c556aaeecba551d57bf55da9bc
|
|
| MD5 |
a4defe150fad2c66b4d21abdcbc10e24
|
|
| BLAKE2b-256 |
56ff73b9e5901d5ab2b31b3c2aebabc0b58c527ee100ceeac19104dc7ab00eea
|
Provenance
The following attestation bundles were made for meridian_oss-1.1.0.tar.gz:
Publisher:
release.yml on davidahmann/meridian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meridian_oss-1.1.0.tar.gz -
Subject digest:
137cb6249fa8a649dea1ce446dfec1fc95d103c556aaeecba551d57bf55da9bc - Sigstore transparency entry: 743368051
- Sigstore integration time:
-
Permalink:
davidahmann/meridian@617dd494d1e6d353af5fd41d552f992f243bbc5f -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/davidahmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@617dd494d1e6d353af5fd41d552f992f243bbc5f -
Trigger Event:
push
-
Statement type:
File details
Details for the file meridian_oss-1.1.0-py3-none-any.whl.
File metadata
- Download URL: meridian_oss-1.1.0-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e341d34b176568af00b3777be722cda90f099e12d035757da3a1e52e8c4a5171
|
|
| MD5 |
c6a0dc9eec0a1c8ae2d1020f4b801cf1
|
|
| BLAKE2b-256 |
7194c81237fd0d5c6395eeb757a747f8bd33859fbb80316ea8e573a4be2566f4
|
Provenance
The following attestation bundles were made for meridian_oss-1.1.0-py3-none-any.whl:
Publisher:
release.yml on davidahmann/meridian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meridian_oss-1.1.0-py3-none-any.whl -
Subject digest:
e341d34b176568af00b3777be722cda90f099e12d035757da3a1e52e8c4a5171 - Sigstore transparency entry: 743368057
- Sigstore integration time:
-
Permalink:
davidahmann/meridian@617dd494d1e6d353af5fd41d552f992f243bbc5f -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/davidahmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@617dd494d1e6d353af5fd41d552f992f243bbc5f -
Trigger Event:
push
-
Statement type: