epicsarchiver.common.base_archiver ================================== .. py:module:: epicsarchiver.common.base_archiver .. autoapi-nested-parse:: Base Archiver Client module for get, post etc requests. Attributes ---------- .. autoapisummary:: epicsarchiver.common.base_archiver.LOG Classes ------- .. autoapisummary:: epicsarchiver.common.base_archiver.BaseArchiverAppliance Functions --------- .. autoapisummary:: epicsarchiver.common.base_archiver.mgmt_url Module Contents --------------- .. py:data:: LOG :type: logging.Logger .. py:function:: mgmt_url(hostname: str, port: int) -> str Generate the mgmt url from a hostname and a port number. :param hostname: fqdn of service :type hostname: str :param port: Port number :type port: int :returns: Completed url, for example "http://localhost:17665/mgmt/bpl/" :rtype: str .. py:class:: BaseArchiverAppliance(hostname: str = 'localhost', port: int = 17665) Base EPICS Archiver Appliance client. Hold a session to the Archiver Appliance web application. :param hostname: EPICS Archiver Appliance hostname [default: localhost] :param port: EPICS Archiver Appliance management port [default: 17665] .. py:attribute:: hostname :value: 'localhost' .. py:attribute:: port :value: 17665 .. py:attribute:: mgmt_url :value: 'http://localhost:17665/mgmt/bpl/' .. py:attribute:: _info :type: dict[str, str] .. py:attribute:: _data_url :type: str | None :value: None .. py:attribute:: session .. py:method:: __repr__() -> str String representation of Archiver Appliance. :returns: details including hostname of Archiver appliance. :rtype: str .. py:method:: _request(method: str, *args: Any, **kwargs: Any) -> requests.Response Sends a request using the session. :param method: HTTP method :param \*args: Optional arguments :param \*\*kwargs: Optional keyword arguments :returns: :class:`requests.Response ` object .. py:method:: _get(endpoint: str, **kwargs: Any) -> requests.Response Send a GET request to the given endpoint. :param endpoint: API endpoint (relative or absolute) :param \*\*kwargs: Optional arguments to be sent :returns: :class:`requests.Response ` object .. py:method:: _post(endpoint: str, **kwargs: Any) -> requests.Response Send a POST request to the given endpoint. :param endpoint: API endpoint (relative or absolute) :param \*\*kwargs: Optional arguments to be sent :returns: :class:`requests.Response ` object .. py:property:: info :type: dict[str, str] EPICS Archiver Appliance information. .. py:property:: identity :type: str | None EPICS Archiver Appliance identity. .. py:property:: version :type: str | None EPICS Archiver Appliance version. .. py:method:: _get_or_post(endpoint: str, pv: str) -> Any Send a GET or POST if pv is a comma separated list. :param endpoint: API endpoint :type endpoint: str :param pv: name of the pv. Can be a GLOB wildcards or a list of comma separated names. :type pv: str :returns: list of submitted PVs :rtype: Any