HTTP API engine

ApiEngine provides a small interface for registering routes and starting or stopping a local HTTP API.

Documented methods

The project lists route, get, post, start, and stop. The quick example below uses the documented GET handler form.

from EasyModel import ApiEngine

api = ApiEngine()
api.get("/", lambda data, headers: {"hello": "world"})
api.start()

Keep handlers limited to the data they need, and check the package documentation for the exact response and lifecycle behavior.

PreviousNext