{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from controller.Event_contoller import EventController" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#Example of a route for sse events publisher\n", "# @app.route('/send')\n", "# def send_message():\n", "# \"\"\"\n", "# Send message to the client\n", "# \"\"\"\n", "# controller = EventController(sse)\n", "# controller.publish_message(\"project\",\"created\",\"{'hello':'world'}\", \"publish\", \"analytics\")\n", "# return \"Message sent\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.2 64-bit ('3.10.2')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.2" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "a9c44c8ff930b067c6bc3f134a348d3cb9f19f01dfb46c39e0c18c228169b636" } } }, "nbformat": 4, "nbformat_minor": 2 }