MCPcopy
hub / github.com/hugapi/hug / requires

Method requires

hug/routing.py:93–97  ·  view source on GitHub ↗

Adds additional requirements to the specified route

(self, requirements, **overrides)

Source from the content-addressed store, hash-verified

91 return self.where(api=api, **overrides)
92
93 def requires(self, requirements, **overrides):
94 """Adds additional requirements to the specified route"""
95 return self.where(
96 requires=tuple(self.route.get("requires", ())) + tuple(requirements), **overrides
97 )
98
99 def doesnt_require(self, requirements, **overrides):
100 """Removes individual requirements while keeping all other defined ones within a route"""

Callers 3

test_requiresMethod · 0.80
test_requiresMethod · 0.80
test_doesnt_requireMethod · 0.80

Calls 2

whereMethod · 0.95
getMethod · 0.45

Tested by 3

test_requiresMethod · 0.64
test_requiresMethod · 0.64
test_doesnt_requireMethod · 0.64