pgflux.output package
Submodules
pgflux.output.http module
- class pgflux.output.http.HTTPOutput
Bases:
pgflux.output.interface.Output
- CLI_HELP = 'Sends a bulk HTTP POST request to InfluxDB'
- CONNECTION_CLASS
alias of
http.client.HTTPConnection
- ENV_VARS = {'PGFLUX_INFLUX_DBNAME': 'The database name', 'PGFLUX_INFLUX_HOST': 'Hostname of the InfluxDB', 'PGFLUX_INFLUX_PASSWORD': 'The password', 'PGFLUX_INFLUX_USERNAME': 'The username'}
- NAME = 'http'
- PRECISION: pgflux.enums.Precision = 0
- class pgflux.output.http.HTTPSOutput
Bases:
pgflux.output.http.HTTPOutput
- CONNECTION_CLASS
alias of
http.client.HTTPSConnection
- NAME = 'https'
- pgflux.output.http.send_to_influx(connection: http.client.HTTPConnection, headers: Dict[str, str], params: Dict[str, str], payload: str) http.client.HTTPResponse
Send the data in payload to InfluxDB using connection.
This sends a simple HTTP POST request to the other end of connection.
- Parameters
connection – The HTTP connection to the InfluxDB endpoint
headers – An optional mapping for HTTP headers
param – An optional mapping for HTTP query arguments
payload – The data to send
- Returns
A HTTP response
pgflux.output.interface module
- class pgflux.output.interface.Output
Bases:
abc.ABC
- PRECISION: pgflux.enums.Precision = 9
- REGISTRY: Dict[str, Type[pgflux.output.interface.Output]] = {'http': <class 'pgflux.output.http.HTTPOutput'>, 'https': <class 'pgflux.output.http.HTTPSOutput'>, 'stdout': <class 'pgflux.output.stream.StreamOutput'>}
- static create(output_name: str) pgflux.output.interface.Output
pgflux.output.stream module
Module contents
- class pgflux.output.HTTPOutput
Bases:
pgflux.output.interface.Output
- CLI_HELP = 'Sends a bulk HTTP POST request to InfluxDB'
- CONNECTION_CLASS
alias of
http.client.HTTPConnection
- ENV_VARS = {'PGFLUX_INFLUX_DBNAME': 'The database name', 'PGFLUX_INFLUX_HOST': 'Hostname of the InfluxDB', 'PGFLUX_INFLUX_PASSWORD': 'The password', 'PGFLUX_INFLUX_USERNAME': 'The username'}
- NAME = 'http'
- PRECISION: pgflux.enums.Precision = 0
- class pgflux.output.HTTPSOutput
Bases:
pgflux.output.http.HTTPOutput
- CONNECTION_CLASS
alias of
http.client.HTTPSConnection
- NAME = 'https'
- class pgflux.output.Output
Bases:
abc.ABC
- PRECISION: pgflux.enums.Precision = 9
- REGISTRY: Dict[str, Type[pgflux.output.interface.Output]] = {'http': <class 'pgflux.output.http.HTTPOutput'>, 'https': <class 'pgflux.output.http.HTTPSOutput'>, 'stdout': <class 'pgflux.output.stream.StreamOutput'>}
- static create(output_name: str) pgflux.output.interface.Output