Arrow-based artifact handling for lazyscribe
lazyscribe-arrow is a lightweight package that adds the following artifact handlers for lazyscribe:
csv, andparquet.
Any data structure that implements the Arrow PyCapsule Interface will be compatible with the handlers in this library. Popular compatible open source data structures include
pandas.DataFramepolars.DataFramepolars.LazyFrame
This library also adds interchange methods to construct a pyarrow.Table from lazyscribe.Project and lazyscribe.Repository objects.
Installation
Python 3.10 and above is required. use pip to install:
$ python -m pip install lazyscribe-arrow
Usage
Artifact handlers
To use this library, simply log an artifact to a lazyscribe experiment or repository with
handler="csv"for a CSV output
import pyarrow as pa
from lazyscribe import Project
project = Project("project.json", mode="w")
with project.log("My experiment") as exp:
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
exp.log_artifact(name="data", value=data, handler="csv")
project.save()
Interchange
To convert your lazyscribe.Project to a pyarrow.Table object, call lazyscribe_arrow.interchange.to_table:
import pyarrow as pa
from lazyscribe import Project
from lazyscribe_arrow.interchange import to_table
project = Project("project.json", mode="w")
with project.log("My experiment") as exp:
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
exp.log_artifact(name="data", value=data, handler="csv")
table = to_table(project)
The same function works for lazyscribe.Repository objects.
import pyarrow as pa
from lazyscribe import Repository
from lazyscribe_arrow.interchange import to_table
repo = Repository("repository.json", mode="w")
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
repo.log_artifact(name="data", value=data, handler="csv")
table = to_table(repo)
Metadata
Release files for lazyscribe-arrow 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lazyscribe_arrow-0.4.1.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lazyscribe_arrow-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.8 kB
Release files / lazyscribe_arrow-0.4.1.tar.gz
| Download URL | lazyscribe_arrow-0.4.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c9476ae5c1e173383e09e383e71bacc940e7bb2d8d5af44d51d6b6413ce5063
|
|
BLAKE2b-256 checksum How to use checksums |
d57f5b3f4fff98a4cc092ce4814b5526f681dfa58e22c92fa5acb89f05615519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|
Release files / lazyscribe_arrow-0.4.1-py3-none-any.whl
| Download URL | lazyscribe_arrow-0.4.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96c48c4e2a07d1ef41e29e2fd81b70a8e3d4b7684c03bc041f758f4ac610ff61
|
|
BLAKE2b-256 checksum How to use checksums |
1adbda18a96119954d6e0595ebd7dcbc6654ac6d7dbb071c607bec858f9ea32d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|