Skip to main content

KID util

Build Status

Development moved to PyPi package norwegian-numbers: GitHub PyPi

Simple utils to generate and verify KID numbers with either MOD10 or MOD11.

Installation

To install from PyPi as a module in your environment:

pip install kid-util

To install from source as a module in your environment:

python setup.py install

Code usage from installation

Example code usages after installation:

>>> import kid
>>> kid.make('1234')
'12344'
>>> kid.make('1234', mode='MOD11')
'12343'
>>> kid.verify('12344')
True
>>> kid.verify('12343', mode='MOD11')
True

Running from command line

Generating KID from integer string:

$ python -m kid -g 2345678
23456783
$ python -m kid -m mod11 -g 2345678
23456788

Verifying KID from string:

$ python -m kid -v 23456783
True
$ python -m kid -v 23456788
False
$ python -m kid -m mod11 -v 23456788
True
$ python -m kid -m mod11 -v 23456783
False

Testing from source

To run the tests:

python -m unittest discover

Or if you have tox:

tox

Distribution

The distribution was created by the following commands:

python setup.py sdist bdist_wheel
python -m twine upload dist/*

Release files for kid-util 1.0.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 kid-util 1.0.1
File Size Uploaded
kid-util-1.0.1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kid-util 1.0.1
File Interpreter ABI Platform
kid_util-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / kid-util-1.0.1.tar.gz

Download URL kid-util-1.0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
25fa8fdf4e1bb0d1efa768688f7e8ad853067253a6cd2b1b37d115524801ee9f
BLAKE2b-256 checksum
How to use checksums
747a973f0d139f0481449cb0688bc2b87567218734111f546733b0a13d58b6f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release files / kid_util-1.0.1-py3-none-any.whl

Download URL kid_util-1.0.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca2d2f507181cb3affe255aeb378ba0c34dca27d6a8574d2710abc690b1c186b
BLAKE2b-256 checksum
How to use checksums
c75de026a7384e657a54da3ca0bed7564c53d337feb9b95c1761a19b7ee65333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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