Skip to main content

harper-py

PyPI Python versions CI License

Python bindings for Harper, Automattic's offline English grammar checker written in Rust: grammar, spelling and style in milliseconds, in process, with no Java and no server. Unofficial; the API is the official harper.js one, in snake_case.

pip install harper-py
from harper import Linter

linter = Linter()  # build once and reuse: construction loads the dictionary
text = "This is an test of the the linter."
for lint in linter.lint(text):
    print(f"{lint.span.start}: {lint.problem_text!r} {lint.message}")
    print("   ", linter.apply_suggestion(text, lint, lint.suggestions[0]))
8: 'an' Incorrect indefinite article.
    This is a test of the the linter.
19: 'the the' Did you mean to repeat this word?
    This is an test of the linter.

Spans are str indices, so text[lint.span.start:lint.span.end] is always the flagged text, emoji included. Markdown (the default), plain text and Typst are understood; dialects, rule configuration, a user dictionary, ignored lints and Weirpacks work as in harper.js. The guide has the tour.

Why not language-tool-python

harper-py language-tool-python
Runtime none, the wheel is self-contained Java ≥ 17 and a local LanguageTool server it starts
Download 9.7–10.4 MB wheel, depending on the platform a 60 kB wheel, then the LanguageTool 6.8 zip (259 MB) on first use
Cold start 0.23 s: import harper + Linter() in a fresh process starts a JVM server (not measured: no Java on this machine)
Lint 1007 words 23 ms (first call in a process: 95 ms) —

Measured on an Apple M4 Mac mini, CPython 3.11, with benchmarks/bench.py. LanguageTool has far more rules and languages; Harper is the choice when you want English checking that starts fast and ships as a plain dependency.

Platforms

Wheels for Linux (glibc and musl; x86_64, aarch64), macOS (arm64, x86_64) and Windows (x64, arm64); one abi3 wheel per platform covers CPython 3.10 and later. Building the sdist needs a Rust toolchain.

Same as harper.js

Linter is harper.js's Linter interface, synchronous: organizedLints → organized_lints, getLintConfig → get_lint_config, LintOptions → keyword arguments. Harper inside is 2.13.0 (harper-core, harper-stats, harper-typst from crates.io), with harper-wasm's features. Lints are checked against harper-cli of the same version on a 52-document corpus, and harper.js's own test suite is ported. Every difference is listed in DEVIATIONS.md.

License

Apache-2.0, like Harper. The binding layer is ported from Harper's harper-wasm.

Metadata

Release files for harper-py 0.2.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 harper-py 0.2.0
File Size Uploaded Provenance Actions
harper_py-0.2.0.tar.gz 78.6 kB With provenance Details for harper_py-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for harper-py 0.2.0
File Actions
harper_py-0.2.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for harper_py-0.2.0-cp310-abi3-win_arm64.whl
harper_py-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for harper_py-0.2.0-cp310-abi3-win_amd64.whl
harper_py-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for harper_py-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
harper_py-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for harper_py-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
harper_py-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for harper_py-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
harper_py-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for harper_py-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
harper_py-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for harper_py-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
harper_py-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for harper_py-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 80.9 MB

Release files / harper_py-0.2.0.tar.gz

Download URL harper_py-0.2.0.tar.gz
Size 78.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cf4bdd74fa573621b8ef2c08a4cfd32286d91ccea011ea04eccee0801d40726e
BLAKE2b-256 checksum
How to use checksums
5f0171acd6f05791c64dff191c7638045fb25ab61b91778edf90c11ccc3b89de
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-win_arm64.whl

Download URL harper_py-0.2.0-cp310-abi3-win_arm64.whl
Size 10.0 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
3eb6f1a9d1a217ce15c400d57924be8c93424df40e2a76b2e1809c3103fc3dbc
BLAKE2b-256 checksum
How to use checksums
151abda5b64e173bc85fd5d204d79eb87cd2f2b839db57ce159cb49a9520a015
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-win_amd64.whl

Download URL harper_py-0.2.0-cp310-abi3-win_amd64.whl
Size 10.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
856aa94f45705543c0541bccdb564116f0f8a1bc371d44acd33aa5d7f50e3df1
BLAKE2b-256 checksum
How to use checksums
c177e265879293c51678bfe8dadac5d305d4045fdecf85e609b2b6ee4d19df46
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL harper_py-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 10.5 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
51cdced3fbf8b72af5e19612356e35d0df8db3df1313a572be43ee6a0f9ded44
BLAKE2b-256 checksum
How to use checksums
7821379b7f4361eee0987a56c0e5da20a26176dfa140e33f6b354827516410b9
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL harper_py-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 10.1 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
dde0bb5c684ad1599cd1b69ca29d16993fd6b2f7874b581aaac7f12206fffd49
BLAKE2b-256 checksum
How to use checksums
ac6764ef5260c33b99ea0bf0870ee787d0d733e978dbd33ac81f9b8fe28f82d7
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL harper_py-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
65a9230eb0037bc7fc1728c440c291becc048ede22a048471107385908956776
BLAKE2b-256 checksum
How to use checksums
8111aae1ac78eb824b9a05681eb24bcc0151582c8a154eedf8180f154aecd284
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL harper_py-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 9.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2d0b02947e28f2dc2b903f9625ad39bebb68b2fc42f8f38742f410ff459fd607
BLAKE2b-256 checksum
How to use checksums
b69b604e638fd95598a4617ab2a97d6888c3e1069e7859c1c93eba49511fbe6b
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL harper_py-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a18709662f9d645b9d6ea02380ee1496888bcc7560fcdaca38d708e4c063da3
BLAKE2b-256 checksum
How to use checksums
7a271ddba27e4f33c66c410031b7afdcc51d040d680c4d9f73ef43bd8bd1ae52
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 25, 2026.

Transparency log

Release files / harper_py-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL harper_py-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 10.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d42dc17770768c1a83f87e502c3b6aa7154ab6d289058b76c1f5e7deb8e38235
BLAKE2b-256 checksum
How to use checksums
7808ec67e10d113f0db7f5e8019a1aff32c351e7b8e46cb4e33d371af3daaa31
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 25, 2026.

Transparency log

Security for harper-py 0.2.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 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for harper_py-0.2.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 25, 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