Skip to main content

gubbins

Serial number generator/validator

A simple but powerful serial number generator and validator written in Python. Given a Prefix and a 32-bit ID, produces a Serial. Given a valid Serial, returns the Prefix and 32-bit ID. Optionally takes Additional Data.

from gubbins import Gubbins

for i in range(10):
	serial = Gubbins.generate("AX", i)
	prefix, id = Gubbins.validate(serial)
	assert prefix.lower() == "AX".lower()
	assert id == i
	print(i, serial)

or via the command-line,

python3 -m gubbins.generate 1-10 --solo --prefix AX | python3 -m gubbins.validate

Requires

License: MIT

Download files

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

Source Distribution

gubbins-0.0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

gubbins-0.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file gubbins-0.0.3.tar.gz.

File metadata

  • Download URL: gubbins-0.0.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for gubbins-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6c7bab04dba95d3b1206fced25ed29b3cfbdcde651535787483e8794a8a4ddb1
MD5 8458b06406376aa3110749b7242c3b92
BLAKE2b-256 c3a6b8a3492b3140d219d982a041b2a4f749839c4ea11ec5977b10e7b3a1bc09

See more details on using hashes here.

File details

Details for the file gubbins-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: gubbins-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for gubbins-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 89f391f547e80fc0c68aec1c91bd4c3d1192579c034efd917d6554266ea91303
MD5 427092dc5658918b7d33275942b04940
BLAKE2b-256 19b3f8dc7df24315673cb2ff48ced66d44b234b015c6fe728f085c562766b2a2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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