diff --git a/Shared/Routing.py b/Shared/Routing.py new file mode 100644 index 0000000..10653c2 --- /dev/null +++ b/Shared/Routing.py @@ -0,0 +1,17 @@ +class Route: + def __init__(self, **kwargs): + self.setup(**kwargs) + + def setup(self, **kwargs): + pass + + def run(self, data, handler): + pass + + +def create_routes(routes): + routes = routes.copy() + for prefix in routes: + if type(routes[prefix]) is tuple or type(routes[prefix]) is list: + routes[prefix] = routes[prefix][0](**routes[prefix][1]) + return routes \ No newline at end of file