Metadata-Version: 2.1
Name: easy-events
Version: 2.8.2
Summary: An universal wrapper (and useful tool) to make event / commands in python
Home-page: https://github.com/ThePhoenix78/easy-events
Download-URL: https://github.com/ThePhoenix78/easy-events/tarball/master
Author: ThePhoenix78
Author-email: thephoenix788@gmail.com
License: MIT
Keywords: wrapper,event,commands,command
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# easy-events

**A library that help you to manage events**

## Getting started

1. [**Installation**](#installation)
2. [**Usages**](#usages)
3. [**Code example**](#code-example)
4. [**Documentation**](#documentation)

## Installation

`pip install easy-events`

GitHub : [Github](https://github.com/ThePhoenix78/Commands)


## Usages

text

## Code example

```py
from easy_events import EasyEvents

# create an event or use it in a class
client = EasyEvents()


# create another event (can be sync or async)
# you can put as much parameters as you want
@client.add_event("test1")
def test(data, arg1, arg2, *, arg3):
	# data is the default parameter, it contain some basic informations that you can format as you want
	print(data, arg1, arg2, arg3)


# trigger the event

# dict way
client.trigger({"event": "test1", "parameters": {"arg1": "arg1", "arg2": "arg2", "arg3": ["arg3", "arg4"]}})

# dict way v2
client.trigger({"event": "test", "parameters": ["arg1", "arg2", "arg3", "arg4"]})

# dict way v3
client.trigger({"event": "test1", "parameters": "arg1 arg2 arg3 arg4"})

# list way
client.trigger(["test", "arg1", "arg2", "arg3", "arg4"])

# str way
client.trigger("test arg1 arg2 arg3 arg4")

# the result will be (for all cases):
# arg1 = arg1
# arg2 = arg2
# arg3 = [arg3, arg4]

```
