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 KiwiRail-TMS-Checkdigit

Usage

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

import KiwiRail_TMS_Checkdigit as tms

tms_number = "AMA100"
check_digit = tms.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.1.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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kiwirail_tms_checkdigit-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2a030cbfe39244672588673037b3cd3aba022050ef056e1700173797b3ae4dec
MD5 d68fe7fa67ee0004175b95e9b308a6c7
BLAKE2b-256 3df667865775dcd6ba4bf94ce8ceaf7e454900bb69332174cef872fe2fb65d8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kiwirail_tms_checkdigit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5bc87b4278c6059016401ba64cca2afcfce72afa68cc7f985b4832e70e68496
MD5 7850765b613170260289598e0ef999b8
BLAKE2b-256 85b65b7038d773e08870ef85175e24bfc033dd3798ce7a188418199bc8faf7e2

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