Run the Metaflow metadata service on serverless Postgres — no always-on servers
Project description
metaflow-serverless
Run a production Metaflow metadata service for free, without setting up any cloud infrastructure.
The problem
Running Metaflow beyond your laptop means standing up a metadata service, a database, and object storage — typically on AWS, with always-on costs and hours of infra setup. For indie developers and small teams, that overhead kills momentum before the first experiment runs.
Existing alternatives either require a paid Outerbounds subscription or leave you managing servers that cost money even when idle.
Quick start
pip install metaflow-ephemeral-service
mf-setup
python flow.py run
mf-setup opens your browser for a one-time login, provisions everything on free-tier serverless infrastructure, and writes ~/.metaflowconfig. No cloud account setup required beyond a free Supabase account.
Install
pip install metaflow-ephemeral-service
Requires Python 3.10+. Metaflow must be installed separately:
pip install metaflow
Usage
Provision a new service
mf-setup
Walks you through choosing a provider stack, installs any needed CLIs, authenticates via browser OAuth, and provisions the database, storage, and compute layer. Writes credentials to ~/.metaflowconfig.
Run a flow
# flow.py
from metaflow import FlowSpec, step
class MyFlow(FlowSpec):
@step
def start(self):
self.data = [1, 2, 3]
self.next(self.end)
@step
def end(self):
print(self.data)
if __name__ == "__main__":
MyFlow()
python flow.py run
Metadata and artifacts are recorded in your provisioned service automatically.
Open the UI
mf-ui
Starts a local proxy on localhost:8083 that downloads and serves the Metaflow UI, backed by your remote service.
How it works
metaflow-serverless replaces the Metaflow metadata service with a serverless stack — no persistent server required:
Metaflow client
→ Supabase Edge Function (URL router, ~40 lines TypeScript)
→ PostgREST (managed by Supabase)
→ PL/pgSQL stored procedures (heartbeat, tag mutation, artifact queries)
→ Postgres tables
All business logic lives in the database as stored procedures. The compute layer scales to zero and wakes in milliseconds. Artifacts are stored in S3-compatible object storage.
Provider stacks
| Stack | Accounts needed | Cold start | Storage |
|---|---|---|---|
| Supabase (default) | 1, email only, no CC | ~0ms | 1 GB free |
| Neon + Cloudflare R2 | 2, CC for R2 | ~1-4s | 10 GB free |
| CockroachDB + Backblaze B2 | 2, phone for B2 | ~1-4s | 10 GB free |
Development
git clone https://github.com/npow/metaflow-serverless
cd metaflow-serverless
pip install -e ".[dev]"
pytest -v
License
Project details
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 metaflow_serverless-0.1.0.tar.gz.
File metadata
- Download URL: metaflow_serverless-0.1.0.tar.gz
- Upload date:
- Size: 58.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f6911fbbf446e03212a9ed0ecd14b3b73b22f8e1ab5fa67b57ac9574cfe1dd3
|
|
| MD5 |
49d5dda7398a2f40d8c0c251f5287582
|
|
| BLAKE2b-256 |
d90d2680309393bc6065a3344997c7fe486dc7e9df6540454a067df7268ff57c
|
Provenance
The following attestation bundles were made for metaflow_serverless-0.1.0.tar.gz:
Publisher:
publish.yml on npow/metaflow-serverless
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaflow_serverless-0.1.0.tar.gz -
Subject digest:
1f6911fbbf446e03212a9ed0ecd14b3b73b22f8e1ab5fa67b57ac9574cfe1dd3 - Sigstore transparency entry: 1004743201
- Sigstore integration time:
-
Permalink:
npow/metaflow-serverless@f8cd5adac88c1be63b6dd57335e390c952b7f7e2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/npow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8cd5adac88c1be63b6dd57335e390c952b7f7e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file metaflow_serverless-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metaflow_serverless-0.1.0-py3-none-any.whl
- Upload date:
- Size: 60.0 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 |
5515c9c11740119d87697322ef138495aaffbb3b120a47ce9603cdff4e1cbd1b
|
|
| MD5 |
1f6516592ad5fe3df2a91e453e10a504
|
|
| BLAKE2b-256 |
d64e6f9945c79398910883162b97df63906023d17fff3af9632fea2fb2ca7219
|
Provenance
The following attestation bundles were made for metaflow_serverless-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on npow/metaflow-serverless
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaflow_serverless-0.1.0-py3-none-any.whl -
Subject digest:
5515c9c11740119d87697322ef138495aaffbb3b120a47ce9603cdff4e1cbd1b - Sigstore transparency entry: 1004743203
- Sigstore integration time:
-
Permalink:
npow/metaflow-serverless@f8cd5adac88c1be63b6dd57335e390c952b7f7e2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/npow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8cd5adac88c1be63b6dd57335e390c952b7f7e2 -
Trigger Event:
release
-
Statement type: