willpyre.app

class willpyre.app.App(router: ~willpyre.router.Router, request_class: ~willpyre.structure.Request = <class 'willpyre.structure.Request'>, response: ~willpyre.structure.Response = <willpyre.structure.Response object>, config=None)[source]

Bases: object

The App class is used as the app.

It which will be used for all activities. This requires a Router to be attached for serving responses accordingly. To instantiate a name value is also needed. The __call__ function has the ASGI app.

add_middleware(middleware, **options) None[source]