U vi @sdZddlmZddlZddlmZddlmZddlm Z ddl m Z dZ Gd d d e Z Gd d d eZe eed ddZe edddZdS)a InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech )absolute_importN)Dict) HTTPResponse) InfluxDBError) Configurationzutf-8cs*eZdZdZdfdd ZddZZS) ApiExceptionzNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncsftj|d|rJ|j|_|j|_|j|_t|tr>|j|_qb| |_n||_||_d|_d|_dS)zInitialize with HTTP response.)responseN) super__init__statusreasondatabody isinstancerheaders getheaders)selfr r Z http_resp __class__E/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/rest.pyr s   zApiException.__init__cCs@d|j|j}|jr&|d|j7}|jr<|d|j7}|S)z(Get custom error messages for exception.z({0}) Reason: {1} zHTTP response headers: {0} zHTTP response body: {0} )formatr r rr)r error_messagerrr__str__/szApiException.__str__)NNN)__name__ __module__ __qualname____doc__r r __classcell__rrrrrsrc@sleZdZedZeeedddZeedddZ ee edd d Z ee eefed d d Z dS)_BaseRESTClientzinfluxdb_client.client.httpmethodurlcCstjd|d|ddS)Nz>>> Request: ' 'rloggerdebugr rrr log_request@sz_BaseRESTClient.log_requestr cCstjd|dS)Nz<<< Response: r%r)rrr log_responseDsz_BaseRESTClient.log_responserprefixcCstj|d|dS)Nz Body: r%r+rrrlog_bodyHsz_BaseRESTClient.log_body)rr,cCsF|D]8\}}|}d|kr$d}tj|d|d|qdS)N authorizationz***r#z: )itemslowerrr&r')rr,keyvvaluerrr log_headersLs  z_BaseRESTClient.log_headersN)rrrlogging getLoggerr& staticmethodstrr(r*objectr-rr4rrrrr=s r) configurationcookie resource_pathcCs"ddg}|jo |jo | o ||kS)Nz/api/v2/signinz/api/v2/signoutusernamepassword)r:r;r<Z _unauthorizedrrr_requires_create_user_sessionUsr@r:r;cCs|jo|jo|S)Nr=rArrr_requires_expire_user_sessionZsrB)r __future__rr5typingrurllib3rZ!influxdb_client.client.exceptionsrZinfluxdb_client.configurationrZ_UTF_8_encodingrr9rr8r@rBrrrrs     &