Skip to content

Commit

Permalink
Add extra namespace (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins authored Aug 17, 2022
1 parent 0ad84e3 commit e840866
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sanic_routing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from .route import Route
from .router import BaseRouter

__version__ = "22.3.0"
__version__ = "22.8.0"
__all__ = ("BaseRouter", "Route", "RouteGroup")
4 changes: 4 additions & 0 deletions sanic_routing/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Route:
"_params",
"_raw_path",
"ctx",
"extra",
"handler",
"labels",
"methods",
Expand All @@ -37,6 +38,8 @@ class Route:

#: A container for route meta-data
ctx: SimpleNamespace
#: A container for route application-data
extra: SimpleNamespace
#: The route handler
handler: t.Callable[..., t.Any]
#: The HTTP methods that the route can handle
Expand Down Expand Up @@ -85,6 +88,7 @@ def __init__(
self.requirements = Requirements(requirements or {})

self.ctx = SimpleNamespace()
self.extra = SimpleNamespace()

self._params: t.Dict[int, ParamInfo] = {}
self._raw_path = raw_path
Expand Down

0 comments on commit e840866

Please sign in to comment.