airflow-serde-polars
how to install
pip install airflow-serde-polars
how to use
You don't need to call it specifically after installation. Serialization is done automatically when passing frames to XCOM.
example dag
from __future__ import annotations
from typing import TYPE_CHECKING
from pendulum import datetime
from airflow.decorators import dag, task
if TYPE_CHECKING:
import polars as pl
@dag(start_date=datetime(2024, 1, 1), schedule=None, catchup=False)
def polars_sample():
@task.python(do_xcom_push=True)
def return_polars_frame() -> pl.DataFrame:
import polars as pl
return pl.DataFrame(
{
"a": [1, 2, 3],
"b": [4, 5, 6],
}
)
@task.python(do_xcom_push=False)
def print_polars_frame(df: pl.DataFrame) -> None:
from pprint import pprint
pprint(df)
frame = return_polars_frame()
show = print_polars_frame(frame) # pyright: ignore[reportArgumentType]
_ = frame >> show
polars_sample()
Is this an airflow provider?
It's created for a similar purpose, but it's not a provider. The airflow providers meta information does not define a serializer.
When I am able to enter the provider meta information as a serializer, I will update the library to match the provider conditions.
Metadata
Release files for airflow-serde-polars 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airflow_serde_polars-0.2.0.tar.gz | 13.3 kB | Without provenance | Details for airflow_serde_polars-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_serde_polars-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for airflow_serde_polars-0.2.0-py3-none-any.whl |
Total release size: 25.2 kB
Release files / airflow_serde_polars-0.2.0.tar.gz
| Download URL | airflow_serde_polars-0.2.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9842894891aca3774c901495462db090b6c0be4c30e5e2e0fa30dc5fb0f29916
|
|
BLAKE2b-256 checksum How to use checksums |
f334aabfaf8a25272a09d2c9456f10bdd16d8327a666e4f8b4500164deb62922
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / airflow_serde_polars-0.2.0-py3-none-any.whl
| Download URL | airflow_serde_polars-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3c103425a34798cb652f093d4aa8c8fe7169df5735d761a7a6564834d1d6138
|
|
BLAKE2b-256 checksum How to use checksums |
626870eb088191de1fa149a3d5920a1853d703dea8eea8ff56df5e161099d20b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for airflow-serde-polars 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.