cfarewell
The right closing line for a formal letter.
Choose a valediction from 40 locale entries, including Swiss German, British English, French, and Japanese. Explicit wording always takes precedence over table defaults. No model or network calls.
import { closing } from '@corbet-labs/cfarewell';
closing('de-ch');
// Freundliche Grüsse
Install
| Environment | Command |
|---|---|
| Rust / Cargo | cargo add cfarewell |
| Python / pip | python -m pip install cfarewell |
| Python / uv | uv add cfarewell |
| Node.js / npm | npm install @corbet-labs/cfarewell |
| pnpm | pnpm add @corbet-labs/cfarewell |
| Yarn | yarn add @corbet-labs/cfarewell |
| Bun | bun add @corbet-labs/cfarewell |
| Deno | deno add npm:@corbet-labs/cfarewell |
The 0.2.1 JavaScript distribution includes compiled ESM, CommonJS, TypeScript declarations, and a standalone browser module. Node.js 20+ is supported; no TypeScript loader is required.
// CommonJS
const { closing } = require('@corbet-labs/cfarewell');
<script type="module">
import { closing } from 'https://cdn.jsdelivr.net/npm/@corbet-labs/cfarewell@0.2.1/dist/browser.js';
console.log(closing('de-ch'));
</script>
Python 3.10+ packages are available on PyPI. See the installation guide for CLI commands and other distribution options. JSR publication and Typst availability are listed there explicitly.
Rust
use cfarewell::closing;
assert_eq!(closing("de-ch", None), "Freundliche Grüsse");
assert_eq!(closing("en-gb", None), "Yours sincerely,");
Python
from cfarewell import closing
assert closing("de-ch") == 'Freundliche Grüsse'
API
| Function | Purpose |
|---|---|
closing(locale, override?) |
Resolve a valediction; even an empty override wins |
availableLocales() / available_locales() |
List the 39 canonical locale codes |
Locale matching is case-insensitive. Resolution tries the exact locale, then its base language, then English: fr-be → fr, xx → en. An override is returned unchanged, including an empty string. The locale table owns punctuation, so callers should not append another comma.
Correspondence family
| Library | Responsibility |
|---|---|
| cletter | Compose the correspondence helpers |
| cgreet | German salutations and titles |
| cfarewell | Locale-specific closings |
| cdate | Calendar-date formatting |
| cink | Handwritten signature images |
Development
Behavior is defined by the locale tables and shared conformance vectors. Rust, JavaScript, and Python run the same vectors. Selected CI checks exercise installed JavaScript tarballs, Python wheels and command-line entrypoints, and Typst packages. Release validation records the actual runtime and platform; Linux results do not establish native Windows or macOS coverage. All five Rust crates forbid unsafe code in their own source.
See the release guide for generation, verification, and publication commands.
License
Copyright 2026 Julian Y. Richard Corbet. The 0.3.0 release line is licensed under LGPL-3.0-only [WITH LGPL-3.0-linking-exception](https://github.com/corbet-labs/cfarewell/blob/main/LICENSES/LGPL-3.0-only%20WITH%20LGPL-3.0-only WITH LGPL-3.0-linking-exception.txt), with the incorporated GPL version 3. Combined works may link statically or dynamically without relinking duties; library modifications stay LGPL. Applications can use a different license subject to the LGPL's conditions. Previously released and already prepared distributions retain their original grants. The installation examples above refer to those available releases; 0.3.0 has not yet been published to registries.
See the licensing notes for distribution conditions and retained notices.
Release files for cfarewell 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cfarewell-0.3.0.tar.gz | 37.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cfarewell-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.1 kB
Release files / cfarewell-0.3.0.tar.gz
| Download URL | cfarewell-0.3.0.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
921b802a7d18334659bf7d2b0365ffec70fb1118f4ae2de4a0dcfe667a485e30
|
|
BLAKE2b-256 checksum How to use checksums |
bcb6810ffe9b22795f72ff07bc73880dddd9bf60ee2d1332130d6fd376f3288f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cfarewell-0.3.0-py3-none-any.whl
| Download URL | cfarewell-0.3.0-py3-none-any.whl |
|---|---|
| Size | 37.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d45eb2b5287e172e02781ad455e99524b2de4bc3ba75d6d0bcbd22843a3069ac
|
|
BLAKE2b-256 checksum How to use checksums |
528427c2fa62a4f216688b69a793784a8b648b29b326694ab690fa2521053122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|