Python API for HotBits random data generator
Project description
HotBits Python API
Python API for HotBits random data generator.
Description
This project is random data generator. It uses is HotBits API web service for radioactively-generated random data.
The web service generates random data. Without API token, only pseudorandom data will be returned. For radioactively-generated random data, you would need to request free API key.
The project is not part of the HotBits. It is just API client for it, made by community. For any information about HotBits, you should use the official website.
Usage
First, you need to import the generator class:
from hotbits import RandomDataGenerator
Then you need to init the generator client, with default service URL:
generator = RandomDataGenerator()
Custom URL can be changed with parameters:
generator = RandomDataGenerator(custom_url='https://example.com')
You can then generate data with specific length and API key:
result = generator.generate(
length='256',
apikey='exampleAPIkey'
)
Length of 128 bytes is used by default. If no API key is specified, pseudorandom data will be returned.
Random data are returned as list:
print(result[0]) # First byte
print(result[1]) # Second byte
print(result[3]) # Third byte
You can also look to example file for more examples.
Versioning
This library uses SemVer for versioning. For the versions available, see the tags on this repository.
License
This library is licensed under the GPLv3+ license. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file hotbits-1.0.1.tar.gz
.
File metadata
- Download URL: hotbits-1.0.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ed1f8f4d53415cbb3955df781f686b8e59f4ff84bdd0efb3d0b3b961e7d8f4e |
|
MD5 | a42b5ccaf04c4e3824be5c1fbb3d7fc0 |
|
BLAKE2b-256 | f6e847c56742de12eb027f85b31438961c3a554c1803346b4d4be22da204822c |
File details
Details for the file hotbits-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: hotbits-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72c8b163605c4fe95cb1e7c0170f4065df7afa1f6cdb3c2570d44a01797b5eb |
|
MD5 | b6f5873e8bfccc285aedca709ffe157c |
|
BLAKE2b-256 | f0c6d9fccdc6cadd449e8ae2704aa69f6fe90c4d9a60ce5621438ff834588992 |