API ingestion for PySpark
Project description
Polymo makes it easy to read REST APIs into Spark DataFrames. Just a config file and read it with Spark.
Quick start
-
Define a config file:
version: 0.1 source: type: rest base_url: https://jsonplaceholder.typicode.com stream: path: /posts params: _limit: 20 infer_schema: true
-
Register the source and read data:
from pyspark.sql import SparkSession from polymo import ApiReader spark = SparkSession.builder.getOrCreate() spark.dataSource.register(ApiReader) df = ( spark.read.format("polymo") .option("config_path", "./config.yml") .option("token", "<YOUR_BEARER_TOKEN>") .load() )
Builder UI
Want a friendly way to craft configs? Launch the local builder:
polymo builder --port 9000
Installation
Base version without spark and builder:
pip install polymo
For builder UI:
pip install 'polymo[builder]'
- Incremental cursors, partitioning, and advanced pagination strategies are on the roadmap.
Contributions and early feedback welcome!
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 polymo-0.1.2.tar.gz.
File metadata
- Download URL: polymo-0.1.2.tar.gz
- Upload date:
- Size: 163.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e3cf28f6f3b433d63f515c9b4478abc9445fbaba374e923dce7c479770337d
|
|
| MD5 |
ddd0bd24d41f429ffcf4c7520e1613ec
|
|
| BLAKE2b-256 |
12e75713eaa452870bfce2fc174cc0a18767f84e396d577fbcfa56082f240f49
|
Provenance
The following attestation bundles were made for polymo-0.1.2.tar.gz:
Publisher:
release.yml on dan1elt0m/polymo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polymo-0.1.2.tar.gz -
Subject digest:
e9e3cf28f6f3b433d63f515c9b4478abc9445fbaba374e923dce7c479770337d - Sigstore transparency entry: 567940852
- Sigstore integration time:
-
Permalink:
dan1elt0m/polymo@7c2be3670ecef0fa8949f748537313e23ba86e40 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/dan1elt0m
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c2be3670ecef0fa8949f748537313e23ba86e40 -
Trigger Event:
release
-
Statement type:
File details
Details for the file polymo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: polymo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 168.7 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 |
b55e2b52f587c861f6e2334a1331d8f11da7f27fe2d9d92f459a55e0e899fc55
|
|
| MD5 |
1f94d472b06096ebd05241016225b133
|
|
| BLAKE2b-256 |
d497d37946c28a24a88626f9c15501af01fda8219a40bf03a434b534c383b41a
|
Provenance
The following attestation bundles were made for polymo-0.1.2-py3-none-any.whl:
Publisher:
release.yml on dan1elt0m/polymo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polymo-0.1.2-py3-none-any.whl -
Subject digest:
b55e2b52f587c861f6e2334a1331d8f11da7f27fe2d9d92f459a55e0e899fc55 - Sigstore transparency entry: 567940858
- Sigstore integration time:
-
Permalink:
dan1elt0m/polymo@7c2be3670ecef0fa8949f748537313e23ba86e40 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/dan1elt0m
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c2be3670ecef0fa8949f748537313e23ba86e40 -
Trigger Event:
release
-
Statement type: