"WSGI"의 두 판 사이의 차이

(새 문서: ==개요== ;WSGI, Web Server Gateway Interface ;웹서버 게이트웨이 인터페이스 *웹서버가 웹어플리케이션과 어떻게 커뮤니케이션 하는지에 대한 명...)
 
잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 17개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;WSGI, Web Server Gateway Interface
;Web Server Gateway Interface (WSGI), Python WSGI
;웹서버 게이트웨이 인터페이스
;웹서버 게이트웨이 인터페이스, 파이썬 WSGI
*웹서버가 웹어플리케이션과 어떻게 커뮤니케이션 하는지에 대한 명세
* 웹서버와 웹 애플리케이션의 인터페이스를 위한 파이선 프레임워크
*웹서버가 웹어플리케이션이 요청에 대한 처리를 어떻 잘 서로잘 연결 되어 있는지에 대한 명세
* 웹서버가 웹어플리케이션과 어떻게 커뮤니케이션 하는지에 대한 명세
*Python 표준으로 PEP 3333에 잘 설명돼 있음
* 명세의 목적은 각각의 다른 서버에서 Python 어플리케이션 호스팅을 위한 공통의 메카니즘 제공
* 웹서버가 웹어플리케이션이 요청에 대한 처리를 어떻 잘 서로잘 연결 되어 있는지에 대한 명세
* Python 표준문서: [https://www.python.org/dev/peps/pep-0333/ PEP 333 -- Python Web Server Gateway Interface v1.0]
 
==애플리케이션 예시==
<syntaxhighlight lang="python" line>
def application(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    yield 'Hello World\n'
</syntaxhighlight>
*1행:  <code>environ</code>와 <code>start_response</code>를 매개변수를 가지는 callable 선언<code>environ</code>은 환경변수를 가지고 있는 딕셔너리
:<code>start_response</code>는 <code>status</code>와 <code>response_headers</code>를 가지는 callable임
*2행: <code>start_response</code> 호출
*3행:  문자열 반환


==같이 보기==
==같이 보기==
* [[CGI]]
* [[CGI]]
* [[mod wsgi]]
* [[uWSGI]]
* [[wsgi.py]]
* [[gunicorn]]
* [[mod_wsgi]]
* [[리눅스 mod_wsgi 설치]]
* [[파이썬 WSGI 서버 목록]]


==참고==
==참고==
*https://wsgi.readthedocs.io/en/latest/what.html
*https://wsgi.readthedocs.io/en/latest/what.html
* {{위키백과|웹 서버 게이트웨이 인터페이스}}


[[분류: CGI]]
[[분류: WSGI]]
[[분류: Python]]

2021년 7월 18일 (일) 04:16 기준 최신판

1 개요[ | ]

Web Server Gateway Interface (WSGI), Python WSGI
웹서버 게이트웨이 인터페이스, 파이썬 WSGI
  • 웹서버와 웹 애플리케이션의 인터페이스를 위한 파이선 프레임워크
  • 웹서버가 웹어플리케이션과 어떻게 커뮤니케이션 하는지에 대한 명세
  • 명세의 목적은 각각의 다른 서버에서 Python 어플리케이션 호스팅을 위한 공통의 메카니즘 제공
  • 웹서버가 웹어플리케이션이 요청에 대한 처리를 어떻 잘 서로잘 연결 되어 있는지에 대한 명세
  • Python 표준문서: PEP 333 -- Python Web Server Gateway Interface v1.0

2 애플리케이션 예시[ | ]

def application(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    yield 'Hello World\n'
  • 1행: environstart_response를 매개변수를 가지는 callable 선언environ은 환경변수를 가지고 있는 딕셔너리
start_responsestatusresponse_headers를 가지는 callable임
  • 2행: start_response 호출
  • 3행: 문자열 반환

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}