{ "info": { "author": "APIMatic SDK Generator", "author_email": "support@apimatic.io", "bugtrack_url": null, "classifiers": [], "description": "# Getting started\n\nThis is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.\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=Swagger%20Petstore-Python)\n\n\n## How to Use\n\nThe following section explains how to use the Swaggerpetstore 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=Swagger%20Petstore-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=Swagger%20Petstore-Python&projectName=stupidpackage) \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=Swagger%20Petstore-Python&projectName=stupidpackage)\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=Swagger%20Petstore-Python&projectName=stupidpackage)\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 stupidpackage.stupidpackage_client import StupidpackageClient\n```\n\n![Add a new project in PyCharm - Step 4](https://apidocs.io/illustration/python?step=projectFiles&workspaceFolder=Swagger%20Petstore-Python&libraryName=stupidpackage.stupidpackage_client&projectName=stupidpackage&className=StupidpackageClient)\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=Swagger%20Petstore-Python&libraryName=stupidpackage.stupidpackage_client&projectName=stupidpackage&className=StupidpackageClient)\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### Authentication\nIn order to setup authentication and initialization of the API client, you need the following information.\n\n| Parameter | Description |\n|-----------|-------------|\n| o_auth_client_id | OAuth 2 Client ID |\n| o_auth_redirect_uri | OAuth 2 Redirection endpoint or Callback Uri |\n\n\n\nAPI client can be initialized as following.\n\n```python\n# Configuration parameters and credentials\no_auth_client_id = 'o_auth_client_id' # OAuth 2 Client ID\no_auth_redirect_uri = 'o_auth_redirect_uri' # OAuth 2 Redirection endpoint or Callback Uri\n\nclient = StupidpackageClient(o_auth_client_id, o_auth_redirect_uri)\n```\n\n\n\n# Class Reference\n\n## List of Controllers\n\n* [PetController](#pet_controller)\n* [StoreController](#store_controller)\n* [UserController](#user_controller)\n\n## ![Class: ](https://apidocs.io/img/class.png \".PetController\") PetController\n\n### Get controller instance\n\nAn instance of the ``` PetController ``` class can be accessed from the API Client.\n\n```python\n pet_controller = client.pet\n```\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.update_pet_put\") update_pet_put\n\n> Update an existing pet\n\n```python\ndef update_pet_put(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` | Pet object that needs to be added to the store |\n\n\n\n#### Example Usage\n\n```python\nbody = Pet()\n\npet_controller.update_pet_put(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid ID supplied |\n| 404 | Pet not found |\n| 405 | Validation exception |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.create_pet_post\") create_pet_post\n\n> Add a new pet to the store\n\n```python\ndef create_pet_post(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` | Pet object that needs to be added to the store |\n\n\n\n#### Example Usage\n\n```python\nbody = Pet()\n\npet_controller.create_pet_post(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 405 | Invalid input |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.get_pet_find_by_status_get\") get_pet_find_by_status_get\n\n> Multiple status values can be provided with comma separated strings\n\n```python\ndef get_pet_find_by_status_get(self,\n status)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| status | ``` Required ``` ``` Collection ``` | Status values that need to be considered for filter |\n\n\n\n#### Example Usage\n\n```python\nstatus = [Status6Enum.AVAILABLE]\n\nresult = pet_controller.get_pet_find_by_status_get(status)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid status value |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.get_pet_find_by_tags_get\") get_pet_find_by_tags_get\n\n> Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n\n```python\ndef get_pet_find_by_tags_get(self,\n tags)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| tags | ``` Required ``` ``` Collection ``` | Tags to filter by |\n\n\n\n#### Example Usage\n\n```python\ntags = ['tags']\n\nresult = pet_controller.get_pet_find_by_tags_get(tags)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid tag value |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.get_pet_by_pet_id_get\") get_pet_by_pet_id_get\n\n> Returns a single pet\n\n```python\ndef get_pet_by_pet_id_get(self,\n pet_id)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| petId | ``` Required ``` | ID of pet to return |\n\n\n\n#### Example Usage\n\n```python\npet_id = 182\n\nresult = pet_controller.get_pet_by_pet_id_get(pet_id)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid ID supplied |\n| 404 | Pet not found |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.create_pet_by_pet_id_post\") create_pet_by_pet_id_post\n\n> Updates a pet in the store with form data\n\n```python\ndef create_pet_by_pet_id_post(self,\n pet_id,\n name=None,\n status=None)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| petId | ``` Required ``` | ID of pet that needs to be updated |\n| name | ``` Optional ``` | Updated name of the pet |\n| status | ``` Optional ``` | Updated status of the pet |\n\n\n\n#### Example Usage\n\n```python\npet_id = 182\nname = 'name'\nstatus = 'status'\n\npet_controller.create_pet_by_pet_id_post(pet_id, name, status)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 405 | Invalid input |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.delete_pet_by_pet_id_delete\") delete_pet_by_pet_id_delete\n\n> Deletes a pet\n\n```python\ndef delete_pet_by_pet_id_delete(self,\n pet_id,\n api_key=None)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| petId | ``` Required ``` | Pet id to delete |\n| apiKey | ``` Optional ``` | TODO: Add a parameter description |\n\n\n\n#### Example Usage\n\n```python\npet_id = 182\napi_key = 'api_key'\n\npet_controller.delete_pet_by_pet_id_delete(pet_id, api_key)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid ID supplied |\n| 404 | Pet not found |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".PetController.create_pet_upload_image_by_pet_id_post\") create_pet_upload_image_by_pet_id_post\n\n> uploads an image\n\n```python\ndef create_pet_upload_image_by_pet_id_post(self,\n pet_id,\n additional_metadata=None,\n file=None)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| petId | ``` Required ``` | ID of pet to update |\n| additionalMetadata | ``` Optional ``` | Additional data to pass to server |\n| file | ``` Optional ``` | file to upload |\n\n\n\n#### Example Usage\n\n```python\npet_id = 182\nadditional_metadata = 'additionalMetadata'\nfile = open(\"pathtofile\", 'rb')\n\nresult = pet_controller.create_pet_upload_image_by_pet_id_post(pet_id, additional_metadata, file)\n\n```\n\n\n[Back to List of Controllers](#list_of_controllers)\n\n## ![Class: ](https://apidocs.io/img/class.png \".StoreController\") StoreController\n\n### Get controller instance\n\nAn instance of the ``` StoreController ``` class can be accessed from the API Client.\n\n```python\n store_controller = client.store\n```\n\n### ![Method: ](https://apidocs.io/img/method.png \".StoreController.get_store_inventory_get\") get_store_inventory_get\n\n> Returns a map of status codes to quantities\n\n```python\ndef get_store_inventory_get(self)\n```\n\n#### Example Usage\n\n```python\n\nresult = store_controller.get_store_inventory_get()\n\n```\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".StoreController.create_store_order_post\") create_store_order_post\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Place an order for a pet\n\n```python\ndef create_store_order_post(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` | order placed for purchasing the pet |\n\n\n\n#### Example Usage\n\n```python\nbody = Order()\n\nresult = store_controller.create_store_order_post(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid Order |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".StoreController.get_store_order_by_order_id_get\") get_store_order_by_order_id_get\n\n> *Tags:* ``` Skips Authentication ``` \n\n> For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions\n\n```python\ndef get_store_order_by_order_id_get(self,\n order_id)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| orderId | ``` Required ``` | ID of pet that needs to be fetched |\n\n\n\n#### Example Usage\n\n```python\norder_id = 182\n\nresult = store_controller.get_store_order_by_order_id_get(order_id)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid ID supplied |\n| 404 | Order not found |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".StoreController.delete_store_order_by_order_id_delete\") delete_store_order_by_order_id_delete\n\n> *Tags:* ``` Skips Authentication ``` \n\n> For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors\n\n```python\ndef delete_store_order_by_order_id_delete(self,\n order_id)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| orderId | ``` Required ``` | ID of the order that needs to be deleted |\n\n\n\n#### Example Usage\n\n```python\norder_id = 19\n\nstore_controller.delete_store_order_by_order_id_delete(order_id)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid ID supplied |\n| 404 | Order not found |\n\n\n\n\n[Back to List of Controllers](#list_of_controllers)\n\n## ![Class: ](https://apidocs.io/img/class.png \".UserController\") UserController\n\n### Get controller instance\n\nAn instance of the ``` UserController ``` class can be accessed from the API Client.\n\n```python\n user_controller = client.user\n```\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.create_user_post\") create_user_post\n\n> *Tags:* ``` Skips Authentication ``` \n\n> This can only be done by the logged in user.\n\n```python\ndef create_user_post(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` | Created user object |\n\n\n\n#### Example Usage\n\n```python\nbody = User()\n\nuser_controller.create_user_post(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 0 | successful operation |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.create_user_create_with_array_post\") create_user_create_with_array_post\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Creates list of users with given input array\n\n```python\ndef create_user_create_with_array_post(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` ``` Collection ``` | List of user object |\n\n\n\n#### Example Usage\n\n```python\nbody = [User()]\n\nuser_controller.create_user_create_with_array_post(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 0 | successful operation |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.create_user_create_with_list_post\") create_user_create_with_list_post\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Creates list of users with given input array\n\n```python\ndef create_user_create_with_list_post(self,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| body | ``` Required ``` ``` Collection ``` | List of user object |\n\n\n\n#### Example Usage\n\n```python\nbody = [User()]\n\nuser_controller.create_user_create_with_list_post(body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 0 | successful operation |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.get_user_login_get\") get_user_login_get\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Logs user into the system\n\n```python\ndef get_user_login_get(self,\n username,\n password)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| username | ``` Required ``` | The user name for login |\n| password | ``` Required ``` | The password for login in clear text |\n\n\n\n#### Example Usage\n\n```python\nusername = 'username'\npassword = 'password'\n\nresult = user_controller.get_user_login_get(username, password)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid username/password supplied |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.get_user_logout_get\") get_user_logout_get\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Logs out current logged in user session\n\n```python\ndef get_user_logout_get(self)\n```\n\n#### Example Usage\n\n```python\n\nuser_controller.get_user_logout_get()\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 0 | successful operation |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.get_user_by_username_get\") get_user_by_username_get\n\n> *Tags:* ``` Skips Authentication ``` \n\n> Get user by user name\n\n```python\ndef get_user_by_username_get(self,\n username)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| username | ``` Required ``` | The name that needs to be fetched. Use user1 for testing. |\n\n\n\n#### Example Usage\n\n```python\nusername = 'username'\n\nresult = user_controller.get_user_by_username_get(username)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid username supplied |\n| 404 | User not found |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.update_user_by_username_put\") update_user_by_username_put\n\n> *Tags:* ``` Skips Authentication ``` \n\n> This can only be done by the logged in user.\n\n```python\ndef update_user_by_username_put(self,\n username,\n body)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| username | ``` Required ``` | name that need to be updated |\n| body | ``` Required ``` | Updated user object |\n\n\n\n#### Example Usage\n\n```python\nusername = 'username'\nbody = User()\n\nuser_controller.update_user_by_username_put(username, body)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid user supplied |\n| 404 | User not found |\n\n\n\n\n### ![Method: ](https://apidocs.io/img/method.png \".UserController.delete_user_by_username_delete\") delete_user_by_username_delete\n\n> *Tags:* ``` Skips Authentication ``` \n\n> This can only be done by the logged in user.\n\n```python\ndef delete_user_by_username_delete(self,\n username)\n```\n\n#### Parameters\n\n| Parameter | Tags | Description |\n|-----------|------|-------------|\n| username | ``` Required ``` | The name that needs to be deleted |\n\n\n\n#### Example Usage\n\n```python\nusername = 'username'\n\nuser_controller.delete_user_by_username_delete(username)\n\n```\n\n#### Errors\n\n| Error Code | Error Description |\n|------------|-------------------|\n| 400 | Invalid username supplied |\n| 404 | User not found |\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": "stupidpackage", "package_url": "https://pypi.org/project/stupidpackage/", "platform": "", "project_url": "https://pypi.org/project/stupidpackage/", "project_urls": { "Homepage": "https://apimatic.io" }, "release_url": "https://pypi.org/project/stupidpackage/2-0/", "requires_dist": null, "requires_python": "", "summary": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", "version": "2-0" }, "last_serial": 5214451, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "509836d6805dd3293d5138b5beb4e11c", "sha256": "8ff9d79ca3d5bfe829672ebc8f6578fb0111bd404526b87d0de50f57cbf8e4a3" }, "downloads": -1, "filename": "stupidpackage-1.1.tar.gz", "has_sig": false, "md5_digest": "509836d6805dd3293d5138b5beb4e11c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20913, "upload_time": "2018-09-24T08:33:35", "url": "https://files.pythonhosted.org/packages/94/e6/aaa7485c99a413bc901d4573991fc67386ee86347e7e2e5407060ba4799c/stupidpackage-1.1.tar.gz" } ], "2-0": [ { "comment_text": "", "digests": { "md5": "b66c6d603f5c75e22d54bb8a7263e40f", "sha256": "922b2d54b07da1671103b6881f08e1cbc7ea388fd7acd301d4ff8b454ca89603" }, "downloads": -1, "filename": "stupidpackage-2-0.tar.gz", "has_sig": false, "md5_digest": "b66c6d603f5c75e22d54bb8a7263e40f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21744, "upload_time": "2019-05-01T21:50:32", "url": "https://files.pythonhosted.org/packages/83/2d/3be55adc297328d604148512784cc1f67359374826907d6c593bdab66a58/stupidpackage-2-0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b66c6d603f5c75e22d54bb8a7263e40f", "sha256": "922b2d54b07da1671103b6881f08e1cbc7ea388fd7acd301d4ff8b454ca89603" }, "downloads": -1, "filename": "stupidpackage-2-0.tar.gz", "has_sig": false, "md5_digest": "b66c6d603f5c75e22d54bb8a7263e40f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21744, "upload_time": "2019-05-01T21:50:32", "url": "https://files.pythonhosted.org/packages/83/2d/3be55adc297328d604148512784cc1f67359374826907d6c593bdab66a58/stupidpackage-2-0.tar.gz" } ] }