Server IP : 103.191.208.50 / Your IP : 216.73.216.226 Web Server : LiteSpeed System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64 User : celkcksm ( 1031) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/../usr/lib/python3.6/site-packages/redis/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
from contextlib import contextmanager try: import hiredis # noqa HIREDIS_AVAILABLE = True except ImportError: HIREDIS_AVAILABLE = False def from_url(url, db=None, **kwargs): """ Returns an active Redis client generated from the given database URL. Will attempt to extract the database id from the path url fragment, if none is provided. """ from redis.client import Redis return Redis.from_url(url, db, **kwargs) @contextmanager def pipeline(redis_obj): p = redis_obj.pipeline() yield p p.execute() class dummy(object): """ Instances of this class can be used as an attribute container. """ pass