Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 731 Bytes

context.rst

File metadata and controls

21 lines (14 loc) · 731 Bytes

TransmuteContext

To enable rapidly generating apis, transmute-core has embedded several defaults and decisions about technology choices (such as Schematics for schema validation).

The TransmuteContext <transmute_core.TransmuteContext> allows customizing this behaviour. Transmute frameworks should allow one to provide and specify their own context by passing it as a keyword argument during a function call:

from flask_transmute import add_route

add_route(app, fn, context=my_custom_context)

It is also possible to modify transmute_core.default_context: this is the context that is referenced by all transmute functions by default.