ConnectorTypeREDIS
class connector_types.connector_type_redis.ConnectorTypeREDIS
Interact with a REDIS key value store.
warning
This connector type currently only supports unencrypted and unauthenticated connections to REDIS. Contact info@cloudomation.com to request a feature.
Consult the redis commands documentation at https://redis.io/commands for details on commands, arguments and result schemas.
Input Schema
-
schema_version
Type:
string
-
host
The remote hostname or IP address.
Type:
string
-
port
Type:
anyOf
Options: -
mode
Type:
anyOf
Options: -
encoding
The encoding to use when binary data is returned by the server.
Type:
string
Default:
utf-8
Output Schema
Example
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
redis_server_info = this.connect(
connector_type='REDIS',
host='...',
port={
'port_mode': 'port_number',
'port_number': 6379,
},
mode={
'mode_name': 'execute_command',
'command': 'INFO',
},
encoding='utf-8',
).get('output_value')['result']
this.log(redis_server_info=redis_server_info)
return this.success('all done')