Connexion: pip install connexion[swagger-ui]: μΌμΉ˜ν•˜λŠ” ν•­λͺ©μ„ 찾을 수 μ—†μŒ: connexion[swagger-ui]

에 λ§Œλ“  2018λ…„ 11μ›” 14일  Β·  10μ½”λ©˜νŠΈ  Β·  좜처: zalando/connexion

μ„€λͺ…

여기에 λ‚˜μ—΄λœ μžμŠ΅μ„œλ₯Ό λ”°λ₯΄λ €κ³  μ‹œλ„ν•©λ‹ˆλ‹€. https://medium.com/@ssola/building -microservices-with-python-part-3-a556a4c4bc00

swagger-ui pip extraλ₯Ό μ„€μΉ˜ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

μ˜ˆμƒλ˜λŠ” 행동

μ„€μΉ˜μ— swagger-uiκ°€ μ„€μΉ˜λ˜μ–΄ μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

μ‹€μ œ 행동

no matches found: connexion[swagger-ui]

μž¬ν˜„ 단계

pip install connexion[swagger-ui]:

μΆ”κ°€ 정보:

λͺ…λ Ή 좜λ ₯:

  • python --version
    Python 3.6.7 :: Anaconda, Inc.
  • pip show connexion | grep "^Version\:"
    Version: 2.0.1

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

pip install "connexion[swagger-ui]" 이 λ‚˜λ₯Ό μœ„ν•΄ μΌν–ˆμŠ΅λ‹ˆλ‹€

λͺ¨λ“  10 λŒ“κΈ€

μ•ˆλ…•ν•˜μ„Έμš” @mas-dse-juremigi

버그λ₯Ό μž¬ν˜„ν•  수 μ—†μ—ˆμŠ΅λ‹ˆλ‹€. λͺ‡ 가지 질문:

  1. 일반적으둜 pip extrasλ₯Ό μ„€μΉ˜ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?
  2. pip install connexion[tests] μ—μ„œ λ™μΌν•œ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆκΉŒ?
  3. pip --version 의 좜λ ₯은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?

λ‚΄κ°€ μ‹œλ„ν•œ 것은 λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

βœ” /tmp/pip > virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/pip/venv/bin/python2
Also creating executable in /tmp/pip/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
βœ” /tmp/pip > . venv/bin/activate
(venv) βœ” /tmp/pip > pip install connexion[swagger-ui]
Collecting connexion[swagger-ui]
  Using cached https://files.pythonhosted.org/packages/0c/ad/69d7947053b960c4eb8229e01aefbd848d8a28a30972a8de52184cfde550/connexion-2.0.1-py2.py3-none-any.whl
