Skip to main content

Polymo

Turn any REST API into a standalone Lakeflow Declarative Pipelines connector — no runtime, just generated code.

test docs PyPI - Python Version

Welcome to Polymo

Polymo is a dev-time tool. You describe a REST API in the Builder UI, preview real responses, and export a standalone Lakeflow Declarative Pipelines connector. The output is plain, typed Python that only needs requests, the standard library, and pyspark — nothing is imported from polymo, and there is no config file to load at runtime. The generated code is yours: edit it, version it, review it like any other code.

What the builder generates

Pointing the builder at https://jsonplaceholder.typicode.com/posts produces a single file. Elided here, the real script also contains the retry/backoff and response-normalization helpers, and there are no comments to strip:

"""Lakeflow Declarative Pipelines connector for posts."""

import time
from typing import Any, Iterator

import requests

BASE_URL: str = "https://jsonplaceholder.typicode.com"
PATH: str = "/posts"
PARAMS: dict[str, Any] = {"_limit": 20}
HEADERS: dict[str, str] = {}
TIMEOUT: float = 30.0


def fetch_records() -> list[dict[str, Any]]:
    ...


from pyspark import pipelines as dp
from pyspark.sql import SparkSession
from pyspark.sql.datasource import DataSource, DataSourceReader


class RestSource(DataSource):
    ...


spark = SparkSession.getActiveSession()
spark.dataSource.register(RestSource)


@dp.table(name="posts")
def posts():
    return spark.read.format("posts_source").load()

Every field you fill in — pagination, incremental sync, partitioning, filter pushdown, error handling, headers, query parameters, an explicit schema, XML responses, streaming tables — is baked in as a constant or a small block of specialized code. Options you don't use produce no code at all.

Polymo Builder UI - connector preview screen

How does it work?

Open the Builder, describe your API (base URL and path are the only required fields), and press Preview to see the DataFrame, the raw records, and the raw API responses side by side. The config panel and the preview share a resizable split; collapse the panel or use focus mode when you want the whole width for the data. When you're happy, switch to the Generated Code tab and download the script.

Ready to run it on Databricks? The Deploy tab walks through it in order — Profile → Target → Bootstrap → Deploy → Run:

  1. Pick a Databricks CLI profile, then a catalog and schema (or type a schema name).
  2. Bootstrap writes a complete Databricks Asset Bundle project: the connector as an installable package under src/, the pipeline under pipelines/, and a databricks.yml that builds the wheel and attaches it to a serverless pipeline.
  3. Deploy and Run drive databricks bundle deploy and databricks bundle run without leaving the Builder, with the CLI output docked below.

Secrets never land in generated code. Each auth field (bearer token, API key, OAuth2 client secret) and any {{ options.<name> }} placeholder can reference a Databricks secret scope or a Unity Catalog service credential backed by Azure Key Vault; the pipeline resolves the value on the driver and passes it to the reader, and the Builder redacts it from every preview. Requires the Databricks CLI and a ~/.databrickscfg profile — see Deploy to Databricks for the full walkthrough.

See the Connector options reference for what every Builder field generates, and the Builder UI walkthrough for a guided tour.

How to start?

pip install polymo

This installs everything you need, Builder UI included — FastAPI, Uvicorn, PySpark, PyArrow, and requests all come along.

polymo is never a dependency of the scripts it generates.

Launch the builder UI

polymo

Or without installing it first:

uvx polymo

(Optional) Run the Builder in Docker

docker compose up --build builder

The service listens on port 8000; open http://localhost:8000 once Uvicorn reports it is running.

Migrating from polymo 0.x?

The YAML runtime (spark.read.format("polymo"), PolymoConfig, polymo smoke) is gone since 1.0. See docs/migration-1.0.md for what changed, and pin polymo<1.0 (0.11.0 is the last release with the old runtime) if you're not ready to move yet.

Where to Next

Read the docs here.

Other material:

Contributing

Is there something missing? Raise an issue or contribute! Contributions and early feedback welcome.


If Polymo helped, a ⭐ makes my day

Metadata

Release files for polymo 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polymo 1.7.0
File Size Uploaded
polymo-1.7.0.tar.gz 216.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for polymo 1.7.0
File Interpreter ABI Platform
polymo-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 445.7 kB

Release files / polymo-1.7.0.tar.gz

Download URL polymo-1.7.0.tar.gz
Size 216.4 kB
Tags Source
SHA-256 checksum
How to use checksums
582e79e371a1eba92440792d69fbdb5d5c92f78e7d14d5e0195c555d85581757
BLAKE2b-256 checksum
How to use checksums
8be6aefb11ec74df4627e1672c198d1d312d7d347cce12480737b45929a10e59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / polymo-1.7.0-py3-none-any.whl

Download URL polymo-1.7.0-py3-none-any.whl
Size 229.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e362ab4e5990a3b8f03424f07b11c778b9dba76c6cbf3652bedc19fcb59df6d
BLAKE2b-256 checksum
How to use checksums
4f2dd9867b2c76dd08385ac8bcbd76307dbd52bea07484d2411db25b1afbd0cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.1

2 release files

1.8.0

2 release files

This release

1.7.0 This release

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.8.4

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page