# Edacious an Event Derive Architecture framework
Implementing an EDA usually requires a queue mechanism. Currently support Redis streams and Amazon Web Services SQS.
Event must be a dict that contain data to be processed.
Every event must have an event type (str) attribute, reserve key is `event-type`.
To process an event the event type has to be associated to one or more event handlers.
Event handler is a function that receive an event (dict) and process it, here is an example for running event listener based on Amazon Web Services SQS.
from edacious.sqs import EventListener
SQS_URL = 'https://sqs.my-region.amazonaws.com/123456789012/my-app-sqs'
@event_handler(event_type='hello-world')
def my_handler(event: dict):
print(event)
if __name__ == '__main__':
listener = EventListener(sqs_url=SQS_URL, visibility_timeout=60, max_messages_to_fetch=10)
listener.set_seconds_to_wait(seconds=2.5)
listener.run()
Raw data
{
"_id": null,
"home_page": "https://github.com/eldad1221/edacious",
"name": "edacious",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Eldad Bishari",
"author_email": "eldad@1221tlv.org",
"download_url": "https://files.pythonhosted.org/packages/12/c8/106af18632d2b2d2ecbebd043d18c923b9599832b8278f561dc5a24e43f8/edacious-0.0.11.tar.gz",
"platform": null,
"description": "# Edacious an Event Derive Architecture framework\n\nImplementing an EDA usually requires a queue mechanism. Currently support Redis streams and Amazon Web Services SQS.\n\nEvent must be a dict that contain data to be processed.\nEvery event must have an event type (str) attribute, reserve key is `event-type`.\n\nTo process an event the event type has to be associated to one or more event handlers.\n\nEvent handler is a function that receive an event (dict) and process it, here is an example for running event listener based on Amazon Web Services SQS.\n\n from edacious.sqs import EventListener\n\n SQS_URL = 'https://sqs.my-region.amazonaws.com/123456789012/my-app-sqs'\n\n\n @event_handler(event_type='hello-world')\n def my_handler(event: dict):\n print(event)\n\n\n if __name__ == '__main__':\n\n listener = EventListener(sqs_url=SQS_URL, visibility_timeout=60, max_messages_to_fetch=10)\n listener.set_seconds_to_wait(seconds=2.5)\n listener.run()\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Edacious an Event Derive Architecture framework",
"version": "0.0.11",
"project_urls": {
"Homepage": "https://github.com/eldad1221/edacious"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4742b7d66dc5f31286eebe4901754b1c1eb8edb1f04cbb1024b4d666f7e89f21",
"md5": "4b7ac84fbae90b0634d9f188e300cdbe",
"sha256": "91938f576a343a1d80b6ecd75ef07d8d3a589d7f6aaca963cd3ba85d1595c404"
},
"downloads": -1,
"filename": "edacious-0.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4b7ac84fbae90b0634d9f188e300cdbe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5211,
"upload_time": "2023-09-21T04:46:58",
"upload_time_iso_8601": "2023-09-21T04:46:58.762138Z",
"url": "https://files.pythonhosted.org/packages/47/42/b7d66dc5f31286eebe4901754b1c1eb8edb1f04cbb1024b4d666f7e89f21/edacious-0.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "12c8106af18632d2b2d2ecbebd043d18c923b9599832b8278f561dc5a24e43f8",
"md5": "74b942040bb8a7ea4fb6568e9472c11f",
"sha256": "0b5a86bdc25251c2d001d7465859f6f76cd5a2adbcc8adc108d0001c6e2d1d97"
},
"downloads": -1,
"filename": "edacious-0.0.11.tar.gz",
"has_sig": false,
"md5_digest": "74b942040bb8a7ea4fb6568e9472c11f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4733,
"upload_time": "2023-09-21T04:47:00",
"upload_time_iso_8601": "2023-09-21T04:47:00.700466Z",
"url": "https://files.pythonhosted.org/packages/12/c8/106af18632d2b2d2ecbebd043d18c923b9599832b8278f561dc5a24e43f8/edacious-0.0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-21 04:47:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eldad1221",
"github_project": "edacious",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "edacious"
}