Skip to content

Conversation

@nggit
Copy link
Owner

@nggit nggit commented Jan 31, 2026

Maps URLs to module names and methods.

This PR adds this hidden feature in examples.

from tremolo import Application
from utils import add_package

app = Application()

# http://localhost:8000/fruits       -> fruits.get()
# http://localhost:8000/fruits/apple -> fruits.apple.get()
add_package('fruits', app)

if __name__ == '__main__':
    app.run('0.0.0.0', 8000)

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants