Python asyncio 的 Redis 客户端 asyncio-redis

码农软件 · 软件分类 · 常用工具包 · 2019-08-17 14:57:25

软件介绍

asyncio-redis 是 Python asyncioRedis 客户端 (PEP 3156)。这个 Redis 库是完全异步的,Reids 服务器非阻塞客户端,依赖于 asyncio,所以要求 Python 3.3. 或者 Python 3.4。

连接示例:

import asyncio
import asyncio_redis
@asyncio.coroutine
def example():
    # Create Redis connection
    connection = yield from asyncio_redis.Connection.create(host='localhost', port=6379)
    # Set a key
    yield from connection.set('my_key', 'my_value')
    # When finished, close the connection.
    connection.close()
if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(example())

本文地址:https://www.codercto.com/soft/d/12568.html

iGen

iGen

Jean M. Twenge PhD / Atria Books / 2017-8-22 / USD 27.00

A highly readable and entertaining first look at how today’s members of iGen—the children, teens, and young adults born in the mid-1990s and later—are vastly different from their Millennial predecesso......一起来看看 《iGen》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具