Skip to main content

Shrinkage for Python

Shrinkage fits dense, single-response Gaussian and binomial models through Rust. Compose clustered lasso, chain fused lasso, or SLOPE with an explicit hybrid or proximal-gradient solver. Gaussian lasso also has a convenience API using coordinate descent. Fitted results provide original-scale coefficients and predictions, training preprocessing, and convergence diagnostics. The package copies NumPy inputs into independent Rust storage and releases the GIL during fitting and prediction.

The distribution and import names are both shrinkage. Build from the repository with Rust 1.85 or newer and standard CPython 3.11 or newer:

uv sync --locked --project packages/python
uv run --locked --project packages/python python -c "import shrinkage; print(shrinkage.__version__)"

The compatibility target is CPython 3.11–3.15 on Linux x86_64, Windows x86_64, and macOS arm64 and x86_64. CI tests Python 3.11 and 3.15 on each platform, including building and importing an interpreter-specific wheel. Free-threaded Python and other interpreters are outside the initial support matrix. Wheels are not published yet.

Compose a model

import numpy as np
from shrinkage import (
    Binomial,
    ClusteredLasso,
    HybridCoordinateDescent,
    Problem,
    StoppingCriterion,
)

X = np.array([[-2.0, -1.0], [-1.0, -2.0], [1.0, 2.0], [2.0, 1.0]])
y = np.array([0.1, 0.2, 0.8, 0.9])
problem = Problem(
    X,
    Binomial(y, fit_intercept=True),
    ClusteredLasso(l1=0.02, fusion=0.03),
    normalization="auto",
)
fit = problem.fit_with(
    HybridCoordinateDescent(stopping=StoppingCriterion.proximal_gradient_mapping(1e-8))
)
assert fit.termination == "converged"
logits = fit.predict(X)
probabilities = np.exp(-np.logaddexp(0, -logits))

Use Gaussian(y) for average squared loss divided by two, or Binomial(y) for average Bernoulli negative log likelihood. Both fit an unpenalized intercept by default. Binomial responses must lie in [0, 1]; fractional responses denote proportions with equal observation weights. Binomial predict returns logits, and the conversion above gives probabilities without overflow. Gaussian predictions are response means. Both have shape (n_samples,) and dtype float64.

Problem(X, datafit, penalty, *, normalization="auto") retains input references without copying. problem.fit_with(solver, *, copy=True) snapshots the current inputs on every call. Keep inputs unchanged until fitting returns. Returned results retain no problem, training arrays, or design snapshots. Array-valued properties return independent copies, so mutating them cannot change prediction.

Choose one complete penalty, applied to optimization-scale coefficients beta. The intercept is excluded:

Penalty Definition and configuration
ClusteredLasso(l1, fusion) l1 * sum(abs(beta)) + fusion * sum(i < j, abs(beta[i] - beta[j])); each signed pair contributes once
ChainFusedLasso(l1, fusion, *, weights=None) l1 * sum(abs(beta)) + fusion * sum(weights * abs(diff(beta))); feature order defines the chain
Slope(weights) Rank weights multiply decreasing coefficient magnitudes; weights include the complete penalty strength

Strengths and weights must be finite and nonnegative. Chain weights default to one and otherwise have length max(n_features - 1, 0); zero weights cut the chain. SLOPE requires one nonincreasing weight per feature. Equal SLOPE weights give L1, and zero strengths give the corresponding unpenalized limits. Weight inputs accept one-dimensional real numeric sequences and are copied into immutable tuples; the stricter dense contract below applies to X and y. Strengths, weight lengths, and solver compatibility are checked when fitting.

Choose a solver

HybridCoordinateDescent(...) returns HybridFit. Gaussian models alternate PG transitions and exact block sweeps. Binomial models use weighted hybrid subproblems inside IRLS, with backtracking on the original logistic objective. Only the full original-loss mapping, including the free-intercept derivative, certifies convergence. A surrogate check or unchanged block sweep does not certify it.

All solver arguments are keyword-only. HybridCoordinateDescent defaults match Rust:

