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
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Random Event-0.2.tar.gz.
File metadata
- Download URL: Random Event-0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc61e61fe30a465dea83622a559d5b0bcf9082b641d060805ab0aa7ecaf4a478
|
|
| MD5 |
da7a30f57519d04ddd81441e044b5c06
|
|
| BLAKE2b-256 |
2f0fee6cfb2a12cf881bcaa6cc3186df83033e42071cad55ed330e32ce8b861f
|
File details
Details for the file Random_Event-0.2-py3-none-any.whl.
File metadata
- Download URL: Random_Event-0.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78852aec6d4bd2dc1d1e377edb4252d934f69bcf1f61437f060b844b32728e4e
|
|
| MD5 |
814b8250f4fd3d01dc80c3e05bee1578
|
|
| BLAKE2b-256 |
1aec79cbf06025928767a3415b1395681f0fcb844dd0336f5b9d4c8ecbdee804
|