GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — example-code/python/python-binary-memcached/example.py at master · memcachier/example-code Expand file tree/ Copy pathexample.pyMore file actions executable file ·17 lines (12 loc) · 490 Bytes / Copy pathexample.pyFile metadata and controlsexecutable file ·17 lines (12 loc) · 490 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #! /bin/python3 import bmemcached import os servers = os.environ.get('MEMCACHIER_SERVERS', '').split(',') user = os.environ.get('MEMCACHIER_USERNAME', '') passw = os.environ.get('MEMCACHIER_PASSWORD', '') mc = bmemcached.Client(servers, username=user, password=passw, socket_timeout=3) # 3s is the default socket timeout mc.enable_retry_delay(True) # Enabled by default. Sets retry delay to 5s. mc.set("foo", "bar") print(mc.get("foo")) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |