Skip to main content

Lakehouse platform

Project description

Phlo

Phlo

PyPI Python CI Status: alpha

The Pythonic lakehouse framework. One Python project to define, run, validate, and inspect lakehouse pipelines.

Phlo is the framework and plugin runtime that ties together familiar lakehouse tools — Dagster, dlt, Sling, dbt, Pandera, Iceberg, Delta, Nessie, Trino, MinIO, and more — behind a single CLI and a coherent product surface called Observatory.


Why Phlo

Most lakehouse projects start in Python and quickly spill into YAML, Compose files, orchestration config, catalog setup, quality checks, and a pile of glue scripts and duplicated config. Phlo keeps those pieces in one project.

Use the phlo CLI to create a project, start the local stack, materialize assets, run quality checks, follow logs, and inspect what happened. Add provider packages when you need them: Dagster for orchestration, dlt or Sling for ingestion, dbt for transforms, Iceberg or Delta for tables, Trino for query, and Observatory for a UI to inspect assets, tables, lineage, quality, services, and logs.

What a Phlo asset looks like

A Phlo asset is ordinary Python with lakehouse metadata attached:

from pathlib import Path

import dlt
import pandas as pd
import phlo

from workflows.schemas.csv import EventsSchema


@phlo.ingestion(
    table_name="events",
    unique_key="event_id",
    validation_schema=EventsSchema,
    group="csv",
    freshness_hours=(1, 24),
)
def csv_events(partition_date: str) -> object:
    events = pd.read_csv(Path("data/events.csv"))
    events["event_id"] = events["id"].astype(str) + "-" + partition_date
    rows = events.to_dict(orient="records")
    return dlt.resource(rows, name="events")

This single function registers a partitioned ingestion asset, validates rows with Pandera, materializes through the configured orchestrator, lands the table in your configured storage and catalog, and becomes visible in Observatory and the catalog CLI — no separate orchestration, schema, Compose, or catalog wiring needed.

Quick Start

Prerequisites

  • Python 3.11 or later
  • uv
  • Docker with Compose v2, or Podman with a Compose provider
# Create an isolated environment for the quickstart
mkdir phlo-quickstart && cd phlo-quickstart
uv venv
source .venv/bin/activate

# Install Phlo with the default local stack providers
uv pip install "phlo[defaults]"

# Create a project from the CSV batch starter
phlo init my-lakehouse --template csv-batch
cd my-lakehouse
uv pip install -e .

# Generate and start the local lakehouse stack
phlo services init
phlo services start

# Check that services are healthy
phlo services status
phlo doctor --verbose

# Materialize a completed daily partition
phlo materialize dlt_events --partition 2025-01-15

# Verify the table landed in the catalog
phlo catalog tables

# Stop the local stack when finished
phlo services stop

Capabilities

  • Project layout for phlo.yaml, workflows, schemas, transforms, tests, local runtime state, and project plugins.
  • Starters for CSV ingestion, REST API ingestion, dbt medallion projects, Sling replication, and Observatory demos.
  • Python decorators for registering ingestion, quality, and transformation assets without hand-writing provider boilerplate.
  • Local service commands for generating, starting, checking, logging, and stopping the stack.
  • Provider packages for Dagster, MinIO, Nessie, Trino, Iceberg, dbt, PostgreSQL, Observatory, and the rest of a working lakehouse.
  • Plugin hooks for custom commands, services, assets, resources, catalogs, and Observatory extensions.

How Phlo fits together

Phlo's core stays small. Installed provider packages contribute capabilities through Python entry points; the CLI discovers them in the current project and wires the runtime accordingly.

Area Intent Provider examples
Pipeline authoring Define ingestion assets, schemas, checks, and transforms phlo-dlt, phlo-sling, phlo-pandera, phlo-dbt
Runtime services Start the local lakehouse stack without hand-written Compose files phlo-dagster, phlo-postgres, phlo-minio, phlo-nessie, phlo-trino
Table & catalog layer Store, version, and query lakehouse tables phlo-iceberg, phlo-delta, phlo-clickhouse, phlo-openmetadata
Product surfaces Inspect and control assets, tables, lineage, quality, services, and logs phlo-api, phlo-observatory, phlo-mcp
Serving & BI Expose lakehouse data to apps and analysts phlo-hasura, phlo-postgrest, phlo-pgweb, phlo-superset
Observability Export telemetry, logs, metrics, and alerts phlo-otel, phlo-prometheus, phlo-loki, phlo-grafana, phlo-alerting
Development Test and validate projects and provider integrations phlo-testing

Documentation

Project status

Phlo is alpha. The local development workflow is usable and exercised in CI, but APIs, provider contracts, and the on-disk project layout may change before 1.0. Pin exact versions in production.

Development

uv pip install -e .
make check

Useful local service commands:

phlo services init
phlo services start
phlo services status
phlo services logs -f
phlo services stop
phlo doctor --verbose

Contributing

Issues and pull requests are welcome. Run make check locally before opening a PR, and please open an issue first for larger changes so the design can be discussed up front.

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

phlo-0.11.0.tar.gz (301.8 kB view details)

Uploaded Source

Built Distribution

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

phlo-0.11.0-py3-none-any.whl (410.8 kB view details)

Uploaded Python 3

File details

Details for the file phlo-0.11.0.tar.gz.

File metadata

  • Download URL: phlo-0.11.0.tar.gz
  • Upload date:
  • Size: 301.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for phlo-0.11.0.tar.gz
Algorithm Hash digest
SHA256 2d7a375e6208e4f0d3275b0f137aa28b23d576ffde35f335753dfdb89190ed68
MD5 a28a78c9b4f3ba48bb36e9e237d404c4
BLAKE2b-256 cd719735d479dce0dec0642651cbe87d067da54e2e6eb83d4817ca0cb90b412d

See more details on using hashes here.

File details

Details for the file phlo-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: phlo-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 410.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for phlo-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 694d6300854b50c98fe2da37a801104fd4e333782f7f392c18d7566180462d13
MD5 47cdf13ad617e62a6f5ebda286c99994
BLAKE2b-256 499cafe6f4e32ff371ec5512d0b1f5f9aee40fbef7917bf935aa3d71259f71cc

See more details on using hashes here.

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