Python NIST Randomness Beacon
WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS.
Installation
Prerequisites
A required library pycryptodome is used with nistbeacon.
Ubuntu, and other Linux-based users should have python3-dev installed.
apt-get install python3-dev
Installing nistbeacon
To install the beacon library, simply use pip:
pip install nistbeacon
Beacon Usage
It is easy to use the beacon. Most queries are performed through
NistBeacon which produces NistBeaconValue objects.
Beacon Sample Code
from nistbeacon import NistBeacon
# In the examples below I will be using 1447873020
# as my <timestamp> when required
# Current Record (or next closest)
# https://beacon.nist.gov/rest/record/<timestamp>
record = NistBeacon.get_record(1447873020)
# Previous Record
# https://beacon.nist.gov/rest/record/previous/<timestamp>
prev_record = NistBeacon.get_previous(1447873020)
# Next Record
# https://beacon.nist.gov/rest/record/next/<timestamp>
next_record = NistBeacon.get_next(1447873020)
# First Record
# https://beacon.nist.gov/rest/record/1378395540
first_record = NistBeacon.get_first_record(download=True)
# Last Record
# https://beacon.nist.gov/rest/record/last
last_record = NistBeacon.get_last_record()
# Verify the record and the record chain
record_chain_result = NistBeacon.chain_check(1447873020)
Further Documentation
Please refer to the
official documentation
to dive deeper into NistBeacon and NistBeaconValue objects.
Contributing
Please refer to the CONTRIBUTING document on GitHub
Project Health
Branch |
Build Status |
Coverage Status |
|---|---|---|
Master |
||
Develop |
References
Metadata
Release files for nistbeacon 0.9.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nistbeacon-0.9.4.tar.gz | 18.4 kB | Without provenance | Details for nistbeacon-0.9.4.tar.gz |
Release files / nistbeacon-0.9.4.tar.gz
| Download URL | nistbeacon-0.9.4.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e567810860861de7245d440d5a6e0b4b5d09bfee7aec0da6e36c8b5be1a99d96
|
|
BLAKE2b-256 checksum How to use checksums |
17eac00533b17d9aa1802382a3a75f95ee57df83bc0148bd14c7c472e1faeac5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nistbeacon 0.9.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.