react.form.textarea React ^19 · TypeScript only
A labelled multi-line text box with hint, error and an optional live character or word count (GOV.UK).
Not available in Python
1.0.1
ts
16 tests
Apache-2.0
text.truncate
Shorten text to a maximum length on a word boundary and add an ellipsis, counting Unicode code points.
truncate in Python
1.0.0
py rs ts
18 tests
Apache-2.0
react.form.text-field React ^19 · TypeScript only
A labelled single-line text input with hint, error message, autocomplete, prefix and suffix (GOV.UK text input).
Not available in Python
1.0.1
ts
14 tests
Apache-2.0
text.initials
Initials from a personal name for avatars and signatures: "Jean-Paul Sartre" is "JPS".
initials in Python
1.0.0
py rs ts
17 tests
Apache-2.0
collections.search-text
Filter records by a case-insensitive substring match across named fields, in input order.
search_text in Python
1.0.0
py rs ts
20 tests
Apache-2.0
text.number-to-words
Write a money amount in words for a cheque: "one thousand two hundred and thirty-four pounds and fifty-six pence".
amount_in_words in Python
1.0.0
py rs ts
16 tests
Apache-2.0
text.mask
Mask all but the last n characters of a card, account or phone number, optionally keeping separators.
mask in Python
1.0.0
py rs ts
16 tests
Apache-2.0
text.integer-to-words
Spell out a whole number in British English words, with "and" the way a cheque writes it.
integer_to_words in Python
1.0.0
py rs ts
25 tests
Apache-2.0
text.format-decimal
Format a float as plain decimal text with fixed or trimmed places and optional grouping, identically in every language.
format_decimal in Python
1.0.0
py rs ts
19 tests
Apache-2.0
text.slugify
Turn a title into a lowercase ASCII URL slug, transliterating common accented Latin letters.
slugify in Python
1.0.0
py rs ts
21 tests
Apache-2.0
charts.contrast → readableTextColor
WCAG 2.x contrast ratio between two colours, and which text colour reads best on a background.
readable_text_color in Python, one function of this group
1.0.0
py rs ts
22 tests
Apache-2.0
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
normalise_name in Python
1.0.0
py rs ts
23 tests
Apache-2.0
text.pattern-match
Does the whole value match an HTML pattern attribute? The same answer in a browser, Python and Rust.
matches_pattern in Python
1.0.0
py rs ts
47 tests
Apache-2.0
encoding.utf8
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
A group of 2: utf8_encode, utf8_decode
1.0.0
py rs ts
25 tests
Apache-2.0
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parse_money in Python
1.0.0
py rs ts
37 tests
Apache-2.0
form.character-count
The GOV.UK character count message for a text box: characters or words left or over a limit, with a threshold.
character_count in Python
1.0.1
py rs ts
32 tests
Apache-2.0
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2: hex_encode, hex_decode
1.0.0
py rs ts
25 tests
Apache-2.0
form.validate-input
Check a text, email or number input: required, length, pattern and min/max, with GOV.UK messages.
validate_input in Python
1.0.0
py rs ts
49 tests
Apache-2.0
react.form.validated-input React ^19 · TypeScript only
A text, email or number input that checks itself with form.validate-input and shows the error accessibly.
Not available in Python
1.0.0
ts
14 tests
Apache-2.0
encoding.base64
Bytes to base64 and base64url text and back (RFC 4648), with strict decoding, identically in every language.
A group of 4: base64_encode, base64_decode, base64_url_encode, base64_url_decode
1.0.0
py rs ts
46 tests
Apache-2.0
encoding.base32
Bytes to RFC 4648 base32 text (A-Z, 2-7) and back, strictly, as authenticator-app secrets are written.
A group of 2: base32_encode, base32_decode
1.0.0
py rs ts
36 tests
Apache-2.0
math.basis-points
Convert a rate between percent, basis points and a plain ratio exactly, as decimal text or integer basis points.
A group of 3: convert_rate, to_basis_points, from_basis_points
2.0.0
py rs ts
45 tests
Apache-2.0
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roaming_charge in Python
1.0.1
py rs ts
16 tests
Apache-2.0
agri.yield-per-hectare
Crop yield per hectare and per acre from harvested quantity and field area in any area unit, exactly, as decimal text.
yield_per_hectare in Python
1.0.1
py rs ts
19 tests
Apache-2.0
time.countdown
Seconds left until a Unix time, whether it has passed, and a timer text like 4:05, for tokens or retry waits.
countdown in Python
1.0.0
py rs ts
13 tests
Apache-2.0
charts.format
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
A group of 5: format_tick, format_si, format_percent, format_date, format_money_tick
1.0.0
py rs ts
61 tests
Apache-2.0
units.convert
Convert length, mass, area, volume, temperature and energy between units, exactly, as decimal text.
convert_units in Python
1.0.0
py rs ts
31 tests
Apache-2.0
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrence_label in Python
1.0.0
py rs ts
30 tests
Apache-2.0
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
format_money in Python
1.0.0
py rs ts
11 tests
Apache-2.0
todo.parse-quick-add
Turn one typed line like "Pay rent tomorrow !high #home every month" into a todo draft.
parse_quick_add in Python
1.0.0
py rs ts
44 tests
Apache-2.0
todo.parse-tags
Read a tags box as typed, "#Home, work errands", into normalised tags: split on spaces and commas.
parse_tags in Python
1.0.0
py rs ts
12 tests
Apache-2.0
todo.parse-date-phrase
Read a typed due date like "tomorrow", "next friday", "in 2 weeks" or "2026-10-01" as a date, relative to today.
parse_date_phrase in Python
1.0.0
py rs ts
53 tests
Apache-2.0
todo.parse-repeat
Read a Repeat box, "every 2 weeks" or "every monday on 2026-10-05", as a todo's recurrence, or null.
parse_repeat in Python
1.0.0
py rs ts
22 tests
Apache-2.0
todo.export-csv
Write todos as a CSV file (RFC 4180) with one column per field, for backups, spreadsheets and other apps.
export_csv in Python
1.0.0
py rs ts
14 tests
Apache-2.0
email.send Integration · does I/O TypeScript only
Send a transactional email through Resend, any SMTP server or the log, behind one call.
Not available in Python
1.0.0
ts
17 tests
MIT
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
pbkdf2_sha256 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Python
1.0.0
py rs ts
13 tests
Apache-2.0
react.form.select React ^19 · TypeScript only
A labelled drop-down list with a hint, error message and an optional empty first option (GOV.UK select).
Not available in Python
1.0.1
ts
15 tests
Apache-2.0
react.form.address-fields React ^19 · TypeScript only
A UK or international address form under one legend: each line labelled and autocompleted, checked by form.address.
Not available in Python
1.0.0
ts
10 tests
Apache-2.0
react.form.fieldset React ^19 · TypeScript only
Group related inputs under a legend, with a hint and error message described to the whole group (GOV.UK fieldset).
Not available in Python
1.0.1
ts
10 tests
Apache-2.0
react.form.date-field React ^19 · TypeScript only
A labelled date picker (<input type="date">) with min and max, checked by form.iso-date, its error shown accessibly.
Not available in Python
1.0.0
ts
14 tests
Apache-2.0
form.money-input
Read a typed amount as minor units for its currency and locale, check min/max, and format it back.
A group of 3: parse_money_input, format_money_input, money_input_format
1.0.0
py rs ts
61 tests
Apache-2.0
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
A group of 3: issue_access_token, read_access_token, confirm_access_token
1.0.0
py rs ts
33 tests
Apache-2.0
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
Not available in Python
1.0.0
ts
14 tests
Apache-2.0
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
A group of 3: sign_jwt, verify_jwt, decode_jwt
1.0.0
py rs ts
54 tests
Apache-2.0
react.form.error-summary React ^19 · TypeScript only
A "There is a problem" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).
Not available in Python
1.0.1
ts
21 tests
Apache-2.0
react.form.button React ^19 · TypeScript only
A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).
Not available in Python
1.0.1
ts
13 tests
Apache-2.0
react.form.date-input React ^19 · TypeScript only
Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).
Not available in Python
1.0.1
ts
14 tests
Apache-2.0
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.
Not available in Python
1.0.1
ts
21 tests
Apache-2.0
charts.layout
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
A group of 3: plot_area, legend_rows, avoid_collisions
1.0.1
py rs ts
33 tests
Apache-2.0
todo.import-csv
Read todos from a CSV file (RFC 4180) as todo.export-csv writes it, checking every row, with row-numbered errors.
A group of 2: import_csv, validate_todo_csv
1.1.0
py rs ts
59 tests
Apache-2.0
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
A group of 5: axis_from_ticks, number_axis, time_axis, band_axis, grid_lines
1.0.1
py rs ts
49 tests
Apache-2.0
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
fleet_emissions in Python
1.0.1
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
hospitality.recipe-cost
Cost a recipe and each portion from ingredient quantities, pack sizes and pack prices, allowing for trim and waste.
recipe_cost in Python
1.0.1
py rs ts
25 tests
Apache-2.0
hospitality.recipe-scale
Scale a recipe to a new number of portions, tidying metric units (g to kg, mL to L) and rounding to kitchen precision.
scale_recipe in Python
1.0.1
py rs ts
26 tests
Apache-2.0
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
A group of 3: parse_ipv6, format_ipv6, is_ipv6
1.0.0
py rs ts
47 tests
Apache-2.0
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Python
1.0.0
py rs ts
13 tests
Apache-2.0
fleet.fuel-cost
Fuel cost of a trip from distance, fuel economy (UK or US mpg, or L/100km) and price per litre, exactly.
fuel_cost in Python
1.0.0
py rs ts
24 tests
Apache-2.0
validation.uk-modulus-table
Parse Vocalink's VALACDOS.txt and SCSUBTAB.txt into the table UK sort code modulus checking needs.
parse_uk_modulus_table in Python
1.0.0
py rs ts
28 tests
Apache-2.0
net.cidr
CIDR blocks: network, broadcast, first and last host, host count, netmask and prefix, and membership.
A group of 5: cidr_info, cidr_contains, is_cidr, prefix_to_netmask, netmask_to_prefix
1.0.0
py rs ts
70 tests
Apache-2.0
fleet.cost-per-mile
Whole-life cost per mile of a vehicle, in tenths of a penny, from depreciation, fuel, maintenance, insurance and tax.
cost_per_mile in Python
1.0.0
py rs ts
13 tests
Apache-2.0
todo.filter
The todos a list view shows: all, active or completed, optionally one tag, and a search box, in input order.
filter_todos in Python
1.0.0
py rs ts
17 tests
Apache-2.0
net.ip-classify
Classify an IPv4 or IPv6 address as loopback, private, link-local, multicast, documentation, CGNAT or global.
classify_ip in Python
1.0.0
py rs ts
34 tests
Apache-2.0
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validate_hostname in Python
1.0.0
py rs ts
26 tests
Apache-2.0
todo.summary
Counts for a todo list's header or footer: total, active, done, overdue, due today, percent done and "3 items left".
summarise_todos in Python
1.0.0
py rs ts
13 tests
Apache-2.0
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normalise_email in Python
1.0.0
py rs ts
12 tests
Apache-2.0
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
Not available in Python
1.0.1
ts
22 tests
Apache-2.0
crypto.sha1
The SHA-1 digest of a byte string (FIPS 180-4), for HMAC-SHA1 in HOTP/TOTP codes; not for new signatures.
sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
A group of 4: parse_hex, to_hex, srgb_to_linear, linear_to_srgb
1.0.1
py rs ts
39 tests
Apache-2.0
retail.price-per-unit
Unit price for shelf-edge labels: price per kg, per 100 g, per litre, per 100 ml, per metre or per item.
unit_price in Python
1.0.1
py rs ts
27 tests
Apache-2.0
units.parse-quantity
Parse "2.5 kg", "1,200 m" or "12 ft 6 in" into an exact decimal value and a canonical unit symbol, strictly.
parse_quantity in Python
1.0.0
py rs ts
31 tests
Apache-2.0
net.ipv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
A group of 3: parse_ipv4, format_ipv4, is_ipv4
1.0.0
py rs ts
39 tests
Apache-2.0
net.mac-address
Validate a MAC address in colon, hyphen, Cisco dot or bare form and normalise it, with multicast and local bits.
validate_mac_address in Python
1.0.0
py rs ts
22 tests
Apache-2.0
net.port-list
Parse a port list such as 22,80,8000-8010 into port numbers, in order and without duplicates.
parse_port_list in Python
1.0.0
py rs ts
27 tests
Apache-2.0
time.duration
Parse durations written as 1h30m, 90m or 01:30, add them up in whole minutes, and format the total.
duration in Python
1.0.0
py rs ts
23 tests
Apache-2.0
monitor.http-check-result
Classify one HTTP probe as up, degraded or down, with a reason and message, from status, body and latency.
classify_http_check in Python
1.0.0
py rs ts
39 tests
Apache-2.0
collections.diff
Compare two lists of records by key: which were added, which removed, and which changed and in what fields.
diff_by_key in Python
1.0.0
py rs ts
18 tests
Apache-2.0
property.floor-area Unreviewed
Floor area from room lengths and widths, exactly, with the total in both square metres and square feet.
floor_area in Python
1.0.2
py rs ts
20 tests
Apache-2.0
banking.cheque-amount-words
The words and figures to write on a cheque: "One hundred and twenty pounds and fifty pence only", "£120.50".
cheque_amount_words in Python
1.0.0
py rs ts
18 tests
Apache-2.0
todo.normalise-tags
Clean up tags as typed: trim, drop the #, lower-case slug form, drop empties and duplicates, keep the order.
normalise_tags in Python
1.0.0
py rs ts
13 tests
Apache-2.0
auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
A group of 3: hash_password, verify_password, password_needs_rehash
1.0.0
py rs ts
36 tests
Apache-2.0
auth.email-token
Hashed single-use tokens for email verification, password reset and magic links, with expiry, as pure steps.
A group of 4: generate_email_token, hash_email_token, check_email_token, consume_email_token
1.0.0
py rs ts
43 tests
Apache-2.0
react.form.form-field React ^19 · TypeScript only
Wire a label, hint and error message to one form control by id, the accessible way (GOV.UK form group pattern).
Not available in Python
1.0.1
ts
19 tests
Apache-2.0
payments.stripe-checkout Integration · does I/O TypeScript only
Start a Stripe Checkout session and verify Stripe's signed webhooks, with a local stand-in for development.
Not available in Python
1.1.0
ts
41 tests
MIT
crypto.hmac-sha256
HMAC-SHA256 of a message under a secret key (RFC 2104, RFC 4231), in pure code that also runs in the browser.
hmac_sha256 in Python
1.0.0
py rs ts
13 tests
Apache-2.0
form.address
Check a UK or international postal address form: required lines, lengths, country and postcode.
A group of 2: validate_address, address_format
1.0.0
py rs ts
37 tests
Apache-2.0
time.unix-to-iso
Unix time in seconds to an ISO 8601 UTC timestamp such as 2026-09-26T12:00:00Z, for years 0001 to 9999.
unix_to_iso in Python
1.0.0
py rs ts
15 tests
Apache-2.0
crypto.hmac-sha1
HMAC-SHA1 of a message under a secret key (RFC 2104, RFC 2202), the MAC under HOTP and TOTP codes.
hmac_sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
A group of 7: line_path, area_path, step_path, monotone_curve, bar_rects, arc_path, pie_angles
1.0.1
py rs ts
70 tests
Apache-2.0
retail.sku-generate
Build a deterministic stock-keeping unit code from a prefix and product attributes.
generate_sku in Python
1.0.0
py rs ts
15 tests
Apache-2.0
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in Python
1.0.0
py rs ts
17 tests
Apache-2.0
charts.palette
A categorical palette of n colour-blind-safe colours for chart series: Okabe-Ito or Paul Tol's bright scheme.
palette in Python
1.0.0
py rs ts
12 tests
Apache-2.0
manufacturing.batch-size
Economic batch quantity: the EOQ for a batch made at a finite production rate, in whole units.
economic_batch_quantity in Python
1.0.0
py rs ts
20 tests
Apache-2.0
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
line_chart in Python
1.0.0
py rs ts
11 tests
Apache-2.0
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validate_journal in Python
1.0.0
py rs ts
16 tests
Apache-2.0
net.device-status
Classify a device as up, degraded or down from its latency summary and loss, p95 and jitter thresholds.
device_status in Python
1.0.0
py rs ts
22 tests
Apache-2.0
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validate_device in Python
1.0.0
py rs ts
17 tests
Apache-2.0
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sort_todos in Python
1.0.0
py rs ts
20 tests
Apache-2.0
logistics.hs-code-validate
Check the format of a commodity code: 6-digit HS, 8-digit CN or 10-digit TARIC/UK code, with chapter and heading checks.
validate_hs_code in Python
1.0.0
py rs ts
16 tests
Apache-2.0
monitor.parse-access-log
Parse one Apache/NCSA Common or Combined Log Format access log line; null for a line in neither format.
parse_access_log in Python
1.0.0
py rs ts
21 tests
Apache-2.0