Collecting typing>=3.6.1; python_version < "3.6" (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl
Collecting requests>=2.9.1 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl
Collecting clickclick>=1.2 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/b6/51/2b04f7a56dcbacc0e3a7cf726e1d88d28866bf488a7a0668582306e1e643/clickclick-1.2.2-py2.py3-none-any.whl
Collecting six>=1.9 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting PyYAML>=3.11 (from connexion[swagger-ui])
Collecting pathlib>=1.0.1; python_version < "3.4" (from connexion[swagger-ui])
Collecting jsonschema<3.0.0,>=2.5.1 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting flask>=0.10.1 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting inflection>=0.3.1 (from connexion[swagger-ui])
Collecting openapi-spec-validator>=0.2.4 (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/6e/02/8e436ff26d13dcae0f3b53acf19df7ddde91cbe0ebf98b8c37e884839253/openapi_spec_validator-0.2.4-py2-none-any.whl
Collecting swagger-ui-bundle>=0.0.2; extra == "swagger-ui" (from connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/46/fb/17cf46d8a650f3266ce46eaf6316e20288278c04d1aa3575b82581c7fb0c/swagger_ui_bundle-0.0.2-py2-none-any.whl
Collecting idna<2.8,>=2.5 (from requests>=2.9.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.9.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.9.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.9.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting click>=4.0 (from clickclick>=1.2->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting functools32; python_version == "2.7" (from jsonschema<3.0.0,>=2.5.1->connexion[swagger-ui])
Collecting Werkzeug>=0.14 (from flask>=0.10.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl
Collecting Jinja2>=2.10 (from flask>=0.10.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting itsdangerous>=0.24 (from flask>=0.10.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask>=0.10.1->connexion[swagger-ui])
  Using cached https://files.pythonhosted.org/packages/bc/3a/6bfd7b4b202fa33bdda8e4e3d3acc719f381fd730f9a0e7c5f34e845bd4d/MarkupSafe-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: typing, idna, urllib3, certifi, chardet, requests, PyYAML, click, clickclick, six, pathlib, functools32, jsonschema, Werkzeug, MarkupSafe, Jinja2, itsdangerous, flask, inflection, openapi-spec-validator, swagger-ui-bundle, connexion
Successfully installed Jinja2-2.10 MarkupSafe-1.1.0 PyYAML-3.13 Werkzeug-0.14.1 certifi-2018.10.15 chardet-3.0.4 click-7.0 clickclick-1.2.2 connexion-2.0.1 flask-1.0.2 functools32-3.2.3.post2 idna-2.7 inflection-0.3.1 itsdangerous-1.1.0 jsonschema-2.6.0 openapi-spec-validator-0.2.4 pathlib-1.0.1 requests-2.20.1 six-1.11.0 swagger-ui-bundle-0.0.2 typing-3.6.6 urllib3-1.24.1
(venv) βœ” /tmp/pip > pip freeze | grep swagger
swagger-ui-bundle==0.0.2

swagger-ui-bundle λ₯Ό μ„€μΉ˜ν•˜μ—¬ 차단을 ν•΄μ œν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.
κ·ΈλŸΌμ—λ„ λΆˆκ΅¬ν•˜κ³  λ¬Έμ„œμ— λͺ…μ‹œλœ 방법이 νš¨κ³Όκ°€ μ—†λŠ” 이유λ₯Ό μ•Œμ•„λ‚Ό κ°€μΉ˜κ°€ μžˆμŠ΅λ‹ˆλ‹€.

Windows 10μ—μ„œ λΉ„μŠ·ν•œ 문제λ₯Ό λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. 제 dev macμ—μ„œ connexion['swagger=ui'] κ°€ μ˜ˆμƒλŒ€λ‘œ μž‘λ™ν–ˆμŠ΅λ‹ˆλ‹€.

no matches found λ©”μ‹œμ§€λŠ” μ•„λ§ˆλ„ Zsh μ…Έμ—μ„œ μ‹œμž‘λ˜μ—ˆμ„ κ²ƒμž…λ‹ˆλ‹€. λ‹€μŒμ€ λ‚΄ μ‹œμŠ€ν…œμ˜ 전체 λ©”μ‹œμ§€μž…λ‹ˆλ‹€(μ‹œμž‘ λΆ€λΆ„μ˜ zsh: μ°Έκ³ ).

zsh: no matches found: connexion[swagger-ui]

이것은 Zsh 파일 이름 μƒμ„±μœΌλ‘œ 인해 λ°œμƒν•©λ‹ˆλ‹€. man zshexpn :

FILENAME GENERATION
       If a word contains an unquoted instance of one of the  characters  `*',
       `(',  `|',  `<',  `[', or `?', it is regarded as a pattern for filename
       generation, unless the GLOB option is unset. If the EXTENDED_GLOB
       option is set, the `^' and `#' characters also denote a pattern; other‐
       wise they are not treated specially by the shell.

기본적으둜 ZshλŠ” "νŒ¨ν„΄"을 connexions , connexionw , connexiona λ“±κ³Ό 같은 파일 μ΄λ¦„μœΌλ‘œ ν™•μž₯ν•˜λ €κ³  ν•©λ‹ˆλ‹€. λ‹€λ₯Έ μ‰˜(예: bash)μ—λŠ” 그런 μ’…λ₯˜κ°€ μ—†μŠ΅λ‹ˆλ‹€. ν™•μž₯ν•˜κ±°λ‚˜ 기본적으둜 λΉ„ν™œμ„±ν™”ν•˜μ‹­μ‹œμ˜€. Zsh의 경우 λ§€κ°œλ³€μˆ˜λ₯Ό μΈμš©ν•΄μ•Ό ν•©λ‹ˆλ‹€.

zsh 처럼 λ³΄μž…λ‹ˆλ‹€.

```
hjacobs@mycomputer :~$ zsh
mycomputer% pip μ„€μΉ˜ μ—°κ²°[swagger-ui] --user
zsh: μΌμΉ˜ν•˜λŠ” ν•­λͺ©μ΄ μ—†μŠ΅λ‹ˆλ‹€: connexion[swagger-ui]

pip install "connexion[swagger-ui]" 이 λ‚˜λ₯Ό μœ„ν•΄ μΌν–ˆμŠ΅λ‹ˆλ‹€

이것을 μš”κ΅¬ 사항 파일둜 포맷할 수 μžˆλŠ” μ‚¬λžŒμ΄ μžˆμŠ΅λ‹ˆκΉŒ?

μ•ˆλ…•ν•˜μ„Έμš” μ—¬λŸ¬λΆ„, μš”κ΅¬ 사항 νŒŒμΌμ— ν¬ν•¨ν•˜λŠ” 방법을 κ΄€λ¦¬ν•œ μ‚¬λžŒμ΄ μžˆμŠ΅λ‹ˆκΉŒ?

@johanngomes λŠ¦μ€ νšŒμ‹ μ΄μ§€λ§Œ Google App Engine(2μ„ΈλŒ€)에 λ°°ν¬ν•˜λŠ” 데 λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. Connexion은 잘 μ„€μΉ˜λ˜μ§€λ§Œ μ΄μœ κ°€ 무엇이든 [swagger-ui] extraλŠ” μ„€μΉ˜λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

@dtkavκ°€ μ–ΈκΈ‰ν–ˆλ“―μ΄ μš”κ΅¬ 사항 νŒŒμΌμ— swagger-ui-bundle λ₯Ό μΆ”κ°€ν•˜κΈ°

λ‹€μŒμ€ pipenv λ₯Ό μ‚¬μš©ν•˜μ—¬ requirements.txt νŒŒμΌμ„ 덀프할 λ•Œ μ–»λŠ” 좜λ ₯μž…λ‹ˆλ‹€(λ‹€λ₯Έ 쒅속성을 μ œκ±°ν–ˆμŠ΅λ‹ˆλ‹€).

λͺ…λ Ή:

pipenv lock -r
connexion[swagger-ui]==2.7.0
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