liuer
Liuer mimics well-known Python packages and fills practical gaps with small, compatible extensions.
The name comes from "六耳": it listens to familiar APIs, imitates their shape, and adds the missing helper functions that are useful in everyday Python work.
Installation
pip install liuer
For local development:
git clone https://github.com/yihtsy/liuer.git
cd liuer
python -m venv .venv
.venv\Scripts\activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
Modules
liuer.scipy.stats
Extensions inspired by scipy.stats.
from liuer.scipy.stats import compare_pos_neg_groups
table = compare_pos_neg_groups(
data=df,
lab_column="label",
pos_label=1,
neg_label=0,
)
from liuer.scipy.stats import group_stats, stat_test
summary = group_stats(df, group_col="Group", num_feats=["age"], cat_feats=["sex"])
tests = stat_test(df, label_col="label", pos_label=1, targ_feats=["score"])
liuer.itertools
Iterator helpers inspired by the Python standard library itertools and the recipe ecosystem.
from liuer.itertools import all_combinations, chunked, flatten, windowed
list(chunked(range(5), 2))
# [(0, 1), (2, 3), (4,)]
list(flatten([[1, 2], [3]]))
# [1, 2, 3]
list(windowed([1, 2, 3, 4], 3))
# [(1, 2, 3), (2, 3, 4)]
list(all_combinations(["a", "b"]))
# [('a',), ('b',), ('a', 'b')]
liuer.matplotlib.pyplot
Visualization helpers built on top of matplotlib.pyplot.
from liuer.matplotlib import pyplot as lplt
fig, ax = lplt.radar_chart(
labels=["A", "B", "C"],
values=[0.8, 0.4, 0.7],
)
grid = lplt.plot_jitter_boxplot_with_significance(
df,
target_features=["score"],
p_values_dict={"score": 0.03},
ordered_labels=["Control", "Case"],
show=False,
)
For convenience, the same plotting helpers are also available from liuer.plot.
Development Workflow
python -m pytest
python -m ruff check .
python -m build
python -m twine check dist/*
Every release should update CHANGELOG.md, keep the GitHub README current, and publish only from a clean git working tree.
PyPI publishing is intended to run through GitHub Actions Trusted Publishing. After configuring Yihtsy/liuer as a trusted publisher for the liuer project on PyPI, push a release tag such as:
git tag v0.0.2
git push origin v0.0.2
License
MIT
Metadata
Release files for liuer 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| liuer-0.0.2.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liuer-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / liuer-0.0.2.tar.gz
| Download URL | liuer-0.0.2.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef58a5863ff81c15612790a8dc66e530133a8367f8ff42c3eaf44607ccf2ee6a
|
|
BLAKE2b-256 checksum How to use checksums |
8f3219aa68bcad13db1f979d3c325a505cb7dd64f02b5a82c5439d83629888de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / liuer-0.0.2-py3-none-any.whl
| Download URL | liuer-0.0.2-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7784eef482a320a4cd30ff0174a3d1f7817060eaf45519089b9f2b40c2776023
|
|
BLAKE2b-256 checksum How to use checksums |
4cc03f3e812037710eb6037ab328c03e81b6ce4ea2c4ace54851b6330dd6ef04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency log