Skip to main content
Travis CI

Redis-Sentinel-Url provides parser and connection factory for redis:// and redis+sentinel:// URLs (the latter being defined by this package).

  • Supports Python 2.7 and 3.3+

  • Licensed using Apache License 2.0

Installation

Install with pip:

pip install Redis-Sentinel-Url

URL scheme for connecting via Sentinel

This package defines redis+sentinel:// scheme for connecting to Redis via Sentinel:

redis+sentinel://[:password@]host:port[,host2:port2,...][/service_name[/db]][?param1=value1[&param2=value=2&...]]
  • You can specify multiple sentinel host:port pairs separated by comma.

  • If service_name is provided, it is used to create a default client

  • service_name and db can also be specified as URL parameters (URL parameters take precedence)

  • Client options (keyword arguments to redis.StrictRedis) are specified as URL parameters

  • Options for connecting to Sentinel (keyword arguments to redis.sentinel.Sentinel) are specified with sentinel_ prefix

  • There is special client_type option to specify whether the default client should be master (the default) or slave service when connecting via Sentinel

Basic usage

Supports schemes supported by redis.StrictRedis.from_url and also redis+sentinel:// scheme described above:

import redis_sentinel_url

sentinel, client = redis_sentinel_url.connect('redis://localhost/0')
# None, StrictRedis(...)

sentinel, client = redis_sentinel_url.connect('rediss://localhost/0')
# None, StrictRedis(...)

sentinel, client = redis_sentinel_url.connect('unix://[:password]@/path/to/socket.sock?db=0')
# None, StrictRedis(...)

sentinel, client = redis_sentinel_url.connect('redis+sentinel://localhost:26379,otherhost:26479/mymaster/0')
# Sentinel(...), StrictRedis(...)

Metadata

Release files for Redis-Sentinel-Url 1.0.1

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

Source distribution (sdist)

Source distribution for Redis-Sentinel-Url 1.0.1
File Size Uploaded
Redis-Sentinel-Url-1.0.1.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Redis-Sentinel-Url 1.0.1
File Interpreter ABI Platform
Redis_Sentinel_Url-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.3 kB

Release files / Redis-Sentinel-Url-1.0.1.tar.gz

Download URL Redis-Sentinel-Url-1.0.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ec1854ab9379a28789423c3cd4082739fb69c7b4b11bb50ae7858697c131b13e
BLAKE2b-256 checksum
How to use checksums
cce368de4c8aacbd9952667d7d0f5af55b873553a09a6227ac5b7f7c622610c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Redis_Sentinel_Url-1.0.1-py2.py3-none-any.whl

Download URL Redis_Sentinel_Url-1.0.1-py2.py3-none-any.whl
Size 4.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c6991e2000c5c7a5e2b95eb2d62fd5b0a6b02a59554caf0f9f79d18e152d9663
BLAKE2b-256 checksum
How to use checksums
403520f997f367c87ef1e6ebf418af7c2450cb5da860d066d7229226031534ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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