Skip to main content

Simple Asynchronous Python Library For Random.org API

Project description

Simple Asynchronous Python Library For Random.org API

Hello, thanks for choosing my library to work with the random.org API

Aiohttp was used as a web client

INSTALLATION

pip3 install Pyrandomorg

REQUIREMENTS

python<=3.8
aiohttp<=3.7.3

EXAMPLES

import asyncio

from pyrandomorg.randomorg import randomorg  # import Library

rdorg = randomorg('<Random.org token here>')


async def main():
    print(await rdorg.GenerateIntegers(1, 2, 3))  # This method generates true random integers within a user-defined range.
    print(await rdorg.GenerateStrings(6, 4, "dfsfdsfsdfsdggfdsgdfgdf"))  # This method generates true random strings.
    print(await rdorg.GenerateIntegerSequences(60, 20, 1, 10)) # This method generates uniform or multiform sequences of true random integers within user-defined ranges.


loop = asyncio.get_event_loop()
app = loop.run_until_complete(main())

MORE DETAILS

Random.org API

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

pyrandomorg-0.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

pyrandomorg-0.0.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page