Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A client cli for Memcached Server,which write by python.

Project Description

首先,需要确保已经安装了Memcached服务器,这里我们以debian为例:

sudo apt-get install memcached

默认情况下,我们可以通过如下的方式启动:

memcached-cli
127.0.0.1:11211>

默认监听本地的11211端口,我们可以通过如下的2种方式来修改其监听的地址和端口:

  • 通过`-b`或`–host`修改监听的地址
  • 通过`-p`或`–port`修改监听的端口

然后我们可以进行如下的操作:

127.0.0.1:11211>get name
None
127.0.0.1:11211>set name zhangsan
True
127.0.0.1:11211>get name
zhangsan

我们直接调用Memcached对应的命令传入对应的参数即可。 如果对某个命令不是很熟悉,可以通过输入1个`help`来查看当前支持的命令:

127.0.0.1:11211>help

Documented commands (type help <topic>):
========================================
EOF     check_key  delete_many   get        gets_many  quit      set_multi
add     close      delete_multi  get_many   help       replace   stats
append  decr       exit          get_multi  incr       set       touch
cas     delete     flush_all     gets       prepend    set_many  version

而后通过`help 对应的命令`查看其详细的参数说明:

127.0.0.1:11211>help get

The memcached "get" command, but only for one key, as a convenience.

        Args:
          key: str, see class docs for details.

        Returns:
          The value for the key, or None if the key wasn't found.
Release History

Release History

This version
History Node

0.1.dev0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Memcached_cli-0.1.dev0-py2.7.egg (5.3 kB) Copy SHA256 Checksum SHA256 2.7 Egg Jul 2, 2016
Memcached-cli-0.1.dev0.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Jul 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting