An ARK minter based on Noid.
Project description
noid-minter
This is an Archival Resource Key (ARK) minter. It is based on John A. Kunze's Nice Opaque Identifiers (Noid) software.
Usage
from noid_minter.minter import Minter
minter = Minter({"template": "xt7.reeedeeedk", "naan": "16417"})
the_ark = minter.mint().ark # e.g. 16417/xt74xg9f4v1p
dump = Minter.to_json() # JSON string
minter2 = Minter.load(dump)
Design considerations
The original Perl Noid provides a minter, binder, and resolver which share
a BerkeleyDB
database for persistence. We reduce scope to the minter only and drop persistence,
providing to_json() and load() methods, with JSON as the transport language,
to allow clients to persist minters as they see fit.
Replayability of random minters is a particular concern. When Noid was first written,
it used Perl's rand for random numbers, which in turn relied on the random number
generator provided by the host system. On many Unix systems, this was
rand48, and in Perl 5.19.4,
the language standardized on rand48. We have chosen to use this PRNG to allow minter
databases that were created with Noid on Unix systems to be migrated to
noid-minter and mint new identifiers in a compatible, replayable manner.
The rand48 PRNG has known defects for pseudo-random number generation. However, we are using it not for pseudo-randomness but first for uniform mixing of the sequence of identifiers generated, so that two identifiers minted together are likely to be quite different, and second for replayability of minting sequences, so that minters can be migrated easily.
Users may want to bring their own PRNG to use with a minter. While support for other PRNGs is not a current priority, we are opening to providing support for pluggable PRNGs for minter. We welcome suggestions and code.
License
Copyright (C) 2024 MLE Slone. 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file noid_minter-0.1.1.tar.gz.
File metadata
- Download URL: noid_minter-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cee80adb37c83a466ad23e4d0657c7eaaba319e3ab00f3fa514d465db09ffc5
|
|
| MD5 |
dabddb91c11cf8ac8740ce3cbb0b9c16
|
|
| BLAKE2b-256 |
be09af06a567eba16908c30867a8dc3dcb5e57e710daf9179f2d8278546503bf
|
File details
Details for the file noid_minter-0.1.1-py3-none-any.whl.
File metadata
- Download URL: noid_minter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c98e654ff966f69ec2c762d430b0a5945cafa2df2c4ac8f4c4f5ba35caa5a873
|
|
| MD5 |
b5880d76cfbe1254cee577d9f05efc80
|
|
| BLAKE2b-256 |
5f63a35699d8fd0f1f13b4b9340235f727c1343e67998a9f1d2844e38a53bd91
|