Control Default Meaning
stopping None Absolute full-space PG mapping tolerance 1e-6
max_iterations 10_000 Total committed PG transitions plus block sweeps, shared across logistic subproblems
max_outer_iterations 100 Accepted logistic IRLS steps
max_inner_iterations 1_000 PG transitions plus sweeps per logistic quadratic model
max_outer_backtracks 100 Logistic step halvings after the full trial
cluster_sweeps 5 Block sweeps between PG transitions
check_every 10 Check interval, with checks also initially and at the budget
screening True Original-problem Gap Safe zero screening
working_set_policy WorkingSetPolicy.auto() Independent heuristic restrictions
step_policy HybridStep.backtracking() PG curvature policy

Gaussian fits ignore the logistic budgets. Iteration limits, sweep counts, and check intervals must be positive. Backtracking limits may be zero. HybridStep.backtracking(initial_curvature=None, max_backtracks=100) uses a positive supplied curvature or a column-based seed and doubles it after rejected trials. HybridStep.fixed_bound() uses a computed Frobenius bound.

Working sets offer WorkingSetPolicy.auto(), .disabled(), .ever_active(), and .adaptive(initial_size=10, prune=True). Automatic sets resolve to adaptive sets for single fits and ever-active sets for paths. Screening and working sets are independent; disable both to update all features. A heuristic exclusion is not a certified zero.

Use ProximalGradient(...) with the same problem for the reference solver. It returns ProximalFit and optimizes the original Gaussian or binomial loss directly. Its controls are stopping=None, max_iterations=10_000, initial_step=1.0, max_backtracks=100, and screening=True. max_iterations counts accepted proximal updates. The initial step must be finite and positive; backtracking halves it. Working sets are a HybridCoordinateDescent control.

Both solvers support only StoppingCriterion.proximal_gradient_mapping(...), with a finite, strictly positive absolute tolerance. Duality-gap and KKT criteria produce compatibility errors with a supported alternative.

Inspect the result

Both result types report solver, family, coefficients, intercept, preprocessing, termination, iterations, objective, stopping, stopping_value, stopping_threshold, and step_size. Check termination: "iteration_limit" returns finite parameters without certifying convergence. dual_certificate, dual_objective, and duality_gap are optional original-loss diagnostics and are None when screening is disabled. The padded duality gap does not replace mapping stopping. screening_diagnostics reports certificate passes, zero tests, certified features, remaining dimension, rebuilds, and fallbacks.

HybridFit also reports pg_steps, coordinate_sweeps, diagnostic_checks, backtracks, outer_iterations, outer_backtracks, step_policy, and working_set_diagnostics. Inner logistic checks concern quadratic models; original-loss checks control convergence. Outer counters are zero for Gaussian fits. Working-set diagnostics retain the resolved policy and feature and block work.

HybridCoordinateDescent cluster metadata uses the optimization scale. cluster_labels is an integer array of shape (n_features,) indexing cluster_values, whose shape is (n_clusters,). Clustered lasso values are signed and strictly increasing. Chain values follow contiguous segment order; equal values across zero-weight cuts can have separate labels. SLOPE values are decreasing magnitudes, and coefficient_signs has shape (n_features,). Reconstruct SLOPE coefficients as coefficient_signs * cluster_values[cluster_labels]; other penalties use the indexed values directly. Dividing by the fitted training scales gives the reported original-scale coefficients. Unequal scales can change equalities.

Run all three penalties with both families and compare both solvers through the installed package:

uv run --locked --project packages/python python packages/python/examples/hybrid.py

Regularization paths

Both solvers fit Gaussian and binomial paths for all three composed penalties. Explicit paths accept complete penalties in caller order, preserving duplicates and increases in strength. Points must have the same penalty type as the problem. Both strengths and all weights can vary independently:

from shrinkage import (
    ClusteredLasso,
    Gaussian,
    HybridCoordinateDescent,
    PathOptions,
    Problem,
)

problem = Problem(X, Gaussian(y), ClusteredLasso(l1=1.0, fusion=0.3))
explicit = problem.fit_path_with(
    HybridCoordinateDescent(),
    [ClusteredLasso(0.1, 0.02), ClusteredLasso(0.5, 0.01), ClusteredLasso(0.1, 0.02)],
)
automatic = problem.fit_regularization_path_with(
    HybridCoordinateDescent(),
    PathOptions(nlambda=20, lambda_min_ratio=0.01, early_stopping=False),
)
assert automatic.coefficients.shape == (20, X.shape[1])
assert automatic.intercepts.shape == (20,)
assert automatic.predict(X).shape == (X.shape[0], 20)

