Python API for HotBits random data generator
HotBits Python API
Python API for HotBits random data generator.
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.
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) # First byte print(result) # Second byte print(result) # Third byte
You can also look to example file for more examples.
This library is licensed under the GPLv3+ license. See the LICENSE file for details.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.