HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/sdb/__pycache__/redis_sdb.cpython-310.pyc
o

�N�g��@sbdZzddlZdZWneydZYnwddiZdZdd	�Zdd
d�Zddd�Zdd
d�Z	dS)aN
Redis SDB module
================

 .. versionadded:: 2019.2.0

This module allows access to Redis  using an ``sdb://`` URI.

Like all SDB modules, the Redis module requires a configuration profile to
be configured in either the minion or master configuration file. This profile
requires very little. For example:

.. code-block:: yaml

    sdb_redis:
      driver: redis
      host: 127.0.0.1
      port: 6379
      password: pass
      db: 1

The ``driver`` refers to the Redis module, all other options are optional.
For option details see: https://redis-py.readthedocs.io/en/latest/.

�NTF�set_�set�rediscCstsdStS)z
    Module virtual name.
    )Fz3Please install python-redis to use this SDB module.)�	HAS_REDIS�__virtualname__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/sdb/redis_sdb.py�__virtual__'sr	cCs6|sdS|��}|�d�tjdi|��}|�||�S)z)
    Set a value into the Redis SDB.
    F�driverNr)�copy�popr�StrictRedisr)�key�value�profile�redis_kwargs�
redis_connrrrr0s
cC�4|sdS|��}|�d�tjdi|��}|�|�S)z)
    Get a value from the Redis SDB.
    Fr
Nr)rrrr
�get�rrrrrrrr<�

rcCr)z*
    Delete a key from the Redis SDB.
    Fr
Nr)rrrr
�deleterrrrrHrr)N)
�__doc__rr�ImportErrorZ__func_alias__rr	rrrrrrr�<module>s