Skip to main content

pyrecords

Read records (list[dict]) from Excel or JSON, then order, filter and group them. Extracted from templify so other CLIs can share it.

uv add pyrecords
from pathlib import Path
from pyrecords import OrderByKey, filter_data, get_compiler, group_by_data, order_by_data, readers

data = readers["xlsx"](Path("people.xlsx"))  # first row = column names

data = order_by_data(data, [OrderByKey("city"), OrderByKey("-age")])  # "-" = descending

data = filter_data(data, get_compiler(), {"name": "int__gt", "args": ["age", "30"]})

groups = group_by_data(data, ["city"])  # [{"city": "Homs", "items": [...]}, ...]
Module What it does
readers readers (xlsx, json → list of records) and object_readers (json → one record), picked by extension
transformers order_by_data (via pyordering; empty values last), filter_data, group_by_data
filter_rules rules: a pyspecification registry of int__gt, string__icontains, date__ge, ... and get_compiler() for all / any filter schemas

Add a reader for another extension:

@readers.reader("csv")
def read_csv(filepath: Path) -> Data: ...

Metadata

Release files for pyrecords 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrecords 0.1.0
File Size Uploaded Provenance Actions
pyrecords-0.1.0.tar.gz 20.1 kB Without provenance Details for pyrecords-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrecords 0.1.0
File Interpreter ABI Platform Actions
pyrecords-0.1.0-py3-none-any.whl Python 3 none any Details for pyrecords-0.1.0-py3-none-any.whl

Total release size: 40.2 kB

Release files / pyrecords-0.1.0.tar.gz

Download URL pyrecords-0.1.0.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
054c6cfff319d6cd1fd6a37ae1e4adb71aa6379e5c699bc2cd3cd936e9ef07f6
BLAKE2b-256 checksum
How to use checksums
25ff6e577947eb380a3639112e448597dba27c9f77fefe3931b69026fa506c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pyrecords-0.1.0-py3-none-any.whl

Download URL pyrecords-0.1.0-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
837e651041799b4ec1513c04e066881d7ec89255d77c7536c08b6f3772aed7a2
BLAKE2b-256 checksum
How to use checksums
1fb46c57b26427b03efb67febe8854ebb1f1a42154cd4467b1b8a33c1d63c6d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pyrecords 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page