Catalog PyPI
PACKAGE EXPLORERView in registry

absarsnew

PyPI

Simple calculator API hosted on APIMATIC

Versions collected1
Direct dependencies5From release 1.1
Last observed20 Oct, 17:36 UTC

README

Version 1.1 documentation

Getting Started with APIMATIC Calculator

Getting Started

Introduction

Simple calculator API hosted on APIMATIC

Install the Package

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

Initialize the API Client

The following parameters are configurable for the API Client:

ParameterTypeDescription
timeoutfloatThe value to use for connection timeout.
Default: 60
max_retriesintThe number of times to retry an endpoint call if it fails.
Default: 3
backoff_factorfloatA 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 = ,)

Client Class Documentation

APIMATIC Calculator Client

The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.

Controllers

NameDescription
simple_calculatorGets SimpleCalculatorController

API Reference

List of APIs

Simple Calculator

Overview

Get instance

An instance of the SimpleCalculatorController class can be accessed from the API Client.

simple_calculator_controller = client.simple_calculator

Get Calculate

Calculates the expression using the specified operation.

:information_source: Note This endpoint does not require authentication.

def get_calculate(self,
                 operation,
                 x,
                 y)
Parameters
ParameterTypeTagsDescription
operationOperationTypeEnumTemplate, RequiredThe operator to apply on the variables
xfloatQuery, RequiredThe LHS value
yfloatQuery, RequiredThe RHS value
Response Type

float

Example Usage
operation = OperationTypeEnum.MULTIPLY
x = 222.14
y = 165.14

result = simple_calculator_controller.get_calculate(operation, x, y)

Model Reference

Enumerations

Operation Type

Possible operators are sum, subtract, multiply, divide

Class Name

OperationTypeEnum

Fields
Name
SUM
SUBTRACT
MULTIPLY
DIVIDE

Utility Classes Documentation

ApiHelper

A utility class for processing API Calls. Also contains classes for supporting standard datetime formats.

Methods

NameDescription
json_deserializeDeserializes a JSON string to a Python dictionary.

Classes

NameDescription
HttpDateTimeA wrapper for datetime to support HTTP date format.
UnixDateTimeA wrapper for datetime to support Unix date format.
RFC3339DateTimeA wrapper for datetime to support RFC3339 format.

Common Code Documentation

HttpResponse

Http response received.

Parameters

NameTypeDescription
status_codeintThe status code returned by the server.
reason_phrasestrThe reason phrase returned by the server.
headersdictResponse headers.
textstrResponse body.
requestHttpRequestThe request that resulted in this response.

HttpRequest

Represents a single Http Request.

Parameters

NameTypeTagDescription
http_methodHttpMethodEnumThe HTTP method of the request.
query_urlstrThe endpoint URL for the API request.
headersdictoptionalRequest headers.
query_parametersdictoptionalQuery parameters to add in the URL.
parametersdict | stroptionalRequest body, either as a serialized string or else a list of parameters to form encode.
filesdictoptionalFiles to be sent with the request.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.117 Mar 20215

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:36 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:12819a02ca0b7cf113125e50446d7828e7a8e9970f59bc5e7739f07b736c8205