Environment variables¶
The following environment variables control runtime behaviour without requiring code changes.
Download and cache¶
Variable |
Description |
|---|---|
|
Directory used to store downloaded LanguageTool packages.
Default: |
|
Path to an existing local LanguageTool installation directory. When set, the automatic download is skipped entirely. |
|
Override the snapshot download host.
Default: |
|
Override the release download host for LanguageTool ≥ 6.7.
Default: |
|
Override the release download host for LanguageTool 6.0–6.6.
Default: |
|
Override the archive download host for LanguageTool 4.0–5.9.
Default: |
|
Maximum ZIP download size in bytes.
Default: |
Integrity verification¶
Downloaded ZIPs are verified with SHA-256 when a checksum is available. Checksums are resolved in this order:
LTP_DOWNLOAD_SHA256_<VERSION>- version-specific checksum. Non-alphanumeric characters in the version string are replaced with_and uppercased (e.g.LTP_DOWNLOAD_SHA256_6_8for version6.8).LTP_DOWNLOAD_SHA256- fallback checksum applied to any version.The bundled
language_tool_python/_ressources/integrity.tomlmanifest, which covers release and archive downloads. Snapshots are not included.
If none of the above resolves to a checksum, the download proceeds without verification.
Variable |
Description |
|---|---|
|
Expected SHA-256 for a specific LanguageTool version
(e.g. |
|
Fallback SHA-256 for any downloaded archive. |
|
Set to |
Safe ZIP extraction limits¶
Variable |
Description |
|---|---|
|
Maximum total compressed size in bytes.
Default: |
|
Maximum total extracted size in bytes.
Default: |
|
Maximum number of members in the ZIP archive.
Default: |
|
Maximum extracted size for a single member in bytes.
Default: |
|
Maximum compression ratio for a single member.
Default: |
|
Maximum compression ratio for the whole archive.
Default: |
Example¶
# Use a custom cache directory
export LTP_PATH=/path/to/cache
# Skip download and use an existing installation
export LTP_JAR_DIR_PATH=/path/to/LanguageTool-6.8
# Verify a specific release
export LTP_DOWNLOAD_SHA256_6_8=<sha256>
# Or bypass verification entirely (not recommended)
export LTP_BYPASS_VERIFIED_DOWNLOADS=true