Skip to main content

NMI-Checksum

PyPI version PyPi downloads

A library to validate National Metering Identifiers (NMIs)

The validation rules are as per the Australian National Metering Identifier Procedure.

Usage

from nmicheck import nmi_checksum

checksum = nmi_checksum("QAAAVZZZZZ")
print(checksum)  # 3
from nmicheck import nmi_checksum_valid

print(nmi_checksum_valid("QAAAVZZZZZ3"))  # True
print(nmi_checksum_valid("QAAAVZZZZZ0"))  # False
from nmicheck import long_nmi, short_nmi

print(long_nmi("NMI00012345"))    # NMI000123458
print(short_nmi("NMI000123458"))  # NMI00012345

If you want to obfuscate a NMI (such as for privacy reasons) there is a helper function for that.

from nmicheck import obfuscate_nmi
print(obfuscate_nmi("NMI00012345", salt="secret"))  # 0E6816DCBA3
print(obfuscate_nmi("NMI00012345", salt="other"))   # 756C6E4B029

You can also look up the participant code for a particular NMI (which DNSP or TNSP) based on the NMI Allocation List.

from nmicheck import nmi_participant

participant = nmi_participant("6102000000")
print(participant)  # CITIPP

participant = nmi_participant("3202000000")
print(participant)  # PLINKP

Metadata

Release files for nmicheck 0.4.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 nmicheck 0.4.0
File Size Uploaded Provenance Actions
nmicheck-0.4.0.tar.gz 4.2 kB Without provenance Details for nmicheck-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nmicheck 0.4.0
File Interpreter ABI Platform Actions
nmicheck-0.4.0-py3-none-any.whl Python 3 none any Details for nmicheck-0.4.0-py3-none-any.whl

Total release size: 9.4 kB

Release files / nmicheck-0.4.0.tar.gz

Download URL nmicheck-0.4.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
837ced3d1c149609041f02f1cf7ba4b7a75c3c54c16e55327e4b8aa94921c0f7
BLAKE2b-256 checksum
How to use checksums
298b9c74a338ba434b687663879a985bb1159ba4f93e5727733c6737b9e1c391
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nmicheck-0.4.0-py3-none-any.whl

Download URL nmicheck-0.4.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f498304d5f73d48a3af5554341809ff414d3aa35621576ebb9e1f263047af29c
BLAKE2b-256 checksum
How to use checksums
736b2906bd8991b59ed64ab7831afedbba00334ce126d2a48c9cde8390403e1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for nmicheck 0.4.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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