Skip to main content

nhs-number

Python package to provide utilities for NHS Numbers, including validity checks, normalisation, and generation.

Package Information

License Licence type badge Version Version badge
Supported versions Coverage
Wheel Implementation
Status Downloads

Documentation

All documentation is available at https://ohtf.github.io/nhs-number-py/.

Implementing this in another language?

Please do - and you are welcome to build on our work. We publish a language-agnostic test vector file capturing how this library behaves (checksums, standardisation, validity, CHI date-of-birth rules, regions and range boundaries), so a port in any language can check itself against the same definition of correct.

It is MIT licensed, like the rest of the project: use it freely, no permission needed. Attribution is appreciated but not required. See Implementing an NHS Numbers package in other languages for what the vectors cover, what is deliberately left out and why, and how to use them.

Other libraries

Similar libraries for other languages:

If you maintain one we have missed, please open an issue and we will add it.

Changelog

https://ohtf.github.io/nhs-number-py/changelog/

Metadata

Release files for nhs-number 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nhs-number 2.2.1
File Size Uploaded Provenance Actions
nhs_number-2.2.1.tar.gz 10.1 kB With provenance Details for nhs_number-2.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nhs-number 2.2.1
File Interpreter ABI Platform Actions
nhs_number-2.2.1-py3-none-any.whl Python 3 none any Details for nhs_number-2.2.1-py3-none-any.whl

Total release size: 22.7 kB

Release files / nhs_number-2.2.1.tar.gz

Download URL nhs_number-2.2.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b6de50b850187a4d335dd224a60461396c7f3bec23acfb8d7a3a14dc877dfe6d
BLAKE2b-256 checksum
How to use checksums
f10169a3ad566b1eec9283633270c743a55240bacae0ea0c3fdc4836fb8a9bcd
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 Nov 5, 2026.

Transparency log

Release files / nhs_number-2.2.1-py3-none-any.whl

Download URL nhs_number-2.2.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c53a6cff79e31ba68e26e88ad6e21f5952e4550de38929a6fa3f67732987675
BLAKE2b-256 checksum
How to use checksums
11f38e354e5bf420c3c9da153da997d054ef1997f84daac559c4824c21539f8f
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 Nov 5, 2026.

Transparency log

Security for nhs-number 2.2.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nhs_number-2.2.1.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 Nov 5, 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