Skip to main content

Run the Metaflow metadata service on serverless Postgres — no always-on servers

Project description

metaflow-serverless

CI PyPI License: Apache-2.0 Python 3.10+

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

Apache 2.0

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

metaflow_serverless-0.1.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metaflow_serverless-0.1.0-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

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

Hashes for metaflow_serverless-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f6911fbbf446e03212a9ed0ecd14b3b73b22f8e1ab5fa67b57ac9574cfe1dd3
MD5 49d5dda7398a2f40d8c0c251f5287582
BLAKE2b-256 d90d2680309393bc6065a3344997c7fe486dc7e9df6540454a067df7268ff57c

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaflow_serverless-0.1.0.tar.gz:

Publisher: publish.yml on npow/metaflow-serverless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metaflow_serverless-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for metaflow_serverless-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5515c9c11740119d87697322ef138495aaffbb3b120a47ce9603cdff4e1cbd1b
MD5 1f6516592ad5fe3df2a91e453e10a504
BLAKE2b-256 d64e6f9945c79398910883162b97df63906023d17fff3af9632fea2fb2ca7219

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaflow_serverless-0.1.0-py3-none-any.whl:

Publisher: publish.yml on npow/metaflow-serverless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page