Metadata-Version: 2.4
Name: ehorizon
Version: 0.2.3
Summary: A python library that adds events to communicate through other files.
Author-email: Hero3806 <sussymanxdxd@gmail.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Event Horizon

![PyPI Version](https://img.shields.io/pypi/v/ehorizon)
![Python Version](https://img.shields.io/pypi/pyversions/ehorizon)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-black?logo=github)](https://github.com/hero3806/EventHorizon)
![GitHub stars](https://img.shields.io/github/stars/hero3806/EventHorizon)
![GitHub license](https://img.shields.io/github/license/hero3806/EventHorizon)


[![PyPI Downloads](https://static.pepy.tech/personalized-badge/ehorizon?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/ehorizon)

A python library that adds events to communicate through other files.

## Installation

```bash
pip install ehorizon
```

## Example Code Snippet

- Events:

test.py:
```py
from EventHorizon import Event
import callback

myEvent = Event("MyEvent")

myEvent.Fire("Hello World!")
```

callback.py:
```py
from EventHorizon import Event

@Event("MyEvent").OnEvent
def callback(message):
    print(message)
```

- Functions:

test.py:
```py
from EventHorizon import Function
import function

myFunc = Function("MyFunc")

favourite_number = myFunc.run()

print(favourite_number)
```

function.py:
```py
from EventHorizon import Function

@Function("MyFunc").AttachFunction
def callback():
    return 5
```
