epicsarchiver.common.base_archiver
Base Archiver Client module for get, post etc requests.
Attributes
Classes
Base EPICS Archiver Appliance client. |
Functions
|
Generate the mgmt url from a hostname and a port number. |
Module Contents
- epicsarchiver.common.base_archiver.LOG: logging.Logger[source]
- epicsarchiver.common.base_archiver.mgmt_url(hostname: str, port: int) str[source]
Generate the mgmt url from a hostname and a port number.
- Parameters:
- Returns:
Completed url, for example “http://localhost:17665/mgmt/bpl/”
- Return type:
- class epicsarchiver.common.base_archiver.BaseArchiverAppliance(hostname: str = 'localhost', port: int = 17665)[source]
Base EPICS Archiver Appliance client.
Hold a session to the Archiver Appliance web application.
- Parameters:
hostname – EPICS Archiver Appliance hostname [default: localhost]
port – EPICS Archiver Appliance management port [default: 17665]
- __repr__() str[source]
String representation of Archiver Appliance.
- Returns:
details including hostname of Archiver appliance.
- Return type:
- _request(method: str, *args: Any, **kwargs: Any) requests.Response[source]
Sends a request using the session.
- Parameters:
method – HTTP method
*args – Optional arguments
**kwargs – Optional keyword arguments
- Returns:
requests.Responseobject
- _get(endpoint: str, **kwargs: Any) requests.Response[source]
Send a GET request to the given endpoint.
- Parameters:
endpoint – API endpoint (relative or absolute)
**kwargs – Optional arguments to be sent
- Returns:
requests.Responseobject