Observed since 20 Oct, 17:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Simple calculator API hosted on APIMATIC
Simple calculator API hosted on APIMATIC
The package is compatible with Python versions 2 >=2.7.9 and 3 >=3.4.
Install the package from PyPi using the following pip command:
pip install absarsnew==1.1
You can also view the package at: https://pypi.python.org/pypi/absarsnew
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
timeout | float | The value to use for connection timeout. Default: 60 |
max_retries | int | The number of times to retry an endpoint call if it fails. Default: 3 |
backoff_factor | float | A backoff factor to apply between attempts after the second try. Default: 0 |
The API client can be initialized as follows:
from apimaticcalculator.apimaticcalculator_client import ApimaticcalculatorClient
from apimaticcalculator.configuration import Environment
client = ApimaticcalculatorClient(
environment = ,)
The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.
| Name | Description |
|---|---|
| simple_calculator | Gets SimpleCalculatorController |
An instance of the SimpleCalculatorController class can be accessed from the API Client.
simple_calculator_controller = client.simple_calculator
Calculates the expression using the specified operation.
:information_source: Note This endpoint does not require authentication.
def get_calculate(self,
operation,
x,
y)
| Parameter | Type | Tags | Description |
|---|---|---|---|
operation | OperationTypeEnum | Template, Required | The operator to apply on the variables |
x | float | Query, Required | The LHS value |
y | float | Query, Required | The RHS value |
float
operation = OperationTypeEnum.MULTIPLY
x = 222.14
y = 165.14
result = simple_calculator_controller.get_calculate(operation, x, y)
Possible operators are sum, subtract, multiply, divide
OperationTypeEnum
| Name |
|---|
SUM |
SUBTRACT |
MULTIPLY |
DIVIDE |
A utility class for processing API Calls. Also contains classes for supporting standard datetime formats.
| Name | Description |
|---|---|
| json_deserialize | Deserializes a JSON string to a Python dictionary. |
| Name | Description |
|---|---|
| HttpDateTime | A wrapper for datetime to support HTTP date format. |
| UnixDateTime | A wrapper for datetime to support Unix date format. |
| RFC3339DateTime | A wrapper for datetime to support RFC3339 format. |
Http response received.
| Name | Type | Description |
|---|---|---|
| status_code | int | The status code returned by the server. |
| reason_phrase | str | The reason phrase returned by the server. |
| headers | dict | Response headers. |
| text | str | Response body. |
| request | HttpRequest | The request that resulted in this response. |
Represents a single Http Request.
| Name | Type | Tag | Description |
|---|---|---|---|
| http_method | HttpMethodEnum | The HTTP method of the request. | |
| query_url | str | The endpoint URL for the API request. | |
| headers | dict | optional | Request headers. |
| query_parameters | dict | optional | Query parameters to add in the URL. |
| parameters | dict | str | optional | Request body, either as a serialized string or else a list of parameters to form encode. |
| files | dict | optional | Files to be sent with the request. |
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.1 | 17 Mar 2021 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:12819a02ca0b7cf113125e50446d7828e7a8e9970f59bc5e7739f07b736c8205