Skip to main content

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

Metadata

Release files for Random-Event 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Random-Event 0.2
File Size Uploaded
Random Event-0.2.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Random-Event 0.2
File Interpreter ABI Platform
Random_Event-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / Random Event-0.2.tar.gz

Download URL Random Event-0.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bc61e61fe30a465dea83622a559d5b0bcf9082b641d060805ab0aa7ecaf4a478
BLAKE2b-256 checksum
How to use checksums
2f0fee6cfb2a12cf881bcaa6cc3186df83033e42071cad55ed330e32ce8b861f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / Random_Event-0.2-py3-none-any.whl

Download URL Random_Event-0.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78852aec6d4bd2dc1d1e377edb4252d934f69bcf1f61437f060b844b32728e4e
BLAKE2b-256 checksum
How to use checksums
1aec79cbf06025928767a3415b1395681f0fcb844dd0336f5b9d4c8ecbdee804
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page