Stream HTTP data to Apache Arrow format for efficient processing and analytics.
Project description
http-to-arrow
http-to-arrow provides Arrow-backed containers for streaming HTTP and ETL-style
ingestion workflows.
The package uses a standard source layout so code lives under
src/http_to_arrow/ rather than the project root.
Package-specific tests live under tests/ inside this workspace member, while
the monorepo root can still host shared integration tests when needed.
Included exports
ArrowRecordContainerUnknownFieldPolicyMissingFieldPolicyCoercionPolicy
Explicit schema
import pyarrow as pa
from http_to_arrow import ArrowRecordContainer
container = ArrowRecordContainer(
schema=pa.schema([
pa.field("id", pa.int64()),
pa.field("name", pa.string()),
])
)
container.append({"id": 1, "name": "alpha"})
Inferred schema
from http_to_arrow import ArrowRecordContainer
container = ArrowRecordContainer(schema=None)
container.append({"ID": 1})
container.append({"id": 2, "name": "beta"})
table = container.to_table()
assert table.to_pydict() == {
"ID": [1, 2],
"name": [None, "beta"],
}
Notes
schema=Noneenables inferred mode.- Inferred mode widens as new fields appear and backfills older rows with nulls.
- Conflicting inferred field types widen when possible and otherwise fall back to
string. to_table()raises when inferred mode has neither an explicit schema nor any appended records.
Memory tuning
For high-volume ingestion paths (for example streaming large HTTP responses into a single materialized Arrow table) the container exposes a few opt-in knobs to bound peak memory. All defaults preserve the historical behavior.
dictionary_encode=True(explicit schemas only): low-cardinalitystringandlarge_stringcolumns are dictionary-encoded at flush time, producing dictionary-typed Arrow columns. Once a column is encoded, subsequent batches stay encoded sopa.Table.from_batchesaccepts them.dictionary_cardinality_threshold(default0.5): a column is only encoded whenlen(dictionary) / len(array) <= thresholdon the first qualifying batch. Must be in[0.0, 1.0].compact_on_materialize=True: runspa.Table.combine_chunks()after materializing pending batches into_table()orincremental_flush(), reducing the chunk fragmentation that builds up across many flushes.eager_clear_accumulator=True: each accumulator column list is released as soon as its Arrow array is built duringflush(). This is opt-in because it changes failure semantics: if a later column raises mid-flush the cleared earlier columns cannot be re-converted from the same in-flight rows.- For memory-constrained runtimes, lowering
batch_size(default128_000) reduces the size of the Python accumulator held between flushes at the cost of more frequent batch construction.
The helper modules _policies, _coercion, _schema, and _encoding are
private implementation details; the public surface remains
ArrowRecordContainer plus the three policy aliases.
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
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 http_to_arrow-0.1.3.tar.gz.
File metadata
- Download URL: http_to_arrow-0.1.3.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca0d6db13147f2b32c8c1270824162c073e5b29bb5772c80a998495b56ce954
|
|
| MD5 |
385e395429cef4d1aabef1b175d6558a
|
|
| BLAKE2b-256 |
402ecc780f8ca1cdfa36cbcf19b28264f91c5e955f37075800d5f6c0411ed009
|
Provenance
The following attestation bundles were made for http_to_arrow-0.1.3.tar.gz:
Publisher:
publish-http-to-arrow.yml on ProxayFox/proxay-pylibs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
http_to_arrow-0.1.3.tar.gz -
Subject digest:
0ca0d6db13147f2b32c8c1270824162c073e5b29bb5772c80a998495b56ce954 - Sigstore transparency entry: 1716686016
- Sigstore integration time:
-
Permalink:
ProxayFox/proxay-pylibs@3f79824efeb720dac84a8fd7acfd70c33e29ee5f -
Branch / Tag:
refs/tags/http-to-arrow-v0.1.3 - Owner: https://github.com/ProxayFox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-http-to-arrow.yml@3f79824efeb720dac84a8fd7acfd70c33e29ee5f -
Trigger Event:
release
-
Statement type:
File details
Details for the file http_to_arrow-0.1.3-py3-none-any.whl.
File metadata
- Download URL: http_to_arrow-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a90640c691d875dbc06d6eb5331ac719d06e5ef600894057a76b7e9fb63a39e7
|
|
| MD5 |
85561528ad720483049ade77a16fffc3
|
|
| BLAKE2b-256 |
65dac1e6fc4ea0ca79488d54135b229f2e57d163deacfebaf58fa1bd0b650284
|
Provenance
The following attestation bundles were made for http_to_arrow-0.1.3-py3-none-any.whl:
Publisher:
publish-http-to-arrow.yml on ProxayFox/proxay-pylibs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
http_to_arrow-0.1.3-py3-none-any.whl -
Subject digest:
a90640c691d875dbc06d6eb5331ac719d06e5ef600894057a76b7e9fb63a39e7 - Sigstore transparency entry: 1716686252
- Sigstore integration time:
-
Permalink:
ProxayFox/proxay-pylibs@3f79824efeb720dac84a8fd7acfd70c33e29ee5f -
Branch / Tag:
refs/tags/http-to-arrow-v0.1.3 - Owner: https://github.com/ProxayFox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-http-to-arrow.yml@3f79824efeb720dac84a8fd7acfd70c33e29ee5f -
Trigger Event:
release
-
Statement type: