api.integration
Classes
A Morepath-based application object. |
Functions
|
Module Contents
- class api.integration.ApiApp[source]
Bases:
morepath.App
A Morepath-based application object.
You subclass App to create a morepath application class. You can then configure this class using Morepath decorator directives.
An application can extend one or more other applications, if desired, by subclassing them. By subclassing App itself, you get the base configuration of the Morepath framework itself.
Conflicting configuration within an app is automatically rejected. An subclass app cannot conflict with the apps it is subclassing however; instead configuration is overridden.
You can turn your app class into a WSGI application by instantiating it. You can then call it with the
environ
andstart_response
arguments.Subclasses from
dectate.App
, which provides thedectate.App.directive()
decorator that lets you register new directives.- configure_api(**cfg: Any) None [source]
Configures the API.
The following configuration options are accepted:
- Rate_limit:
A tuple with number of request per expiration time in seconds.
Since providing an API is not our main focus, we keep the rate limit rather low (<10 requests per minute) while still allowing small crawl bursts by default.