Python Groonga Client
Project description
About
Python Groonga Client. poyonga support to HTTP and GQTP protocol.
Installation
from pip:
pip install --upgrade poyonga
from easy_install:
easy_install -ZU poyonga
Usage
Basic Usage
>>> from poyonga import Groonga >>> g = Groonga() >>> g.protocol 'http' >>> ret = g.call("status") >>> ret <poyonga.result.GroongaResult object at 0x8505ccc> >>> ret.status 0 >>> ret.body {u'uptime': 427, u'max_command_version': 2, u'n_queries': 3, u'cache_hit_rate': 66.6666666666667, u'version': u'1.2.8', u 'alloc_count': 156, u'command_version': 1, u'starttime': 132 8286909, u'default_command_version': 1} >>>
with eventlet
from poyonga import Groonga import eventlet eventlet.monkey_patch() def fetch(cmd, **kwargs): g = Groonga() ret = g.call(cmd, **kwargs) print ret.status print ret.body print "*" * 40 cmds = [("status", {}), ("log_level", {"level": "warning"}), ("table_list", {}) ("select", {"table": "Site"})] pool = eventlet.GreenPool() for cmd, kwargs in cmds: pool.spawn_n(fetch, cmd, **kwargs) pool.waitall()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
poyonga-0.1.tar.gz
(2.7 kB
view details)
File details
Details for the file poyonga-0.1.tar.gz
.
File metadata
- Download URL: poyonga-0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c072fa0bd9c2f541095cd7e57cdb80583778d42e8a31574a47ac314150ee8e2b |
|
MD5 | 4f6de406b920308e4b7d4a5e4b058a41 |
|
BLAKE2b-256 | 672cfbdce23be39c33c34f06ddb0c7f229e01f2af13cfa83d5f69e0d284179d2 |