Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpSub Call NameLoad AttributeLoad NameLoad attr Return IfExp AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return IfExp NameLoad AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return IfExp NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore BoolOpOr NameLoad NameLoad If NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Str NameLoad kwarg body Expr Str Return BoolOpAnd NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return BoolOpOr BoolOpAnd NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad decorator_list NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr AttributeLoad NameLoad attr Dict attr NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Dict attr NameLoad NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list decorator_list NameLoad
N/A N/A hug/directives.py

Defines the directives built into hug. Directives allow attaching behaviour to an API handler based simply
on an argument it takes and that arguments default value. The directive gets called with the default supplied,
ther request data, and api_version. The result of running the directive method is then set as the argument value.
Directive attributes are always prefixed with 'hug_'

Copyright (C) 2016  Timothy Edmund Crosley

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

 __future__ absolute_import functools partial timeit default_timer python_timer hug introspect _built_in_directive N/A N/A directive N/A N/A N/A Marks a callable as a built-in directive N/A N/A directive directive True N/A directive N/A Timer N/A object N/A N/A Keeps track of time surpased since instantiation, outputed by doing float(instance) N/A __slots__ N/A start round_to __init__ N/A N/A self round_to N/A None kwargs N/A N/A N/A self start N/A python_timer N/A N/A self round_to round_to N/A __float__ N/A N/A self N/A N/A N/A time_taken N/A N/A python_timer N/A self start N/A N/A N/A self round_to N/A round time_taken N/A self round_to time_taken N/A __int__ N/A N/A self N/A N/A N/A N/A int N/A round N/A float self N/A __native_types__ N/A N/A self N/A N/A N/A N/A N/A self __float__ N/A N/A _built_in_directive module N/A N/A default api N/A None None kwargs N/A N/A Returns the module that is running this hug API function N/A N/A api N/A api module default N/A _built_in_directive api N/A N/A default api N/A None None kwargs N/A N/A Returns the api instance in which this API function is being ran N/A N/A api api default N/A _built_in_directive api_version N/A N/A default api_version N/A None None kwargs N/A N/A Returns the current api_version as a directive for use in both request and not request handling code N/A api_version N/A _built_in_directive documentation N/A N/A default api_version api N/A None None None kwargs N/A N/A returns documentation for the current api N/A api_version N/A default api_version N/A api N/A N/A N/A N/A N/A api http documentation base_url api_version api_version N/A _built_in_directive session N/A N/A context_name request N/A session None kwargs N/A N/A Returns the session associated with the current request N/A N/A request N/A N/A N/A request context get context_name None N/A _built_in_directive user N/A N/A default request N/A None None kwargs N/A N/A Returns the current logged in user N/A N/A N/A request N/A N/A N/A request context get user None default N/A _built_in_directive CurrentAPI N/A object N/A N/A Returns quick access to all api functions on the current version of the api N/A __slots__ N/A api_version api __init__ N/A N/A self default api_version N/A None None kwargs N/A N/A N/A self api_version api_version N/A N/A self api N/A api kwargs N/A __getattr__ N/A N/A self name N/A N/A N/A function N/A N/A N/A N/A N/A N/A N/A self api http versioned get N/A self api_version N/A get name None N/A N/A function N/A N/A function N/A N/A N/A N/A N/A N/A N/A self api http versioned get None N/A get name None N/A N/A function N/A N/A N/A AttributeError N/A N/A API Function {0} not found format name N/A accepts N/A N/A function interface arguments N/A N/A hug_api_version accepts N/A N/A function N/A partial function hug_api_version N/A self api_version N/A N/A hug_current_api accepts N/A N/A function N/A partial function hug_current_api self N/A function N/A N/A _built_in_directive