-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] rebuild python server samples
- Loading branch information
1 parent
743a618
commit 2f5148b
Showing
14 changed files
with
115 additions
and
18 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.3.0-SNAPSHOT | ||
4.3.1-SNAPSHOT |
6 changes: 3 additions & 3 deletions
6
samples/server/petstore/python-aiohttp-srclayout/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
connexion[aiohttp,swagger-ui] == 2.0.2 | ||
swagger-ui-bundle == 0.0.2 | ||
aiohttp_jinja2 == 1.1.0 | ||
connexion[aiohttp,swagger-ui] == 2.6.0 | ||
swagger-ui-bundle == 0.0.6 | ||
aiohttp_jinja2 == 1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# coding: utf-8 | ||
|
||
import sys | ||
from setuptools import setup, find_packages | ||
|
||
NAME = "openapi_server" | ||
VERSION = "1.0.0" | ||
|
||
# To install the library, run the following | ||
# | ||
# python setup.py install | ||
# | ||
# prerequisite: setuptools | ||
# http://pypi.python.org/pypi/setuptools | ||
|
||
REQUIRES = [ | ||
"connexion==2.6.0", | ||
"swagger-ui-bundle==0.0.6", | ||
"aiohttp_jinja2==1.2.0", | ||
] | ||
|
||
setup( | ||
name=NAME, | ||
version=VERSION, | ||
description="OpenAPI Petstore", | ||
author_email="", | ||
url="", | ||
keywords=["OpenAPI", "OpenAPI Petstore"], | ||
install_requires=REQUIRES, | ||
packages=find_packages("src/"), | ||
package_dir={"": "src/"}, | ||
package_data={'': ['src//openapi/openapi.yaml']}, | ||
include_package_data=True, | ||
entry_points={ | ||
'console_scripts': ['openapi_server=openapi_server.__main__:main']}, | ||
long_description="""\ | ||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. | ||
""" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
connexion[aiohttp,swagger-ui] == 2.0.2 | ||
swagger-ui-bundle == 0.0.2 | ||
aiohttp_jinja2 == 1.1.0 | ||
connexion[aiohttp,swagger-ui] == 2.6.0 | ||
swagger-ui-bundle == 0.0.6 | ||
aiohttp_jinja2 == 1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# coding: utf-8 | ||
|
||
import sys | ||
from setuptools import setup, find_packages | ||
|
||
NAME = "openapi_server" | ||
VERSION = "1.0.0" | ||
|
||
# To install the library, run the following | ||
# | ||
# python setup.py install | ||
# | ||
# prerequisite: setuptools | ||
# http://pypi.python.org/pypi/setuptools | ||
|
||
REQUIRES = [ | ||
"connexion==2.6.0", | ||
"swagger-ui-bundle==0.0.6", | ||
"aiohttp_jinja2==1.2.0", | ||
] | ||
|
||
setup( | ||
name=NAME, | ||
version=VERSION, | ||
description="OpenAPI Petstore", | ||
author_email="", | ||
url="", | ||
keywords=["OpenAPI", "OpenAPI Petstore"], | ||
install_requires=REQUIRES, | ||
packages=find_packages(), | ||
package_data={'': ['openapi/openapi.yaml']}, | ||
include_package_data=True, | ||
entry_points={ | ||
'console_scripts': ['openapi_server=openapi_server.__main__:main']}, | ||
long_description="""\ | ||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. | ||
""" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
samples/server/petstore/python-flask-python2/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
connexion >= 2.6.0; python_version>="3.6" | ||
connexion >= 2.3.0; python_version=="3.5" | ||
connexion >= 2.3.0; python_version=="3.4" | ||
# connexion 2.6 dropped support for python < 3.6 | ||
connexion >= 2.3.0; python_version=="3.5" or python_version=="3.4" | ||
connexion == 2.4.0; python_version<="2.7" | ||
# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug | ||
# we must peg werkzeug versions below to fix connexion | ||
# https://github.com/zalando/connexion/pull/1044 | ||
werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" | ||
swagger-ui-bundle >= 0.0.2 | ||
python_dateutil >= 2.6.0 | ||
typing >= 3.5.2.2 | ||
# For specs with timestamps, pyyaml 5.3 broke connexion's spec parsing in python 2. | ||
# Connexion uses copy.deepcopy() on the spec, thus hitting this bug: | ||
# https://github.com/yaml/pyyaml/issues/387 | ||
pyyaml < 5.3; python_version<="2.7" | ||
setuptools >= 21.0.0 |
2 changes: 1 addition & 1 deletion
2
samples/server/petstore/python-flask-python2/test-requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pytest~=4.6.7 # needed for python 2.7+3.4 | ||
pytest-cov>=2.8.1 | ||
pytest-randomly==1.2.3 # needed for python 2.7+3.4 | ||
flask_testing==0.6.1 | ||
Flask-Testing==0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
[tox] | ||
envlist = py27, py3 | ||
skipsdist=True | ||
|
||
[testenv] | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/test-requirements.txt | ||
{toxinidir} | ||
|
||
commands= | ||
pytest --cov=openapi_server | ||
pytest --cov=openapi_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
connexion >= 2.6.0; python_version>="3.6" | ||
connexion >= 2.3.0; python_version=="3.5" | ||
connexion >= 2.3.0; python_version=="3.4" | ||
connexion == 2.4.0; python_version<="2.7" | ||
# connexion 2.6 dropped support for python < 3.6 | ||
connexion >= 2.3.0; python_version=="3.5" or python_version=="3.4" | ||
# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug | ||
# we must peg werkzeug versions below to fix connexion | ||
# https://github.com/zalando/connexion/pull/1044 | ||
werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" | ||
swagger-ui-bundle >= 0.0.2 | ||
python_dateutil >= 2.6.0 | ||
setuptools >= 21.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pytest~=4.6.7 # needed for python 2.7+3.4 | ||
pytest-cov>=2.8.1 | ||
pytest-randomly==1.2.3 # needed for python 2.7+3.4 | ||
flask_testing==0.6.1 | ||
Flask-Testing==0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
[tox] | ||
envlist = py3 | ||
skipsdist=True | ||
|
||
[testenv] | ||
deps=-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/test-requirements.txt | ||
{toxinidir} | ||
|
||
commands= | ||
pytest --cov=openapi_server | ||
pytest --cov=openapi_server |