Demo entry 6339103

decorators.py

   

Submitted by anonymous on Dec 20, 2016 at 00:10
Language: Python 3. Code size: 348 Bytes.

import ujson
from aiohttp.web import Response
from datetime import datetime
from functools import wraps


def audit(coroutine_handler):
    @wraps(coroutine_handler)
    async def wrapper(self, request):
        print(request.__dict__)
        status = await coroutine_handler(self, request)
        return status

    return wrapper

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).