Cornea/src/old-src/utils/endpoint_registry.py

23 lines
352 B
Python
Raw Normal View History

2022-10-23 07:08:53 +00:00
# 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