How to use the ring.aiodict function in ring

To help you get started, we’ve selected a few ring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github youknowone / ring / tests / _test_func_asyncio.py View on Github external
        @ring.aiodict(storage)
        @classmethod
        @asyncio.coroutine
        def cmethod(cls, a, b):
            return base + a * 200 + b
github youknowone / ring / tests / _test_func_asyncio.py View on Github external
        @ring.aiodict(storage)
        @asyncio.coroutine
        def method(self, a, b):
            return base + a * 100 + b
github youknowone / ring / tests / _test_func_asyncio.py View on Github external
    @ring.aiodict(cache)
    @asyncio.coroutine
    def f1(a, b):
        return a * 100 + b
github youknowone / ring / tests / _test_func_asyncio.py View on Github external
    @ring.aiodict(cache, expire=1)
    @asyncio.coroutine
    def f2(a, b):
        return a * 100 + b
github youknowone / ring / tests / _test_func_asyncio.py View on Github external
def storage_dict():
    storage = StorageDict()
    storage.ring = ring.aiodict
    return storage