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. Minify that folder with korpress when you build, and Korvex serves the small files. 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.0a1

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.0a1
File Size Uploaded Provenance Actions
korpress-0.1.0a1.tar.gz 156.0 kB With provenance Details for korpress-0.1.0a1.tar.gz

Built distributions (wheels)

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

Total release size: 2.4 MB

Release files / korpress-0.1.0a1.tar.gz

Download URL korpress-0.1.0a1.tar.gz
Size 156.0 kB
Tags Source
SHA-256 checksum
How to use checksums
023d820f51929add4c95ca4a2496e31ab917a7925cd7ba52e0a83f66a76395d9
BLAKE2b-256 checksum
How to use checksums
6655fc048d370d89ab7ffe24d5060ec71e912bd266205e23c4a0b6510c49b60c
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.0a1-cp314-cp314t-win_amd64.whl

Download URL korpress-0.1.0a1-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
a522169f708a915422598b2cfa03050e1a0e4d4015789ac9a27e3a2f70bd505f
BLAKE2b-256 checksum
How to use checksums
acf05a7a5516c200ca445b89cd45d6a071388b1893deb518e03067fca28b4687
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.0a1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL korpress-0.1.0a1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 242.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
187824e7a4ce0116c5286f52623b5a471b3553ea2ca6f32416046613cfae85dd
BLAKE2b-256 checksum
How to use checksums
856142a533da27f59d1b3a5447864ab3c8dbf92390671d8dc8dfa93eb4855cc6
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.0a1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL korpress-0.1.0a1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 235.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
237e4fe62ef1ac9510cb274447afcf9cb6e3c1dec6915cd28a4755865ea9d881
BLAKE2b-256 checksum
How to use checksums
6ddcd348951cc39165509f66703ed73b29f2e714770a9e3574722336eca9bcf0
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.0a1-cp314-cp314t-macosx_11_0_arm64.whl

Download URL korpress-0.1.0a1-cp314-cp314t-macosx_11_0_arm64.whl
Size 227.7 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d57bd86309db8249499b092c73a04e0fcea1b40dcb346c1096fb31efbe2fd1ad
BLAKE2b-256 checksum
How to use checksums
25c6904a56e5e76acdeac3b1389b857be92dfbb9fbab1d3a4e03ff3e0977b8c3
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.0a1-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL korpress-0.1.0a1-cp314-cp314t-macosx_10_12_x86_64.whl
Size 236.8 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
94f6995744625806a0fdc30eebdfe05fb437524293670370fd9e540138ac14f5
BLAKE2b-256 checksum
How to use checksums
ca5990c9e0059d0421cd893d0783b7992784cfb70523735c683aa9c3b82a317a
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.0a1-cp310-abi3-win_amd64.whl

Download URL korpress-0.1.0a1-cp310-abi3-win_amd64.whl
Size 161.2 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
9b6ea4430356b4a2e4ec69e08829373037d1d3284578e7aed1dca2b1b367c02d
BLAKE2b-256 checksum
How to use checksums
fb810a9b793b1519d568ed14bfd1c469fba4b609ab52687f6e023379bacf1398
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.0a1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL korpress-0.1.0a1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 243.8 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b009d5264bd25089c899224d9aa1d81c577970b1f55ceb6249a1cc07726286b4
BLAKE2b-256 checksum
How to use checksums
5eb8d509d46d56b7ba709cb0e2d9ee3f5728764aba22375d0eb09adcf70682c1
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.0a1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL korpress-0.1.0a1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 236.7 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
daf7d4da4ea6b809797c70195dbda0126c63c4a3e903a734a8847f560388357d
BLAKE2b-256 checksum
How to use checksums
1e3bd4883421ae4b4578662205779ad0ebda2778cc3c17979794b41efe26fe68
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.0a1-cp310-abi3-macosx_11_0_arm64.whl

Download URL korpress-0.1.0a1-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
d48029e359764e8cfec62a2a4a5a7a92ab03d246e31504cc805a69b5fb8c94a8
BLAKE2b-256 checksum
How to use checksums
7ca96ad1fb6aa554170f8cb104f8dcba72ff0408f45e82c88f94f6d7ac905bcb
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.0a1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL korpress-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl
Size 237.5 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f978a35136a23bb23bdc044cbd61aa95a8bac290c1b032d9630ef9ded0a94ae1
BLAKE2b-256 checksum
How to use checksums
9c56b66b02f0268b4116dc14d112703721b036613c990163b6b532290425ba6c
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.0a1

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.0a1.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