bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.37k stars 1.46k forks source link

Add bottle tools to plugins doc page #1228

Closed theSage21 closed 3 years ago

theSage21 commented 4 years ago

I made something based on bottle that allows us to auto-fill function arguments using request data.

## This function can reside anywhere in your codebase

@fill_args
def some_function(json_key):
    # json_key will automatically be injected into the function call
    # from the POST data supplied in bottle.request
    pass

## You can then call it like this:

some_function()

I'm not sure if bottle accepts these kinds of pull requests but I thought I'd give it a shot anyways. :shrug: Thanks for the amazing project.

defnull commented 3 years ago

Links are fine :) I'm more picky about PRs that try to add features to bottle itself. Thanks.