Usage¶
To use Common helper libraries for Python Apps in a project:
import apphelpers
Securing APIs¶
Example¶
def foo_api():
return "bar"
foo_api.login_required = True
Supported directives¶
login_required¶
Boolean: True / False
If this is set to True only authenticated users are allowed to access the API. By default APIs are public.
all_groups_required¶
List/Tuple
User accessing the API must be member of all the groups specified
def foo_api():
return "bar"
foo_api.groups_required = ['admin', 'moderator']