reworked event system

This commit is contained in:
2022-09-30 23:35:03 -05:00
parent d41235882a
commit ee812c520f
5 changed files with 49 additions and 87 deletions

View File

@@ -0,0 +1,22 @@
# Python imports
# Lib imports
# Application imports
class EndpointRegistry():
def __init__(self):
self._endpoints = {}
def register(self, rule, **options):
def decorator(f):
self._endpoints[rule] = f
return f
return decorator
def get_endpoints(self):
return self._endpoints