openapi-generator/samples/client/petstore/python
2015-11-03 10:29:28 +08:00
..
swagger_client update sample, better handle of $ in naming 2015-11-03 10:29:28 +08:00
swagger_client.egg-info update python samples 2015-08-24 21:08:21 +08:00
testfiles Generate the python into python/ folder directly 2015-06-18 10:43:24 +08:00
tests Fix issue in python client. 2015-09-25 15:10:32 +08:00
.coverage update sample, better handle of $ in naming 2015-11-03 10:29:28 +08:00
.travis.yml Enhancements intergration-test of python client 2015-07-14 09:39:19 +08:00
dev-requirements.txt Generate the python into python/ folder directly 2015-06-18 10:43:24 +08:00
dev-requirements.txt.log update sample, better handle of $ in naming 2015-11-03 10:29:28 +08:00
Makefile Update integration test of python client 2015-07-14 15:38:23 +08:00
pom.xml Update integration test of python client 2015-07-14 15:38:23 +08:00
README.md Update README file of python client 2015-07-14 17:34:38 +08:00
setup.cfg Update unit tests of Python client. 2015-07-14 09:39:19 +08:00
setup.py update python samples 2015-08-24 21:08:21 +08:00
test-all.sh Update integration test of python client 2015-07-14 15:38:23 +08:00
test.sh Update integration test of python client 2015-07-14 15:38:23 +08:00
tox.ini Generate the python into python/ folder directly 2015-06-18 10:43:24 +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/swagger_client.git

To use the bindings, import the pacakge:

import swagger_client

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.swagger_client

Getting Started

TODO

Documentation

TODO

Tests

(Please make sure you have virtualenv installed)

Execute the following command to run the tests in the current Python (v2 or v3) environment:

$ 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 :)