pyevr.openapi_client package¶
Subpackages¶
- pyevr.openapi_client.api package
- Submodules
- pyevr.openapi_client.api.assortments_api module
- pyevr.openapi_client.api.certificates_api module
- pyevr.openapi_client.api.measurement_units_api module
- pyevr.openapi_client.api.measurements_api module
- pyevr.openapi_client.api.organizations_api module
- pyevr.openapi_client.api.place_of_deliveries_api module
- pyevr.openapi_client.api.waybills_api module
- Module contents
- pyevr.openapi_client.models package
- Submodules
- pyevr.openapi_client.models.add_measurement_act_request module
- pyevr.openapi_client.models.add_shipments_to_waybill_request module
- pyevr.openapi_client.models.address module
- pyevr.openapi_client.models.assortment module
- pyevr.openapi_client.models.authorization_type module
- pyevr.openapi_client.models.cancel_waybill_request module
- pyevr.openapi_client.models.certificate module
- pyevr.openapi_client.models.certificate_claim module
- pyevr.openapi_client.models.consolidated_act module
- pyevr.openapi_client.models.consolidated_act_all_of module
- pyevr.openapi_client.models.contact_person module
- pyevr.openapi_client.models.contract_for_transfer_of_cutting_rights module
- pyevr.openapi_client.models.coordinates module
- pyevr.openapi_client.models.forest_act module
- pyevr.openapi_client.models.forest_notice module
- pyevr.openapi_client.models.forest_notice_all_of module
- pyevr.openapi_client.models.holding_base module
- pyevr.openapi_client.models.inventory_act module
- pyevr.openapi_client.models.inventory_act_all_of module
- pyevr.openapi_client.models.measurement_act module
- pyevr.openapi_client.models.measurement_unit module
- pyevr.openapi_client.models.organization module
- pyevr.openapi_client.models.owner module
- pyevr.openapi_client.models.pack module
- pyevr.openapi_client.models.pack_location module
- pyevr.openapi_client.models.paged_result_of_assortment module
- pyevr.openapi_client.models.paged_result_of_certificate module
- pyevr.openapi_client.models.paged_result_of_measurement_act module
- pyevr.openapi_client.models.paged_result_of_measurement_unit module
- pyevr.openapi_client.models.paged_result_of_organization module
- pyevr.openapi_client.models.paged_result_of_place_of_delivery module
- pyevr.openapi_client.models.paged_result_of_waybill module
- pyevr.openapi_client.models.place_of_delivery module
- pyevr.openapi_client.models.previous_owner module
- pyevr.openapi_client.models.problem_details module
- pyevr.openapi_client.models.put_place_of_delivery_request module
- pyevr.openapi_client.models.receiver module
- pyevr.openapi_client.models.representer module
- pyevr.openapi_client.models.sales_contract module
- pyevr.openapi_client.models.sales_contract_all_of module
- pyevr.openapi_client.models.shipment module
- pyevr.openapi_client.models.shipment_assortment module
- pyevr.openapi_client.models.shipment_item module
- pyevr.openapi_client.models.source module
- pyevr.openapi_client.models.start_waybill_request module
- pyevr.openapi_client.models.transport module
- pyevr.openapi_client.models.transporter module
- pyevr.openapi_client.models.unload_waybill_request module
- pyevr.openapi_client.models.validation_result module
- pyevr.openapi_client.models.viewer module
- pyevr.openapi_client.models.waybill module
- pyevr.openapi_client.models.waybill_authorization module
- pyevr.openapi_client.models.waybill_place_of_delivery module
- pyevr.openapi_client.models.waybill_sort_field module
- pyevr.openapi_client.models.waybill_status module
- Module contents
Submodules¶
pyevr.openapi_client.api_client module¶
EVR API
OpenAPI Generator’i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501
The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech
-
class
pyevr.openapi_client.api_client.
ApiClient
(configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1)[source]¶ Bases:
object
Generic API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the OpenAPI templates.
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
- Parameters
configuration – .Configuration object for this client
header_name – a header to pass when making calls to the API.
header_value – a header value to pass when making calls to the API.
cookie – a cookie to include in the header when making calls to the API
pool_threads – The number of threads to use for async requests to the API. More threads means more concurrent API requests.
-
NATIVE_TYPES_MAPPING
= {'bool': <class 'bool'>, 'date': <class 'datetime.date'>, 'datetime': <class 'datetime.datetime'>, 'float': <class 'float'>, 'int': <class 'int'>, 'long': <class 'int'>, 'object': <class 'object'>, 'str': <class 'str'>}¶
-
PRIMITIVE_TYPES
= (<class 'float'>, <class 'bool'>, <class 'bytes'>, <class 'str'>, <class 'int'>)¶
-
call_api
(resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None)[source]¶ Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
- Parameters
resource_path – Path to method endpoint.
method – Method to call.
path_params – Path parameters in the url.
query_params – Query parameters in the url.
header_params – Header parameters to be placed in the request header.
body – Request body.
dict (files) – Request post form parameters, for application/x-www-form-urlencoded, multipart/form-data.
list (auth_settings) – Auth Settings names for the request.
response – Response data type.
dict – key -> filename, value -> filepath, for multipart/form-data.
bool (async_req) – execute request asynchronously
_return_http_data_only – response data without head status code and headers
collection_formats – dict of collection formats for path, query, header, and post parameters.
_preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns
If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly.
-
deserialize
(response, response_type)[source]¶ Deserializes response into an object.
- Parameters
response – RESTResponse object to be deserialized.
response_type – class literal for deserialized object, or string of class name.
- Returns
deserialized object.
-
files_parameters
(files=None)[source]¶ Builds form parameters.
- Parameters
files – File parameters.
- Returns
Form parameters with files.
-
parameters_to_tuples
(params, collection_formats)[source]¶ Get parameters as list of tuples, formatting collections.
- Parameters
params – Parameters as dict or list of two-tuples
collection_formats (dict) – Parameter collection formats
- Returns
Parameters as list of tuples, collections formatted
-
property
pool
¶ Create thread pool on first request avoids instantiating unused threadpool for blocking clients.
-
request
(method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶ Makes the HTTP request using RESTClient.
-
sanitize_for_serialization
(obj)[source]¶ Builds a JSON POST object.
If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date
convert to string in iso8601 format.
If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.
- Parameters
obj – The data to serialize.
- Returns
The serialized form of data.
-
select_header_accept
(accepts)[source]¶ Returns Accept based on an array of accepts provided.
- Parameters
accepts – List of headers.
- Returns
Accept (e.g. application/json).
-
select_header_content_type
(content_types)[source]¶ Returns Content-Type based on an array of content_types provided.
- Parameters
content_types – List of content-types.
- Returns
Content-Type (e.g. application/json).
-
update_params_for_auth
(headers, querys, auth_settings)[source]¶ Updates header and query params based on authentication setting.
- Parameters
headers – Header parameters dict to be updated.
querys – Query parameters tuple list to be updated.
auth_settings – Authentication setting identifiers list.
-
property
user_agent
¶ User agent for this API client
pyevr.openapi_client.configuration module¶
EVR API
OpenAPI Generator’i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501
The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech
-
class
pyevr.openapi_client.configuration.
Configuration
(host='https://evr.veoseleht.ee', api_key=None, api_key_prefix=None, username=None, password=None, discard_unknown_keys=False)[source]¶ Bases:
object
NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech Do not edit the class manually.
- Parameters
host – Base url
api_key – Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret.
api_key_prefix – Dict to store API prefix (e.g. Bearer) The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data.
username – Username for HTTP basic authentication
password – Password for HTTP basic authentication
discard_unknown_keys –
Boolean value indicating whether to discard unknown properties. A server may send a response that includes additional properties that are not known by the client in the following scenarios: 1. The OpenAPI document is incomplete, i.e. it does not match the server
implementation.
The client was generated using an older version of the OpenAPI document and the server has been upgraded since then.
If a schema in the OpenAPI document defines the additionalProperties attribute, then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard.
- Example
API Key Authentication Example. Given the following security scheme in the OpenAPI specification:
- components:
- securitySchemes:
- cookieAuth: # name for the security scheme
type: apiKey in: cookie name: JSESSIONID # cookie name
- You can programmatically set the cookie:
- conf = openapi_client.Configuration(
api_key={‘cookieAuth’: ‘abc123’} api_key_prefix={‘cookieAuth’: ‘JSESSIONID’}
)
- The following cookie will be added to the HTTP request:
Cookie: JSESSIONID abc123
-
assert_hostname
= None¶ Set this to True/False to enable/disable SSL hostname verification.
-
auth_settings
()[source]¶ Gets Auth Settings dict for api client.
- Returns
The Auth Settings information dict.
-
cert_file
= None¶ client certificate file
-
connection_pool_maxsize
= None¶ urllib3 connection pool’s maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is not the best value when you are making a lot of possibly parallel requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance.
-
property
debug
¶ Debug switch
-
get_api_key_with_prefix
(identifier)[source]¶ Gets API key (with prefix if set).
- Parameters
identifier – The identifier of apiKey.
- Returns
The token for api key authentication.
-
get_basic_auth_token
()[source]¶ Gets HTTP basic authentication header (string).
- Returns
The token for basic HTTP authentication.
-
classmethod
get_default_copy
()[source]¶ Return new instance of configuration.
This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration passed by the set_default method.
- Returns
The configuration object.
-
get_host_from_settings
(index, variables=None)[source]¶ Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :return: URL based on host settings
-
host
= None¶ Default Base url
-
key_file
= None¶ client key file
-
logger
= None¶ Logging Settings
-
property
logger_file
¶ Debug file location
-
logger_file_handler
= None¶ Log file handler
-
property
logger_format
¶ Log format
-
logger_stream_handler
= None¶ Log stream handler
-
password
= None¶ Password for HTTP basic authentication
-
proxy
= None¶ Proxy URL
-
proxy_headers
= None¶ Proxy headers
-
refresh_api_key_hook
= None¶ function hook to refresh API key if expired
-
retries
= None¶ Adding retries to override urllib3 default value 3
-
safe_chars_for_path_param
= None¶ Safe chars for path_param
-
classmethod
set_default
(default)[source]¶ Set default instance of configuration.
It stores default configuration, which can be returned by get_default_copy method.
- Parameters
default – object of Configuration
-
ssl_ca_cert
= None¶ Set this to customize the certificate file to verify the peer.
-
temp_folder_path
= None¶ Temp file folder for downloading files
-
to_debug_report
()[source]¶ Gets the essential information for debugging.
- Returns
The report for debugging.
-
username
= None¶ Username for HTTP basic authentication
-
verify_ssl
= None¶ SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server.
pyevr.openapi_client.exceptions module¶
EVR API
OpenAPI Generator’i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501
The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech
-
exception
pyevr.openapi_client.exceptions.
ApiException
(status=None, reason=None, http_resp=None)[source]¶
-
exception
pyevr.openapi_client.exceptions.
ApiKeyError
(msg, path_to_item=None)[source]¶ Bases:
pyevr.openapi_client.exceptions.OpenApiException
,KeyError
-
exception
pyevr.openapi_client.exceptions.
ApiTypeError
(msg, path_to_item=None, valid_classes=None, key_type=None)[source]¶ Bases:
pyevr.openapi_client.exceptions.OpenApiException
,TypeError
-
exception
pyevr.openapi_client.exceptions.
ApiValueError
(msg, path_to_item=None)[source]¶ Bases:
pyevr.openapi_client.exceptions.OpenApiException
,ValueError
pyevr.openapi_client.rest module¶
EVR API
OpenAPI Generator’i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501
The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech
-
class
pyevr.openapi_client.rest.
RESTClientObject
(configuration, pools_size=4, maxsize=None)[source]¶ Bases:
object
-
DELETE
(url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶
-
OPTIONS
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶
-
PATCH
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶
-
POST
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶
-
PUT
(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]¶
-
request
(method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None)[source]¶ Perform requests.
- Parameters
method – http request method
url – http request url
query_params – query parameters in the url
headers – http request headers
body – request json body, for application/json
post_params – request post parameters, application/x-www-form-urlencoded and multipart/form-data
_preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
-
Module contents¶
EVR API
OpenAPI Generator’i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501
The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech