Endpoint

Base class: Traversable

Class that describes an endpoint in iommi. You can create your own custom endpoints on any Part.

Example:

def my_view(request):
    return Page(
        parts__h1=html.h1('Hi!'),
        endpoint__echo__func=lambda value, **_: value,
    )

this page will respond to ?/echo=foo by returning a json response "foo".

Refinable members

  • func
  • include
    Type: bool
  • iommi_style
    Type: str
  • name
    Type: str

Defaults

  • include
    • True