Skip to main content

Local DataFrame connector between Python and Allye widgets via manifest.jsonl + shared storage.

Project description

allye_data_connector

allye_data_connector is a local connector that lets you exchange pandas.DataFrame objects between Python and Allye widgets.

It works by appending events to a line-delimited manifest file (manifest.jsonl) and storing the actual Arrow payload either in:

  • OS shared memory (fast, for smaller data), or
  • a memory-mappable file on disk (for larger data).

Installation

From PyPI:

pip install allye_data_connector

From source (development):

pip install -e .

If you haven't installed Allye yet, please download and install it from here.

Quickstart

Send a DataFrame to Allye Canvas:

import pandas as pd
import allye_data_connector as adc

df = pd.DataFrame({"a": [1, 2], "b": ["x", "y"]})
table_name = adc.send_dataframe(df, table_name="demo")
print(table_name)

Use Allye's Allye Data Receiver widget to receive the dataframe data and perform visualizations.

Allye Data Receiver

Get Data from Canvas / Read it back:

Use Allye's Allye Data Transmitter widget to send Allye data, receive it on the Jupyter side, and execute subsequent processing.

Allye Data Transmitter

df2 = adc.get_dataframe("demo")
print(df2.head())

Wait for a DataFrame to appear (polling):

df3 = adc.get_dataframe("from_widget", producer="allye", wait=True, timeout_sec=30)

List available tables:

tables = adc.list_tables()
for t in tables:
    print(t["table_name"], t["transport"], t["shape"])

How it works (high level)

  1. send_dataframe() appends a status="writing" event to manifest.jsonl.
  2. The DataFrame is serialized to Apache Arrow:
    • transport="auto" uses shared memory when the payload is below max_shm_bytes
    • otherwise it falls back to writing Arrow IPC files under payloads/ (chunked by chunk_rows)
  3. A final status="ready" event is appended with a payload reference (transport + locator).
  4. get_dataframe() scans the manifest for the latest status="ready" entry matching table_name (and optional producer), then loads the Arrow payload back into a DataFrame.

Features

  • Send/receive DataFrames with send_dataframe() and get_dataframe()
  • Local, file-based coordination via manifest.jsonl (append-only)
  • Automatic transport selection (transport="auto") based on size
  • Optional TTL + garbage collection for payload cleanup (gc())
  • Producer filtering (e.g., read only entries produced by Allye widgets)

Cleanup (optional)

If you send with ttl_sec=..., the payload gets an expiration timestamp. You can remove expired payloads with:

adc.gc(dry_run=False)

gc(dry_run=True) (default) only reports what would be removed.

Notes

  • This is a local IPC-oriented connector; it does not do networking or authentication.
  • Very large DataFrames may exceed OS shared memory limits; the implementation automatically falls back to disk-backed Arrow files.

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

allye_data_connector-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

allye_data_connector-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file allye_data_connector-0.1.0.tar.gz.

File metadata

  • Download URL: allye_data_connector-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for allye_data_connector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d604bb1cd0ad3a29d3018988f66061862dc82834b82b8b41115d5b67834cf3e
MD5 68034b094aeb272af59b67ac4a85d3a6
BLAKE2b-256 09dec45d1346509a80f7d278c67f89ac9b18b1e2fb3bb501edbdea48387efdac

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on LichtLab/allye_data_connector

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

File details

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

File metadata

File hashes

Hashes for allye_data_connector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 569ec65c464fbbd2f47613e1ea30cd249d5cc901e60e2e55b1138aa5b7a2d9cb
MD5 62917610db43d752373ade2f4825f160
BLAKE2b-256 28e5b49172c9522a9792e8482c9b818f613dba248016cbcdcac4eae962733763

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on LichtLab/allye_data_connector

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