Skip to content

APIStack: Reusing same Bottle instance #2

@romainptit

Description

@romainptit

Trying to add extra filter to the bottle router:

app = udon.wsgi.APIStack(prefix="/api")
app.app.router.add_filter("uuid", uuid_filter)
app.install_module("my_module")

But the bottle instance is overridden at each call to app.install_module so cannot use the new uuid filter in my_module.

Is there a reason for creating a new instance of bottle here:

app = stack.app_factory()

Instead of doing:

app = stack.app

Or is there a better way for customizing the APIStack router ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions