prefect_redis.blocks
Redis credentials handling
Classes
RedisDatabase
Block used to manage authentication with a Redis database
Attributes:
host: The host of the Redis serverport: The port the Redis server is running ondb: The database to write to and read fromusername: The username to use when connecting to the Redis serverpassword: The password to use when connecting to the Redis serverssl: Whether to use SSL when connecting to the Redis serverkey_ttl: Optional per-key TTL in seconds applied to every written key (SET ... EX);None(default) means keys never expire
aread_path
path: Redis key to read from
- Contents at key as bytes
as_connection_params
awrite_path
path: Redis key to write tocontent: Binary object to write
block_initialization
from_connection_string
redis://creates a TCP socket connectionrediss://creates a SSL wrapped TCP socket connection
connection_string: Redis connection string
RedisCredentialsinstance
get_async_client
- An initialized Redis async client
get_client
- An initialized Redis async client
read_path
path: Redis key to read from
- Contents at key as bytes
write_path
path: Redis key to write tocontent: Binary object to write