Skip to main content

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:

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 = ,)

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

Name Description
simple_calculator Gets 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
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
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

Name Description
json_deserialize Deserializes a JSON string to a Python dictionary.

Classes

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.

Common Code Documentation

HttpResponse

Http response received.

Parameters

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.

HttpRequest

Represents a single Http Request.

Parameters

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.

Metadata

Release files for absarsnew 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for absarsnew 1.1
File Size Uploaded
absarsnew-1.1.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for absarsnew 1.1
File Interpreter ABI Platform
absarsnew-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.3 kB

Release files / absarsnew-1.1.tar.gz

Download URL absarsnew-1.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dd9f1e4d15973607f057ac36c3d5f60a22eaf91b93832d8fff6621abf4a7f3d1
BLAKE2b-256 checksum
How to use checksums
270840ef4e026a06cb096961c3fe9ddc38dac38505525e15bde64ae19f941e5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.8

Release files / absarsnew-1.1-py3-none-any.whl

Download URL absarsnew-1.1-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57ab39ef8c9b63c88337983a23ae6b1b4bda6bc6187f588f4bc92ce6a838f02e
BLAKE2b-256 checksum
How to use checksums
7ca6e8dd0a268376638e0f83fadb1c84fc32f9c6a673fcba7e6d615f6dcd0312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page