openapi-generator/samples/client/petstore-security-test/python
shwetas1205 dfbef43743 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client (#7560)
* fixing "decoding Unicode is not supported" error for py2 when data is unicode

* allowing nonstandard methods for tornado python client.

* Making sure to return unicode when needed
2018-02-02 23:00:04 +08:00
..
.swagger-codegen [python-client] Thread pool fix (#6396) 2017-09-01 18:18:03 +08:00
docs Binary mode for file deserialization in python (#6936) 2017-11-13 12:50:10 +08:00
petstore_api Fixed unicode error and supported allow_nonstandard_methods in tornado based python client (#7560) 2018-02-02 23:00:04 +08:00
test better code injection handling for python 2016-06-28 17:07:50 +08:00
.gitignore better code injection handling for python 2016-06-28 17:07:50 +08:00
.swagger-codegen-ignore better code injection handling for python 2016-06-28 17:07:50 +08:00
.travis.yml better code injection handling for python 2016-06-28 17:07:50 +08:00
git_push.sh better code injection handling for python 2016-06-28 17:07:50 +08:00
LICENSE better code injection handling for python 2016-06-28 17:07:50 +08:00
README.md [python-client] Thread pool fix (#6396) 2017-09-01 18:18:03 +08:00
requirements.txt [python] Triple quote strings with new lines in default values (#4941) 2017-03-07 14:46:38 +08:00
setup.py Binary mode for file deserialization in python (#6936) 2017-11-13 12:50:10 +08:00
test-requirements.txt better code injection handling for python 2016-06-28 17:07:50 +08:00
tox.ini Issue 5375 (#5403) 2017-04-21 22:05:54 +08:00

petstore-api

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ */ ' " =end --

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0 */ ' " =end -- \r\n \n \r
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import petstore_api 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import petstore_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
test_code_inject____end____rn_n_r = 'test_code_inject____end____rn_n_r_example' # str | To test code injection */ ' \" =end -- \\r\\n \\n \\r (optional)

try:
    # To test code injection */ ' \" =end -- \\r\\n \\n \\r
    api_instance.test_code_inject____end__rn_n_r(test_code_inject____end____rn_n_r=test_code_inject____end____rn_n_r)
except ApiException as e:
    print("Exception when calling FakeApi->test_code_inject____end__rn_n_r: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to *https://petstore.swagger.io */ ' " =end -- \r\n \n \r/v2 / ' " =end -- \r\n \n \r

Class Method HTTP request Description
FakeApi test_code_inject____end__rn_n_r PUT /fake To test code injection */ ' " =end -- \r\n \n \r

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: api_key */ ' " =end -- \r\n \n \r
  • Location: HTTP header

petstore_auth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: http://petstore.swagger.io/api/oauth/dialog
  • Scopes:
  • write:pets: modify pets in your account */ ' " =end -- \r\n \n \r
  • read:pets: read your pets */ ' " =end -- \r\n \n \r

Author

apiteam@swagger.io */ ' " =end -- \r\n \n \r