fit_path_with(solver, penalties, *, copy=True) consumes the iterable once. The problem's own penalty supplies the type; the supplied points determine the complete strengths and weights. An empty iterable returns a valid empty path.

fit_regularization_path_with(solver, options=None, *, copy=True) generates a decreasing log-spaced sequence, starting at the true zero-coefficient threshold unless lambda_start overrides it. Scalar strengths multiply both clustered or chain strengths, or every supplied SLOPE rank weight. Chain edge weights stay fixed. Thus penalties[i] always contains the complete penalty actually fitted, rather than only a scalar or one of the fusion strengths.

PathOptions uses Rust's defaults and validates controls when fitting:

Option Default Meaning
nlambda 100 Positive requested point count
lambda_min_ratio None Endpoint/start ratio in (0, 1]; 0.01 if n < p, else 0.0001
lambda_start None Optional finite, nonnegative anchor override
early_stopping True Enable deviance-based stopping
min_points 5 Positive minimum point count before early stopping
deviance_change_tolerance 1e-5 Nonnegative fractional deviance improvement; zero disables it
deviance_ratio_tolerance 0.999 Explained null-deviance target in (0, 1]

A zero anchor generates zero strengths. Pure fusion and zero-weight SLOPE can have an unbounded zero threshold and require lambda_start. Automatic binomial paths with a free intercept reject all-zero or all-one responses because the null intercept has no finite optimum. Disable the intercept or use an explicit path for those responses.

PathFit retains the selected solver, family, and n_features. Its arrays have explicit axes, including when a dimension is zero:

Property or method Shape Meaning
coefficients (n_points, n_features) Original-scale coefficients
intercepts (n_points,) Original-scale intercepts
predict(X_new) (n_samples, n_points) Gaussian means or binomial logits
lambdas (n_points,) or None Generated scalar multipliers
deviances (n_points,) or None Averaged original-loss deviances

fits and penalties are immutable tuples aligned with the parameter rows and prediction columns. Each fits[i] exposes its solver's full single-fit API, including preprocessing, stopping and dual diagnostics, screening, and prediction. HybridCoordinateDescent entries also expose clusters and working sets. Arrays are float64 snapshots; cluster labels remain integers. Changing returned arrays cannot affect any point or subsequent prediction.

Automatic metadata also includes maximum_penalty, lambda_start, and null_deviance. maximum_penalty is the true zero threshold, including inf when unbounded, even if the anchor was overridden. Explicit paths report None for all automatic metadata. The path's termination is "completed", "deviance_change", or "deviance_ratio", independently of point convergence. Only consecutive converged points can trigger deviance-change stopping.

Paths copy the training inputs once, prepare normalization once, and reuse Rust's workspace and warm starts. Every point receives a fresh solver budget. Finite iteration-limit results stay in the path and warm-start the next point; inspect each fit's termination. Invalid points, nonfinite arithmetic, and line-search failures raise the same exceptions as single fits without returning a partial path. Dense input, ownership, and GIL rules match single fits. Bulk prediction copies its input once before releasing the GIL.

Run the installed-package example for all three penalties and both families:

uv run --locked --project packages/python python packages/python/examples/paths.py

Gaussian lasso convenience API

import numpy as np
from shrinkage import Lasso, StoppingCriterion

X = np.array([[0.0], [1.0], [2.0]])
y = np.array([1.0, 3.0, 5.0])
fit = Lasso(
    0.1,
    normalization="auto",
    stopping=StoppingCriterion.duality_gap(1e-8),
).fit(X, y)
assert fit.termination == "converged"
predictions = fit.predict(X)
np.testing.assert_allclose(predictions, X @ fit.coefficients + fit.intercept)

Lasso(lambda_, *, fit_intercept=True, normalization="auto", stopping=None, max_iterations=10_000) configures a fit. fit(X, y, *, copy=True) returns an owned LassoFit; it leaves the configuration and inputs unchanged. The penalty strength must be finite and nonnegative. The objective is

