Skip to content

aio-libs/aiomcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c178ec5 · Mar 3, 2025
Nov 24, 2023
Jun 10, 2024
Nov 20, 2022
Nov 24, 2023
Mar 11, 2016
Nov 20, 2022
Nov 20, 2022
Nov 20, 2022
May 7, 2024
Jan 26, 2017
Dec 4, 2020
Jan 16, 2022
Jan 14, 2022
Nov 20, 2022
Nov 20, 2022
Feb 17, 2025
Mar 3, 2025
Jan 14, 2022
Nov 24, 2023

memcached client for asyncio

asyncio (PEP 3156) library to work with memcached.

Getting started

The API looks very similar to the other memcache clients:

import asyncio
import aiomcache

async def hello_aiomcache():
    mc = aiomcache.Client("127.0.0.1", 11211)
    await mc.set(b"some_key", b"Some value")
    value = await mc.get(b"some_key")
    print(value)
    values = await mc.multi_get(b"some_key", b"other_key")
    print(values)
    await mc.delete(b"another_key")

asyncio.run(hello_aiomcache())

Version 0.8 introduces FlagClient which allows registering callbacks to set or process flags. See examples/simple_with_flag_handler.py