Skip to main content

A package for calculating the check digit of a TMS number

Project description

KiwiRail TMS Checkdigit

A Python package for calculating the check digit of a KiwiRail TMS number.

Introduction

This package provides a simple way to calculate the check digit of a KiwiRail TMS number. It uses a weighted sum algorithm to calculate the check digit.

Installation

To install the package, run the following command:

pip install .

Usage

To use the package, import the tms_checkdigit module and call the calculate_check_digit function:

from KiwiRail_TMS_Checkdigit import tms_checkdigit

tms_number = "AMA100"
check_digit = tms_checkdigit.calculate_check_digit(tms_number)
print(check_digit)

Testing

To run the tests, use the following command:

python setup.py test

Contributing

Contributions are welcome! Please submit a pull request with your changes.

License

This package is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiwirail_tms_checkdigit-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kiwirail_tms_checkdigit-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file kiwirail_tms_checkdigit-1.0.0.tar.gz.

File metadata

  • Download URL: kiwirail_tms_checkdigit-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for kiwirail_tms_checkdigit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7cd4f88d5a5a16143c0e2b0951abbb65276e5919827dbd7f6f713cfa172c268b
MD5 1fb85ad575002a9acdfd73e52d9c7adc
BLAKE2b-256 d342b183086438b57a86ebbab0a5ebb36c78193ad3a64f2152d6dfcf2ec5a152

See more details on using hashes here.

File details

Details for the file kiwirail_tms_checkdigit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kiwirail_tms_checkdigit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1425d9482891e95acff7299a843a62bface36503e976d2abe96681bcb3aa6205
MD5 3a448a2ae72ae522094df08a5331f636
BLAKE2b-256 800281b8ec0df22e9c27e631b2c807b1c4589c4276f27633c312c1958f6d890f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page