$$ P(\beta_0,\beta) = F(\beta_0,\beta) + R(\beta) = \frac{1}{2n}|y - \widetilde X\beta - \beta_0\mathbf1|_2^2 + \lambda|\beta|_1. $$

Here $F$ is the datafit and $R$ is the complete penalty. For a feasible dual variable $\theta$, $D(\theta)$ denotes the dual objective, and $G(\beta_0,\beta,\theta) = P(\beta_0,\beta) - D(\theta)$ is the duality gap.

The intercept is unpenalized. Penalties and diagnostics use normalized coefficients beta, while fit.coefficients and fit.intercept use the original input scale. fit.predict(X_new) returns a float64 NumPy array of shape (n_samples,) using raw columns in training order. Empty prediction batches are allowed. Prediction uses the fitted parameters without estimating new centers or scales.

Normalization presets match Rust:

Preset Centering Scaling
"auto" Mean when fitting an intercept; otherwise none Population standard deviation
"none" None None
"center" Mean None
"standardize" Mean Population standard deviation
"min_max" Minimum Range
"max_abs" None Maximum absolute value
"l1" None L1 norm
"l2" None L2 norm

Explicit presets apply independently of fit_intercept. Explicit centering without fitting an intercept can induce a fixed original-scale intercept, which the result retains. Zero computed scales become one. fit.preprocessing reports resolved centering and scaling rules and the fitted centers and scales. Each enabled vector has shape (n_features,); disabled vectors are None. Coefficients have shape (n_features,). Returned arrays are independent copies, so changing them does not change prediction or the native fit.

Convergence and errors

Always inspect fit.termination. "converged" certifies the selected stopping check on refreshed state. "iteration_limit" returns finite parameters and diagnostics after the sweep budget expires; it does not certify convergence or raise an exception. fit.iterations counts complete coordinate sweeps; an initially optimal fit takes zero sweeps. The budget must be positive.

With stopping=None, positive penalties use relative duality gap 1e-6, and zero penalty uses absolute KKT violation 1e-6. Set either check explicitly:

gap = StoppingCriterion.duality_gap(1e-8, absolute=1e-12)
kkt = StoppingCriterion.kkt_violation(1e-10)

The gap threshold is absolute + relative * fit.reference_loss, using the fixed average squared loss at zero coefficients and the optimal enabled intercept. A zero reference loss gives a threshold equal to absolute. KKT violation is the largest absolute normalized-design coefficient violation, including the intercept derivative when fitted. All tolerances must be finite and nonnegative, with at least one positive component. KKT uses only an absolute tolerance.

Results expose stopping, stopping_value, stopping_threshold, objective, kkt_violation, dual_certificate, dual_objective, duality_gap, and reference_loss. The dual certificate has shape (n_samples,). At zero penalty the residual-based dual certificate can give a loose gap, which is why KKT is the default there.

Invalid array types and dtypes raise TypeError. Invalid dimensions, values, penalty strengths, normalization names, stopping controls, and copying policies raise ValueError. Finite inputs that produce nonfinite arithmetic raise FloatingPointError, retaining the Rust operation and iteration in the message. Line-search exhaustion raises RuntimeError with the iteration and solver settings. Python cross-validation and plotting remain later milestones.

Dense input contract

The package requires NumPy 2.0 or newer. A design matrix X must be a two-dimensional numpy.ndarray with shape (n_samples, n_features). Its single-response target y must be a one-dimensional numpy.ndarray with shape (n_samples,). Both arrays must have native-endian float64 dtype, aligned storage, and finite values. At least one observation is required; zero features are allowed. Column-vector targets are rejected rather than squeezed.

The boundary accepts exact numpy.ndarray instances. Lists, sparse matrices, memoryviews, array protocol objects, and ndarray subclasses (including masked arrays and memory-mapped subclasses) raise TypeError. Convert these explicitly when appropriate, and resolve masks before conversion:

import numpy as np

X = np.asarray([[1, 2], [3, 4]], dtype=np.float64)
y = np.asarray([1, 2], dtype=np.float64)

