Skip to main content

Minimal pure python memcached client

Project description

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

CHANGES

0.8.0 (2022-12-11)

  • Add FlagClient to support memcached flags.

  • Fix type annotations for @acquire.

  • Fix rare exception caused by memcached server dying in middle of operation.

  • Fix get method to not use CAS.

0.7.0 (2022-01-20)

  • Added support for Python 3.10

  • Added support for non-ascii keys

  • Added type annotations

0.6.0 (2017-12-03)

  • Drop python 3.3 support

0.5.2 (2017-05-27)

  • Fix issue with pool concurrency and task cancellation

0.5.1 (2017-03-08)

  • Added MANIFEST.in

0.5.0 (2017-02-08)

  • Added gets and cas commands

0.4.0 (2016-09-26)

  • Make max_size strict #14

0.3.0 (2016-03-11)

  • Dockerize tests

  • Reuse memcached connections in Client Pool #4

  • Fix stats parse to compatible more mc class software #5

0.2 (2015-12-15)

  • Make the library Python 3.5 compatible

0.1 (2014-06-18)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiomcache-0.8.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiomcache-0.8.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file aiomcache-0.8.0.tar.gz.

File metadata

  • Download URL: aiomcache-0.8.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for aiomcache-0.8.0.tar.gz
Algorithm Hash digest
SHA256 3efd96b646a08cc2bb9af1066caff8a122e54a5af1db81a98f3d80be3a0972d8
MD5 34a36d6be495a8e923785dcad1de727e
BLAKE2b-256 0be87c0f44a347a0ccc3787efb70fb0cd1e5969bdeb944b7869eed77b6533456

See more details on using hashes here.

File details

Details for the file aiomcache-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: aiomcache-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for aiomcache-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30d1bf51d4b8262c2a80763acf5de47e54c71b2c7dcc1b62870e64805ff699a0
MD5 48fc040fc04bd3f0495a362f98040e16
BLAKE2b-256 a9cebc04d994153d22bad55db082c371f4ca57dbf526a65689d32c4ec95448ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page