A python module made to generate random event at almost random time
Project description
A python module made to make random event at almost random time based on interval and chance
Installation
pip install random-event
Quick Example
from random_event import events
possible_event_list = ["Earthquake", "Tornado", "Tsunami"]
rand_event = random_event(event_list=possible_event_list, interval=15, chance=50)
# every 15 second, it will decide wether it will generate an event or no, if yes it will pick random item from possible_event_list list
@rand_event.event()
def on_event(event):
print(event)
rand_event.start() # start generating random event every specified interval time
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
Random Event-0.2.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for Random_Event-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78852aec6d4bd2dc1d1e377edb4252d934f69bcf1f61437f060b844b32728e4e |
|
MD5 | 814b8250f4fd3d01dc80c3e05bee1578 |
|
BLAKE2b-256 | 1aec79cbf06025928767a3415b1395681f0fcb844dd0336f5b9d4c8ecbdee804 |