Other dtypes, including float32, integers, objects, complex values, and non-native byte order, raise TypeError. The boundary never casts them implicitly. Invalid dimensions, lengths, empty observations, nonfinite values, or unaligned storage raise ValueError. Use np.require(array, dtype=np.float64, requirements=["A", "E"]) to obtain an aligned base array explicitly.

NumPy storage Input preparation
C-contiguous or Fortran-contiguous Copy X into Rust column order and y into a Rust vector
Transposed, sliced, reversed, or broadcast Copy logical values using the array's strides
Writable or read-only, owned or a view Use the same independent snapshot policy
Any input with copy=False Raise ValueError; NumPy zero-copy input is unsupported

Each accepted array is copied once, including read-only arrays. A read-only flag does not prevent a writable alias from changing the same storage. There are no accepted zero-copy NumPy inputs. The snapshots require 8 * (n_samples * n_features + n_samples) bytes in addition to the original arrays, excluding allocation metadata.

Preparation retains the array owners and holds the GIL until copying finishes. The caller must prevent concurrent mutation or resizing through aliases or already-running native operations during this phase. Because fit and predict do not signal the end of copying, keep their inputs unchanged until the call returns. Other Python threads can run during the subsequent numerical work. Changing or deleting inputs after return cannot affect the fitted model. Preparation never changes input values, flags, or ownership.

Prediction follows the same contract, except it accepts zero rows and needs no response vector. Its snapshot requires 8 * n_samples * n_features bytes. Input buffers are released before the GIL is released. The native snapshots retain no Python references, and the result retains no training matrix or response. The buffer API copies strided values without Python indexing, and finite-value checks run in Rust. Python callbacks stay outside numerical loops.

Validation

task python:check tests the editable package. task python:artifacts runs the same tests against an installed wheel and a wheel rebuilt outside the checkout from a source distribution. These include analytical solutions, independently evaluated objectives and analytical Gaussian and logistic solutions, input ownership, concurrent fits, GIL release during fitting and prediction, and all diagnostics from public Rust fixtures. The model fixtures cover all twelve combinations of penalty, family, and solver, every normalization preset, both HybridCoordinateDescent step policies, working sets, screening settings, and iteration limits. Path fixtures compare explicit and automatic paths, complete tuning settings, every point's diagnostics, iteration-limit warm starts, both early stopping reasons, unbounded thresholds, invalid points, and line-search and null-model failures against public Rust paths. Path tests also cover empty shapes, ownership, and GIL release for fitting and bulk prediction.

Regenerate the fixtures after an intentional numerical change:

cargo run --locked --example python_lasso_fixture --features ndarray_v0_17 > packages/python/tests/fixtures/lasso_rust.json
cargo run --locked --example python_model_fixture --features ndarray_v0_17 > packages/python/tests/fixtures/model_rust.json
cargo run --locked --example python_path_fixture --features ndarray_v0_17 > packages/python/tests/fixtures/path_rust.json

task example and CI run that generator with --check to verify the committed fixtures against the current Rust implementation.

See the documentation for the Rust API, development instructions, and independent Rust and Python release conventions.

Metadata

Release files for shrinkage 0.3.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 shrinkage 0.3.0
File Size Uploaded Provenance Actions
shrinkage-0.3.0.tar.gz 4.0 MB With provenance Details for shrinkage-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for shrinkage 0.3.0
File Actions
shrinkage-0.3.0-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for shrinkage-0.3.0-cp315-cp315-win_amd64.whl
shrinkage-0.3.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ x86-64 Details for shrinkage-0.3.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
shrinkage-0.3.0-cp315-cp315-macosx_11_0_arm64.whl CPython 3.15 CPython 3.15 macOS 11.0+ ARM64 Details for shrinkage-0.3.0-cp315-cp315-macosx_11_0_arm64.whl
shrinkage-0.3.0-cp315-cp315-macosx_10_12_x86_64.whl CPython 3.15 CPython 3.15 macOS 10.12+ x86-64 Details for shrinkage-0.3.0-cp315-cp315-macosx_10_12_x86_64.whl
shrinkage-0.3.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for shrinkage-0.3.0-cp314-cp314-win_amd64.whl
shrinkage-0.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details for shrinkage-0.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
shrinkage-0.3.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for shrinkage-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
shrinkage-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details for shrinkage-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
shrinkage-0.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for shrinkage-0.3.0-cp313-cp313-win_amd64.whl
shrinkage-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for shrinkage-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
shrinkage-0.3.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for shrinkage-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
shrinkage-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details for shrinkage-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
shrinkage-0.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for shrinkage-0.3.0-cp312-cp312-win_amd64.whl
shrinkage-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for shrinkage-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
shrinkage-0.3.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for shrinkage-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
shrinkage-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details for shrinkage-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
shrinkage-0.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for shrinkage-0.3.0-cp311-cp311-win_amd64.whl
shrinkage-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for shrinkage-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
shrinkage-0.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for shrinkage-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
shrinkage-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details for shrinkage-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl

