Skip to main content

gretis

An asynchronous redis::Connection object using Greenlets and Tornado’s event-loop.

Requires

Installation

pip install gretis

Getting Started

With redis-py:

Create a redis ConnectionPool instructing it to use the Gretis AsyncConnection as its connection. You must have a parent greenlet or you will get an exception. (Examples assume you are in greenlet context already)

import redis
from gretis.async_connection import AsyncConnection

pool = redis.ConnectionPool(connection_class=AsyncConnection,
    host='localhost', port=6379, db=0, socket_timeout=1)
r = redis.StrictRedis(connection_pool=pool)
r.set('foo', 'bar')

Or with redis-cluster-py:

Create a redis cluster ConnectionPool and give it an AsyncClusterConnection.

import redis
from gretis.async_cluster_connection import AsyncClusterConnection
from rediscluster import ClusterConnectionPool, StrictClusterRedis

pool = ClusterConnectionPool(connection_class=AsyncClusterConnection,
    host='localhost', port=700, socket_timeout=1)
r = StrictRedisCluster(connection_pool=pool)
r.set('foo', 'bar')

Metadata

Release files for gretis 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gretis 0.0.11
File Size Uploaded
gretis-0.0.11.tar.gz 5.1 kB Details

Release files / gretis-0.0.11.tar.gz

Download URL gretis-0.0.11.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
077afd68e7bcc05d3c91a2b57cc311bd2390b7cbdad103fab12d6e9722966338
BLAKE2b-256 checksum
How to use checksums
0fc2a956c4dd59a14783107ec63e308cd3b0c917191a1bc928a14daa88a3f04b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.11 This release

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page