openapi-generator/samples/client/petstore/python/SwaggerPetstore-python
2015-05-22 15:50:09 +08:00
..
SwaggerPetstore updated unittests of python client 2015-05-22 15:50:09 +08:00
testfiles Add image file for python unit tests. 2015-04-23 17:38:57 +08:00
tests updated unittests of python client 2015-05-22 15:50:09 +08:00
dev-requirements.txt added python 2.7 and python 3.4 test environments 2015-05-15 14:38:06 +08:00
Makefile update python tests 2015-05-19 15:21:09 +08:00
pom.xml updated python unittests 2015-05-16 17:30:42 +08:00
README.md update python tests 2015-05-19 15:21:09 +08:00
setup.cfg update python tests 2015-05-19 15:21:09 +08:00
setup.py added python 2.7 and python 3.4 test environments 2015-05-15 14:38:06 +08:00
tox.ini added python 2.7 and python 3.4 test environments 2015-05-15 14:38:06 +08:00

Requirements.

Python 2.7 and later.

Setuptools

You can install the bindings via Setuptools.

python setup.py install

Or you can install from Github via pip:

pip install git+https://github.com/geekerzp/SwaggerPetstore-python.git

To use the bindings, import the pacakge:

import SwaggerPetstore

Manual Installation

If you do not wish to use setuptools, you can download the latest release. Then, to use the bindings, import the package:

import path.to.SwaggerPetstore-python.SwaggerPetstore

Getting Started

TODO

Documentation

TODO

Tests

(Make sure you are running it inside of a virtualenv)

You can run the tests in the current python platform:

$ make test
[... magically installs dependencies and runs tests on your virtualenv]
Ran 7 tests in 19.289s

OK

or

$ mvn integration-test -rf :PythonPetstoreClientTests
Using 2195432783 as seed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.594 s
[INFO] Finished at: 2015-05-16T18:00:35+08:00
[INFO] Final Memory: 11M/156M
[INFO] ------------------------------------------------------------------------

If you want to run the tests in all the python platforms:

$ make test-all
[... tox creates a virtualenv for every platform and runs tests inside of each]
  py27: commands succeeded
  py34: commands succeeded
  congratulations :)