Total release size: 15.9 MB

Release files / shrinkage-0.3.0.tar.gz

Download URL shrinkage-0.3.0.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
b765b40b20527aa9097dbb2c2d84c51ef86de7aa8e0a8aa028909de42baa8527
BLAKE2b-256 checksum
How to use checksums
bcf03d084e56116c60ed5ac3fd6d54e0022bb7a205a669f54264aea13724bbdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp315-cp315-win_amd64.whl

Download URL shrinkage-0.3.0-cp315-cp315-win_amd64.whl
Size 556.6 kB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
f6ae1d49a1da4da2601a8d18b0e4397e57d48a94f50fe5360c4dd2e7549eb294
BLAKE2b-256 checksum
How to use checksums
891792185a4ee36363129b8ae903ba095321ea9f68721f7103fa6418731b9054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL shrinkage-0.3.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 650.4 kB
Tags CPython 3.15 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d4de378dfe95e14b27758efb4cf362b620f76cd290534a211b3682f9d9106c45
BLAKE2b-256 checksum
How to use checksums
68692fd01efc974058b3e2055eadab78c8a736fb0f37db382d0071aeafe9696d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp315-cp315-macosx_11_0_arm64.whl

Download URL shrinkage-0.3.0-cp315-cp315-macosx_11_0_arm64.whl
Size 551.5 kB
Tags CPython 3.15 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
71a89a7844f188e1d98c5e2d8e2a6cccbde47a545616dd0743601244822e23fc
BLAKE2b-256 checksum
How to use checksums
9816135a5ad983c8174c7df40582056a7dbbef2330422b346376835701ee9a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp315-cp315-macosx_10_12_x86_64.whl

Download URL shrinkage-0.3.0-cp315-cp315-macosx_10_12_x86_64.whl
Size 613.9 kB
Tags CPython 3.15 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8f9e98518ff286f23eb6da55e412ee10b12d9de436b3f0a578cd4badf32b86b4
BLAKE2b-256 checksum
How to use checksums
20c7c438302d3096b0f894914948e66d495a41bddd08c5abcecf8196cde43ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp314-cp314-win_amd64.whl

Download URL shrinkage-0.3.0-cp314-cp314-win_amd64.whl
Size 556.3 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
7d0f50ae3d2a06557c692988ec403b1b8c91f337395e2b725216b8cc45a4f39e
BLAKE2b-256 checksum
How to use checksums
aaf853ccec88a744ba763050dd5b531bff43507a79e00d3d7aeab703cfe2b210
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL shrinkage-0.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 650.1 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d898dc8fd9e65fccf78fe2e292a233d7594d356e0b5bd0c0ec51c0599486943b
BLAKE2b-256 checksum
How to use checksums
1a7101531e178f7bb8d9042308a9536fccd7cb85301683944fcbaba2afd0680a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL shrinkage-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Size 551.3 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bdbeb718bfd2b7db01d692bf7509f06a6006394117f41e7799d922bc47cad644
BLAKE2b-256 checksum
How to use checksums
798e919c0c62617c64d67c3d510750fa95720081e3cf1f58b1ae665f8ecdd449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl

Download URL shrinkage-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
Size 613.7 kB
Tags CPython 3.14 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6cff20e4a31c9d2f0b953ec786743bee5392bb4194c747001e12023b84346227
BLAKE2b-256 checksum
How to use checksums
5f6e3a1d2b385756d6f40c83c0ca0390d2c024563f897fb8d7b962ca42538b3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp313-cp313-win_amd64.whl

