MCPcopy
hub / github.com/sanic-org/sanic / append

Method append

sanic/blueprints.py:873–885  ·  view source on GitHub ↗

Add a new Blueprint object to the group. The Abstract class `MutableSequence` leverages this append method to perform the `BlueprintGroup.append` operation. Args: value (Blueprint): New `Blueprint` object. Returns: None

(self, value: Blueprint)

Source from the content-addressed store, hash-verified

871 return len(self._blueprints)
872
873 def append(self, value: Blueprint) -> None:
874 """Add a new Blueprint object to the group.
875
876 The Abstract class `MutableSequence` leverages this append method to
877 perform the `BlueprintGroup.append` operation.
878
879 Args:
880 value (Blueprint): New `Blueprint` object.
881
882 Returns:
883 None
884 """
885 self._blueprints.append(value)
886
887 def exception(self, *exceptions: Exception, **kwargs) -> Callable:
888 """Decorate a function to handle exceptions for all blueprints in the group.

Callers 15

groupMethod · 0.95
register_typeMethod · 0.45
waitMethod · 0.45
getMethod · 0.45
parse_forwardedFunction · 0.45
_generate_bodyMethod · 0.45
_generate_outputMethod · 0.45
register_listenerMethod · 0.45
register_middlewareMethod · 0.45
blueprintMethod · 0.45

Calls

no outgoing calls

Tested by 15

_requestFunction · 0.36
mw_1Function · 0.36
mw_2Function · 0.36
mw_3Function · 0.36
mw_4Function · 0.36
mw_5Function · 0.36
mw_6Function · 0.36
handler_1Function · 0.36
handler_2Function · 0.36
handler_3Function · 0.36
handler_4Function · 0.36
handler_5Function · 0.36