Skip to main content

konform

CI codecov Docs PyPI License: MIT

Multi-rule Python linter and language server: fast, configurable, and CI-ready.

Work in progress. konform is under active development. Rules, configuration keys, CLI flags, and the LSP surface may change at any time, including in backwards-incompatible ways, until a 1.0 release.

Documentation

Why konform?

Ruff covers most of what a Python project wants from a linter, but not everything. konform is a small, fast Rust linter for the checks that fall through the gaps. Its rules are opinionated: they encode a specific style (such as the Google Python Style Guide's module-only imports) rather than universal correctness, and the list keeps growing.

  • Opinionated import rules: enforce module-only imports (KIS001) and flag needless from X import Y as Z aliases (KIS002).
  • Project-specific rules: define your own regex rules (KPT) in TOML, with messages, file globs and optional replacements. No plugin code.
  • Auto-fixes with a Ruff-style safe/unsafe split.
  • Built-in language server that shares the CLI's engine.
  • CI-ready output: GitHub, GitLab, SARIF, JUnit, Zuul and JSON.

The node kinds and condition keys above are konform's own vocabulary, not the parser's: each kind maps onto one or more parser node types inside konform (for example assign covers =, annotated and augmented assignment; function covers def and async def; yield covers yield from). Rules therefore stay valid when the underlying parser is upgraded or replaced, and parser type names (such as Ruff's StmtAssert) are rejected as unknown kinds.

Installation

# As an isolated tool (recommended)
uv tool install konform
pipx install konform

# Run without installing
uvx konform check src/

# Into the current environment
pip install konform

Wheels ship a pre-compiled Rust binary, so no Rust installation is needed at runtime.

Example

# app.py
from os.path import join

print(join("a", "b"))
$ konform check app.py
error[KIS001][*]: Import 'join' from 'os.path' is not a module.
  --> app.py:1:1
  help: Use only module imports, see: https://google.github.io/styleguide/pyguide.html#22-imports

Found 1 error.
[*] 1 fixable with the `--fix` option.

$ konform check --fix app.py

Other useful commands:

konform check --fix --unsafe-fixes src/   # also apply unsafe fixes (e.g. KIS002)
konform check --output-format github .    # annotations for GitHub Actions
konform rule --list                       # list rules
konform rule --explain KIS001             # explain a rule
konform server                            # start the language server

Configure it in pyproject.toml (or konform.toml):

[tool.konform.lint]
select = ["KIS"]

[tool.konform.lint.module-only-imports]
exceptions = ["typing", "mycompany.compat"]

See the documentation for the full rule, configuration, CLI and editor reference.

Development

You need a Rust toolchain (pinned in rust-toolchain.toml) and uv.

# Build and test
cargo build
cargo test
cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings

# Run the dev binary
cargo run -- check path/to/file.py

# Build the Python package (wheel with the compiled binary)
uv run maturin build --release        # wheels land in target/wheels/
uv run maturin develop                # or install into the project venv

# Regenerate the rules, CLI and env-var reference pages from the code
# (docs/rules/ and docs/reference/{cli,environment-variables}.md, checked by a test)
cargo run -- generate-docs docs

# Build and preview the documentation
uv run --only-group dev --python 3.12 zensical serve
uv run --only-group dev --python 3.12 zensical build --clean --strict

The docs source lives in docs/ (config in mkdocs.yml; the landing page is this README) and is deployed to GitHub Pages by .github/workflows/docs.yml on every push to main. Commits follow Conventional Commits; releases are cut with commitizen.

Acknowledgements

konform exists because Ruff doesn't (yet) cover rules like KIS001/KIS002; konform was built to fill that gap, and Ruff's design was a direct inspiration for how konform is configured, how it reports violations, and how it resolves src search roots.

konform is also built on top of several excellent open-source projects, especially:

Thanks to all the maintainers of all used open-source projects.

License

MIT

Metadata

Release files for konform 0.6.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 konform 0.6.0
File Size Uploaded Provenance Actions
konform-0.6.0.tar.gz 344.1 kB With provenance Details for konform-0.6.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for konform 0.6.0
File Actions
konform-0.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for konform-0.6.0-py3-none-win_amd64.whl
konform-0.6.0-py3-none-win32.whl Python 3 none Windows x86-32 Details for konform-0.6.0-py3-none-win32.whl
konform-0.6.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for konform-0.6.0-py3-none-musllinux_1_2_x86_64.whl
konform-0.6.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for konform-0.6.0-py3-none-musllinux_1_2_aarch64.whl
konform-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for konform-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
konform-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details for konform-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
konform-0.6.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for konform-0.6.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
konform-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for konform-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
konform-0.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for konform-0.6.0-py3-none-macosx_11_0_arm64.whl
konform-0.6.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for konform-0.6.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 35.5 MB

Release files / konform-0.6.0.tar.gz

Download URL konform-0.6.0.tar.gz
Size 344.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c8b9d51a475acf1f3ef9039c09a17dc56da6e5f8c3b63c27ceb3274e61ba376d
BLAKE2b-256 checksum
How to use checksums
227cc5ac87ec2aa40901db41351ba8ced0d3a00cd66e378503e09ebcfbca6c3a
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-win_amd64.whl

Download URL konform-0.6.0-py3-none-win_amd64.whl
Size 3.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
36417363c799ea7c8b8860c612e23bc37a7d0ee20ffcf2de0b428b70b362093e
BLAKE2b-256 checksum
How to use checksums
8a8093994f0e2cfc41ee0861fa5e9f5b814e4addf008a198264991f2608e489c
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-win32.whl

Download URL konform-0.6.0-py3-none-win32.whl
Size 3.4 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
0017720a4c7a46515990e9288c24b7b0bbc37754cec257f23c0bf444a2723a03
BLAKE2b-256 checksum
How to use checksums
17cadb755c7c3ac27290731f1b7a0e2e6b10d9bf9ee00ed2fa8631bfdf38bf65
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-musllinux_1_2_x86_64.whl

Download URL konform-0.6.0-py3-none-musllinux_1_2_x86_64.whl
Size 3.7 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
72d3b9e346e9cd18bab448dc88e67039b0ccf1983826d8d97e4426abba04360b
BLAKE2b-256 checksum
How to use checksums
cdb5a62d7033960c245b2da61377d47cbd10d59bda28e48080bb68665c69628e
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-musllinux_1_2_aarch64.whl

Download URL konform-0.6.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
08daae6e5c68b941c14020671fc1b6470a06e558ddb70db08404844dd6b7f6ef
BLAKE2b-256 checksum
How to use checksums
2817a690784e38a3b7c6adbe149123a7947907391256a8ee9686a850258e5fc5
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL konform-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4aea1e86b2000b003f07e8cb422111acb5c77cf9ae2dbf53bf8ae8d582a2efa6
BLAKE2b-256 checksum
How to use checksums
896b17734b65a869550b355c6788ecd8834fca2bf1a8684e5e829cefc8a51fcc
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL konform-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Size 3.8 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
ed7da4e313b7a71f03dc01c1fa52d32bfb7e70755689bfd5b7718739843c7a46
BLAKE2b-256 checksum
How to use checksums
995a1a25e3c0af967147bb6ee848a99ecd8149524a45547dc4a557393d0c9e67
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL konform-0.6.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 3.3 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
c8471d137eee5d23bbdae066d77aedabf8cfc71ea3752b02bc07ab6f8a4354d9
BLAKE2b-256 checksum
How to use checksums
75bbd0877426bdc97e06f09736796ded74b0d4ce4d86d258598bddc203303b38
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL konform-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
3b73e4c24ce98f7bc73b59dc34faa9426d430ff4b973ffdf9b563f7e1a6ac45c
BLAKE2b-256 checksum
How to use checksums
b767224c404dbf3f8aba74c6c5c9f952e94e40ead9580fb8cd8da85ebb56ced7
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-macosx_11_0_arm64.whl

Download URL konform-0.6.0-py3-none-macosx_11_0_arm64.whl
Size 3.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a019270eb3827de550f4bfe595dd9b0e1bf048c6e886dce9faed2c4a1acad57d
BLAKE2b-256 checksum
How to use checksums
d474fcb7934357934c4cb9e255edf779685d7ea4eecb3f73ce90d61c0d361d23
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 Oct 21, 2026.

Transparency log

Release files / konform-0.6.0-py3-none-macosx_10_12_x86_64.whl

Download URL konform-0.6.0-py3-none-macosx_10_12_x86_64.whl
Size 3.5 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
961b4354669b5ec8c273af89f3f9a58a0752b754985f54e394ed99cbcb642a6a
BLAKE2b-256 checksum
How to use checksums
75f9c2999dd499d1790f26b143aae5d3e67ae62394ea311884e58441f52e2b40
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 Oct 21, 2026.

Transparency log

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

Select from 11 files

Attestation for konform-0.6.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 Oct 21, 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