Download URL shrinkage-0.3.0-cp313-cp313-win_amd64.whl
Size 555.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
aba576c94371bb1ea5818cffd1ec1636dca260eeef1ddedd1e237ba0537dd49c
BLAKE2b-256 checksum
How to use checksums
080d02e81a3d967a13c85d48757988e914220ff76542c76ab82c24818fed919b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL shrinkage-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 649.5 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
29e100bc45bf087ade3ec98e5babc39894c96821458896f877cd48eedb7ce4de
BLAKE2b-256 checksum
How to use checksums
77a35436844c7516eb869c0e98220c006dce2a8985332685a4a7872145682b89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL shrinkage-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Size 550.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3024d954004267c47398969d438cf4a11d8c1c48eced01acaeca78d58dd5955e
BLAKE2b-256 checksum
How to use checksums
e7240f7e9a69a2862b3ae7e784163eaaec1af9eb09e08f25631b25e4cce1276b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL shrinkage-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 612.7 kB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
205c1951821beb7dacde9002cbb62695a70d39cdd18f853c9d95aed7f384b29b
BLAKE2b-256 checksum
How to use checksums
296459a6a2092bc308504df6c18462059b60a52dc6a91c2a6cee0ef5bf865a92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp312-cp312-win_amd64.whl

Download URL shrinkage-0.3.0-cp312-cp312-win_amd64.whl
Size 555.9 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6b2aaaa6601919d94b51ba6a5ca392e4a573db9e28c33a32801c9fbb9f401414
BLAKE2b-256 checksum
How to use checksums
d04c9f3ca512a79f46facd7e36487d8a00deadcb18259566b6115be0fb623d36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL shrinkage-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 649.7 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b215fa5f561c69803c11343427254d51e65570d7013b2f8de530b156493b8d8a
BLAKE2b-256 checksum
How to use checksums
995713bf53987842ec972ed63c2f01910003337a057f0c4b2531037708438b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL shrinkage-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Size 551.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
76791b13e021b9adcadd7514888ec516fb7d89ebf2be7da29d7662a02a77ec1d
BLAKE2b-256 checksum
How to use checksums
80731884b81323dd5f995398d2eae7a1af2269b25e6e1fada9d471cc5eb1b1e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL shrinkage-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 612.9 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9a2777d6cb7dbf054078ce4070dd930632eea5ac3a964a44a0f233d949051a5a
BLAKE2b-256 checksum
How to use checksums
307f3a90828581ac4b25d3a76e6c533b4790a8d2321a233f487a9b1d321857d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp311-cp311-win_amd64.whl

Download URL shrinkage-0.3.0-cp311-cp311-win_amd64.whl
Size 559.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1d48ec9849b6d0ab870528e8be0fff47e351a6319d8f60021cefbc7f72306fa2
BLAKE2b-256 checksum
How to use checksums
690b1098abff1fef28cda9bee71be76166935b16c71fbc22df237e31d689a268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL shrinkage-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 653.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b9c814110304ea6e0c6e23f9441c849c004e9e4d0e523a0c0b8c0c25de506744
BLAKE2b-256 checksum
How to use checksums
ff8fd89d40a50cf978b8e53eb524741a640a99ac47389160e44c8d36076a3c0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL shrinkage-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 557.1 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
56e0bc05fc7920a3c11bea888a1d93b0fcc9cecdb3ae35d175e24da70382ee17
BLAKE2b-256 checksum
How to use checksums
580337acfa35c1d0f8b07791340f48e097507081defdd451ae8e29083fafb7cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / shrinkage-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL shrinkage-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 610.8 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a33a4ea004e1e23315ec1f3d0169ed3f50037c1ded529ab49fd702eed277a404
BLAKE2b-256 checksum
How to use checksums
f5df830d24b0d0507a8efac2054dcd15f8222de385f9e77297de648eba9ceb3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Security for shrinkage 0.3.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.

Full provenance

All 21 files in this release have been uploaded with provenance metadata.

Select from 21 files

Attestation for shrinkage-0.3.0.tar.gz

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 Nov 11, 2026.

Transparency log

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.3.0 This release

21 release files Full 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