{ "info": { "author": "APIMatic SDK Generator", "author_email": "support@apimatic.io", "bugtrack_url": null, "classifiers": [], "description": "# Getting started\n\nSimple calculator API hosted on APIMATIC\n\n## How to Build\n\n\nYou must have Python ```2 >=2.7.9``` or Python ```3 >=3.4``` installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc. \nThese dependencies are defined in the ```requirements.txt``` file that comes with the SDK.\nTo resolve these dependencies, you can use the PIP Dependency manager. Install it by following steps at [https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/).\n\nPython and PIP executables should be defined in your PATH. Open command prompt and type ```pip --version```.\nThis should display the version of the PIP Dependency Manager installed if your installation was successful and the paths are properly defined.\n\n* Using command line, navigate to the directory containing the generated files (including ```requirements.txt```) for the SDK.\n* Run the command ```pip install -r requirements.txt```. This should install all the required dependencies.\n\n![Building SDK - Step 1](https://apidocs.io/illustration/python?step=installDependencies&workspaceFolder=APIMATIC%20Calculator-Python)\n\n\n## How to Use\n\nThe following section explains how to use the Apimaticcalculator SDK package in a new project.\n\n### 1. Open Project in an IDE\n\nOpen up a Python IDE like PyCharm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.\n\n![Open project in PyCharm - Step 1](https://apidocs.io/illustration/python?step=pyCharm)\n\nClick on ```Open``` in PyCharm to browse to your generated SDK directory and then click ```OK```.\n\n![Open project in PyCharm - Step 2](https://apidocs.io/illustration/python?step=openProject0&workspaceFolder=APIMATIC%20Calculator-Python) \n\nThe project files will be displayed in the side bar as follows:\n\n![Open project in PyCharm - Step 3](https://apidocs.io/illustration/python?step=openProject1&workspaceFolder=APIMATIC%20Calculator-Python&projectName=apimaticcalculatorpythonv3) \n\n### 2. Add a new Test Project\n\nCreate a new directory by right clicking on the solution name as shown below:\n\n![Add a new project in PyCharm - Step 1](https://apidocs.io/illustration/python?step=createDirectory&workspaceFolder=APIMATIC%20Calculator-Python&projectName=apimaticcalculatorpythonv3)\n\nName the directory as \"test\"\n\n![Add a new project in PyCharm - Step 2](https://apidocs.io/illustration/python?step=nameDirectory)\n \nAdd a python file to this project with the name \"testsdk\"\n\n![Add a new project in PyCharm - Step 3](https://apidocs.io/illustration/python?step=createFile&workspaceFolder=APIMATIC%20Calculator-Python&projectName=apimaticcalculatorpythonv3)\n\nName it \"testsdk\"\n\n![Add a new project in PyCharm - Step 4](https://apidocs.io/illustration/python?step=nameFile)\n\nIn your python file you will be required to import the generated python library using the following code lines\n\n```Python\nfrom apimaticcalculatorpythonv3.apimaticcalculatorpythonv3_client import Apimaticcalculatorpythonv3Client\n```\n\n![Add a new project in PyCharm - Step 4](https://apidocs.io/illustration/python?step=projectFiles&workspaceFolder=APIMATIC%20Calculator-Python&libraryName=apimaticcalculatorpythonv3.apimaticcalculatorpythonv3_client&projectName=apimaticcalculatorpythonv3&className=Apimaticcalculatorpythonv3Client)\n\nAfter this you can write code to instantiate an API client object, get a controller object and make API calls. Sample code is given in the subsequent sections.\n\n### 3. Run the Test Project\n\nTo run the file within your test project, right click on your Python file inside your Test project and click on ```Run```\n\n![Run Test Project - Step 1](https://apidocs.io/illustration/python?step=runProject&workspaceFolder=APIMATIC%20Calculator-Python&libraryName=apimaticcalculatorpythonv3.apimaticcalculatorpythonv3_client&projectName=apimaticcalculatorpythonv3&className=Apimaticcalculatorpythonv3Client)\n\n\n## How to Test\n\nYou can test the generated SDK and the server with automatically generated test\ncases. unittest is used as the testing framework and nose is used as the test\nrunner. You can run the tests as follows:\n\n 1. From terminal/cmd navigate to the root directory of the SDK.\n 2. Invoke ```pip install -r test-requirements.txt```\n 3. Invoke ```nosetests```\n\n## Initialization\n\n### \n\nAPI client can be initialized as following.\n\n```python\n\nclient = Apimaticcalculatorpythonv3Client()\n```\n\n\n\n# Class Reference\n\n## List of Controllers\n\n* [CalculatorEndpoints](#calculator_endpoints)\n\n## ![Class: ](https://apidocs.io/img/class.png \".CalculatorEndpoints\") CalculatorEndpoints\n\n### Get controller instance\n\nAn instance of the ``` CalculatorEndpoints ``` class can be accessed from the API Client.\n\n```python\n calculator_endpoints_controller = client.calculator_endpoints\n```\n\n### ![Method: ](https://apidocs.io/img/method.png \".CalculatorEndpoints.calculate_op\") calculate_op\n\n> Calculates the expression using the specified operation..\n\n```python\ndef calculate_op(self,\n operation,\n x,\n y)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| operation | ``` Required ``` | The operator to apply on the variables |\n| x | ``` Required ``` | The LHS value |\n| y | ``` Required ``` | The RHS value |\n\n\n\n#### Example Usage\n\n```python\noperation = OperationType.MULTIPLY\nx = 4\ny = 5\n\nresult = calculator_endpoints_controller.calculate_op(operation, x, y)\n\n```\n\n\n[Back to List of Controllers](#list_of_controllers)\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://apimatic.io", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "apimaticcalculatorpythonv3", "package_url": "https://pypi.org/project/apimaticcalculatorpythonv3/", "platform": "", "project_url": "https://pypi.org/project/apimaticcalculatorpythonv3/", "project_urls": { "Homepage": "https://apimatic.io" }, "release_url": "https://pypi.org/project/apimaticcalculatorpythonv3/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Simple calculator API hosted on APIMATIC", "version": "1.0.1" }, "last_serial": 4912888, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3ec291cc2768846163f061aef589da79", "sha256": "cf3eccd8e1776585c0cd5b68c1c49718637aad0ef97feb6525fd2e0056201a70" }, "downloads": -1, "filename": "apimaticcalculatorpythonv3-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3ec291cc2768846163f061aef589da79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16101, "upload_time": "2019-03-07T22:59:52", "url": "https://files.pythonhosted.org/packages/40/47/f2cd704e953d9163e44288d329ff51a0e628b0f7ff5ac4b5b631afe36668/apimaticcalculatorpythonv3-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "194e48caf57bb7f0ace30723794f9bdd", "sha256": "3641657eca6061d361e6f8d266c4424c71dec9d6015c47d7d5b69d981d1c46b1" }, "downloads": -1, "filename": "apimaticcalculatorpythonv3-1.0.1.tar.gz", "has_sig": false, "md5_digest": "194e48caf57bb7f0ace30723794f9bdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16125, "upload_time": "2019-03-07T23:05:39", "url": "https://files.pythonhosted.org/packages/5e/ac/3475eff6f31e5008efb632b80d3b1aee05f5ecaeb177af0f511e8c34bd04/apimaticcalculatorpythonv3-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "194e48caf57bb7f0ace30723794f9bdd", "sha256": "3641657eca6061d361e6f8d266c4424c71dec9d6015c47d7d5b69d981d1c46b1" }, "downloads": -1, "filename": "apimaticcalculatorpythonv3-1.0.1.tar.gz", "has_sig": false, "md5_digest": "194e48caf57bb7f0ace30723794f9bdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16125, "upload_time": "2019-03-07T23:05:39", "url": "https://files.pythonhosted.org/packages/5e/ac/3475eff6f31e5008efb632b80d3b1aee05f5ecaeb177af0f511e8c34bd04/apimaticcalculatorpythonv3-1.0.1.tar.gz" } ] }