KPress
KPress is a Python library and CLI that turns Markdown into polished HTML documents and static sites. It owns document rendering, typography, reader interactions, and the build pipeline while leaving site semantics and deployment to the consuming project.
KPress 0.3.5 is an alpha for developers evaluating it in real projects.
The document and publishing paths are usable and tested, but public seams may change by
hard cut before a stable release.
KPress requires Python 3.12 or newer.
KPress 0.3.5 supports macOS and Linux; native Windows support is tracked for a later
alpha (kpr-isp2).
Install and Build a Site
Install the released package into a project:
uv add kpress==0.3.5
Create this minimal kpress.yml:
sources:
- path: content
publish:
output_dir: public
asset_mode: hashed
Then add a document and build it:
mkdir -p content
printf '# Hello\n\nBuilt with KPress.\n' > content/index.md
uv run kpress build
python -m http.server 8080 -d public
Open http://127.0.0.1:8080/. The build writes public/index.html, the packaged reader
assets under public/_kpress/assets/, and a deterministic build manifest at
public/_kpress/kpress-manifest.json.
hashed fingerprints KPress-owned CSS and JavaScript for production caching.
KPress copies eligible project-local media without rewriting its authored URLs and does
not fetch or verify external assets or seal a complete asset graph.
Use linked for readable local asset names and hosted when an embedding application
serves KPress assets itself.
Truly self-contained single-file and verified offline output are not part of 0.3.5.
Use KPress as a Library
File-based sites can call the same publisher used by the CLI:
from kpress.publish import build_site
report = build_site("kpress.yml")
print(report.routes)
Python hosts can instead construct a typed KPressConfig, render a standalone page with
kpress.format.render_page, or render an embeddable fragment with
kpress.format.render_fragment. Each render returns a typed, complete asset manifest;
hosts can materialize its package closure with
kpress.format.materialize_package_assets and emit tags only for its browser entry
points.
The three runnable examples cover the supported integration shapes:
examples/static-site/: KPress owns a complete static site.examples/wrapped-site/: an outer site shell embeds KPress fragments and serves the asset closure.examples/single-doc/: a typed, programmatic build with no YAML config.
See examples/README.md for commands and
docs/kpress-static-publish.runbook.md for the
publisher boundary.
What Ships
- Vendored PT Serif and Source Sans 3, design tokens, light/dark/system modes, print CSS, and a no-flash theme bootstrap.
- Progressive reader features: table of contents, footnote and link tooltips, code copy, tabs, video placeholders, responsive tables, and KaTeX math with MathML.
- Static discovery and routing, sitemap/robots/redirects, content-hashed package assets, optional optimization and precompression, and schema-versioned manifests.
- Typed Python APIs, native ESM browser modules, host-owned chrome slots, runtime widget/behavior registries, and sanitized or trusted raw-HTML modes.
Documentation
docs/README.md is the documentation index.
It links the architecture and public-contract reference, installation and development
guides, publishing guidance, validation runbooks, and release notes.
Development and Unreleased Versions
External evaluators should start with the tagged package. Projects deliberately dogfooding unreleased work may pin an exact upstream commit or a maintained fork, but should treat that as a separate, faster-moving consumption path and record the pin.
make install
make verify
Architecture and stability contracts live in
docs/kpress-design.md.
Current capability status, release gates, and the prioritized public backlog live in
TODO.md.
See CONTRIBUTING.md, SECURITY.md, and
SUPPLY-CHAIN-SECURITY.md before contributing or reporting
a vulnerability. General defects and integration feedback belong in the
issue tracker.
Compatibility Policy
KPress evolves by hard cuts during the alpha: there are no deprecation shims.
An out-of-date caller should fail loudly rather than appear to work.
The supported surface is pinned in kpress.contract; public-name changes update the
contract, docs, tests, goldens, and release notes together.
License
AGPL-3.0-or-later; see LICENSE. Vendored components and their licenses are
listed in NOTICE.md.
Metadata
Release files for kpress 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kpress-0.3.5.tar.gz | 1.1 MB | Without provenance | Details for kpress-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kpress-0.3.5-py3-none-any.whl | Python 3 | none | any | Details for kpress-0.3.5-py3-none-any.whl |
Total release size: 1.9 MB
Release files / kpress-0.3.5.tar.gz
| Download URL | kpress-0.3.5.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a33e0af8b97c7b6ac136f55ab3a88fce2a00dca4ae8b22c7284c80c4a377913
|
|
BLAKE2b-256 checksum How to use checksums |
a9844c18b4048b1932168835042353ccda54fb0ad6eb0c7828a2be26bfecc2ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kpress-0.3.5-py3-none-any.whl
| Download URL | kpress-0.3.5-py3-none-any.whl |
|---|---|
| Size | 762.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e2907cda0f17e380109d08c63d920255e89b480dc6a308515ee791c3486c8e5
|
|
BLAKE2b-256 checksum How to use checksums |
98a95ea25822da1f91660341e8dc19b2f1aa7f8753392cfda40fbbd504a21709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for kpress 0.3.5
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.