Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

korpress

A fast HTML, CSS and JS minifier for Python, written in Rust. It removes comments and whitespace and makes safe rewrites. It has no dependency.

Alpha: the API may change before 1.0. Python 3.10 and later, free-threaded 3.14t included.

Install

pip install --pre korpress

Documentation: https://3d3n-pyc.github.io/korpress/

Example

import korpress

print(korpress.minify_css("a { color : red ; margin : 0px }"))
# a{color:red;margin:0}
print(korpress.minify_js("var a = 1 ; // hi\nvar b = a + 1"))
# var a=1;var b=a+1
print(korpress.minify_html("<div>\n  <p> Hello  <b>you</b> </p>\n</div>"))
# <div><p>Hello <b>you</b></p></div>

The same from the command line:

korpress app.js                  # to stdout
korpress site/ -o dist/          # a whole tree, with statistics

What it never changes

korpress never renames a variable, never removes code and never rewrites what your code means. JS is not parsed into a tree, so the result is about what you get from removing comments and whitespace, not what terser or esbuild give. Line breaks that automatic semicolon insertion needs are kept, and <pre>, <textarea> and conditional comments are left alone. The limits are listed in Limits and safety.

With Korvex

Korvex can serve a folder of static files, and since 1.0.0rc9 its korvex build command minifies that folder with korpress and compresses it (pip install --pre "korvex[minify,brotli]", then korvex build static --out dist/static). Korvex serves the small files with precompressed=True. See With Korvex.

Docs

Start with the tutorial: it minifies a small site step by step. The command line page lists every option. For AI assistants, see the AI page, with llms.txt.

Build and test

uv sync
uv run maturin develop --release   # builds and installs the extension
uv run pytest                      # Python tests
cargo test                         # Rust tests, no Python needed

Contributor rules are in AGENTS.md. Changes are listed in CHANGELOG.md.

License

MIT

Metadata

Release files for korpress 0.1.0a2

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

Source distribution (sdist)

Source distribution for korpress 0.1.0a2
File Size Uploaded Provenance Actions
korpress-0.1.0a2.tar.gz 156.8 kB With provenance Details for korpress-0.1.0a2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for korpress 0.1.0a2
File Actions
korpress-0.1.0a2-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for korpress-0.1.0a2-cp314-cp314t-win_amd64.whl
korpress-0.1.0a2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details for korpress-0.1.0a2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
korpress-0.1.0a2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details for korpress-0.1.0a2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
korpress-0.1.0a2-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for korpress-0.1.0a2-cp314-cp314t-macosx_11_0_arm64.whl
korpress-0.1.0a2-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details for korpress-0.1.0a2-cp314-cp314t-macosx_10_12_x86_64.whl
korpress-0.1.0a2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for korpress-0.1.0a2-cp310-abi3-win_amd64.whl
korpress-0.1.0a2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for korpress-0.1.0a2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
korpress-0.1.0a2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for korpress-0.1.0a2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
korpress-0.1.0a2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for korpress-0.1.0a2-cp310-abi3-macosx_11_0_arm64.whl
korpress-0.1.0a2-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for korpress-0.1.0a2-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 2.4 MB

Release files / korpress-0.1.0a2.tar.gz

Download URL korpress-0.1.0a2.tar.gz
Size 156.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e7bb6e1e12eb0b7b6fa43d69313b4467521e8fad4a577b5b35e9ff387ad5acdc
BLAKE2b-256 checksum
How to use checksums
f771d6a3d446a566b3aa183e82263358fe46fa3602b34527550606f917e0356b
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp314-cp314t-win_amd64.whl

Download URL korpress-0.1.0a2-cp314-cp314t-win_amd64.whl
Size 158.8 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
21b14040227567e1b80fce12baa22b0d3d2095d4c2fc0320462e045d1bc11345
BLAKE2b-256 checksum
How to use checksums
675ee787eb99786838109137120c2485b077f23f430ae17498d864380ac3a7ec
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL korpress-0.1.0a2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 242.2 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8e5ea3b2ee48ce1358610a98d602ab77543e370070da500380f607605d06d70a
BLAKE2b-256 checksum
How to use checksums
ee9291b4d1fc73eda7acd38554d337227a9561eae9d8fc1269573363aa3ebb0e
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL korpress-0.1.0a2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 235.2 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
1f906a0ade721c80b1de258350689366c3a9cd5fee91e05d66695f237e09aeb4
BLAKE2b-256 checksum
How to use checksums
8d459c00ff30b5f1946c22e7a38b600ed1aeb2e6badd26169108075763af0303
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp314-cp314t-macosx_11_0_arm64.whl

Download URL korpress-0.1.0a2-cp314-cp314t-macosx_11_0_arm64.whl
Size 227.8 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
afc36fb63738b71a993304395371cf13b00cc5285969343bd4d36ec3b577885b
BLAKE2b-256 checksum
How to use checksums
a9df9e93347a18ea8df15cdec665dc9fee87a328f62c031e7cc3e8614ab4690c
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL korpress-0.1.0a2-cp314-cp314t-macosx_10_12_x86_64.whl
Size 236.9 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fdf14e2d5235d38a75ce2b834b0837743996db2f7f2ad0c65f86be8583f1011e
BLAKE2b-256 checksum
How to use checksums
0a07a211a26a7e5bd44f9ca70e71cff306b30205dadc1ee1411df83193d3c532
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp310-abi3-win_amd64.whl

Download URL korpress-0.1.0a2-cp310-abi3-win_amd64.whl
Size 161.3 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0f0f76a92f1c58ceabdaf551bf6155b669eb88226909fda451156a3bf3898407
BLAKE2b-256 checksum
How to use checksums
df2165ed6069690ee2dedd8980b00eb678e7b88d188f265a180bfb81c66a2b2e
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL korpress-0.1.0a2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 243.9 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
84fa10aca7386e941202fee6872d78d910010a12a27aae6b6a13df9dcd6c2e73
BLAKE2b-256 checksum
How to use checksums
580d950a2bb853564d250d3d114004b1052a3afdb7e906deeb9c1cad5f3cebcb
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL korpress-0.1.0a2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 236.8 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0283e31acce9d7892aae1d974a03cd5e6c0b6e2b652e9838e9c6312a9e455d19
BLAKE2b-256 checksum
How to use checksums
4a230a14ec0bd4906c16eb47c9aa1c10cfc00a148b5536357b0a6f8b1cc08ef9
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp310-abi3-macosx_11_0_arm64.whl

Download URL korpress-0.1.0a2-cp310-abi3-macosx_11_0_arm64.whl
Size 230.4 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cfc0477af6b81bf1595795141509f7b7610c1d58a5992d30a47cefdd0e6732c6
BLAKE2b-256 checksum
How to use checksums
2010938439df33d567b240ed7d2716f69c2101e14fe110ddbf386909c923c9a3
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 Dec 3, 2026.

Transparency log

Release files / korpress-0.1.0a2-cp310-abi3-macosx_10_12_x86_64.whl

Download URL korpress-0.1.0a2-cp310-abi3-macosx_10_12_x86_64.whl
Size 237.6 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2c05ac6ecdb28e1e041f278286ea073d3ba5e862190e641805d982a141dffbf9
BLAKE2b-256 checksum
How to use checksums
e35f848df17295c525c4090f5d133d3defbd58490499bfddc2f058ffbeaa7fc3
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 Dec 3, 2026.

Transparency log

Security for korpress 0.1.0a2

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 11 files in this release have been uploaded with provenance metadata.

Select from 11 files

Attestation for korpress-0.1.0a2.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 Dec 3, 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.

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