Python 2 런타임에서 script 필드를 사용하여 수신 요청을 앱의 스크립트로 라우팅합니다.
Python 3 런타임에서는 script 필드를 사용하는 대신 인앱 라우팅(예: Flask 또는 Django)이 포함된 웹 프레임워크를 사용해야 합니다.
app.yaml 파일을 Python 3 런타임으로 마이그레이션하려면 파일에 정적 핸들러와 스크립트 핸들러가 있는지 여부에 따라 다음 중 하나를 수행합니다.
app.yaml 파일에 정적 핸들러가 포함된 경우 다음 중 하나를 수행하여 동적 콘텐츠 요청이 앱의 스크립트로 라우팅되도록 합니다.
모든 script 필드를 삭제합니다. 그런 다음 entrypoint 필드를 추가하여 앱을 실행하는 웹 서버를 시작합니다. 정적 핸들러와 일치하지 않는 요청은 entrypoint 필드에 지정된 웹 서버로 전달됩니다. 웹 서버와 앱의 웹 프레임워크는 요청을 올바른 스크립트로 라우팅하는 역할을 합니다.
모든 script 필드의 값을 auto로 바꿉니다. App Engine은 웹 서버에서 앱을 자동으로 실행하며 스크립트 핸들러와 일치하는 모든 요청은 웹 서버로 전달됩니다(앱이몇 가지 요구사항을 충족할 경우). 웹 서버와 앱의 웹 프레임워크는 요청을 올바른 스크립트로 라우팅하는 역할을 합니다.
app.yaml 파일에 정적 핸들러가 포함되어 있지 않은 경우 모든 script 필드를 삭제하세요. 앱에 대한 모든 요청은 앱의 웹 서버로 전달되며 앱의 프레임워크는 요청을 올바른 스크립트로 라우팅합니다. 필요에 따라 entrypoint 필드를 추가하여 기본 시작 동작을 맞춤설정할 수 있습니다.
app.yaml에 두 가지 유형의 핸들러가 모두 있는 경우에 정적 핸들러와 아래 예시의 관리자 전용 핸들러와 같이 다른 지시어가 필요한 auto 핸들러를 제외하고 auto를 표시하는 모든 스크립트 핸들러를 삭제할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-19(UTC)"],[[["\u003cp\u003eThe Python 3 runtime on App Engine standard environment requires updates to the \u003ccode\u003eapp.yaml\u003c/code\u003e file, while the \u003ccode\u003eappengine_config.py\u003c/code\u003e file is no longer used.\u003c/p\u003e\n"],["\u003cp\u003eSeveral fields in the \u003ccode\u003eapp.yaml\u003c/code\u003e file are no longer supported in Python 3, including \u003ccode\u003eapi_version\u003c/code\u003e, \u003ccode\u003eapplication_readable\u003c/code\u003e, \u003ccode\u003ebuiltins\u003c/code\u003e, \u003ccode\u003ethreadsafe\u003c/code\u003e, and \u003ccode\u003elibraries\u003c/code\u003e, each having different changes in requirements or methodology.\u003c/p\u003e\n"],["\u003cp\u003eIf using the legacy bundled services, the \u003ccode\u003eapp_engine_apis\u003c/code\u003e field in \u003ccode\u003eapp.yaml\u003c/code\u003e must be set to \u003ccode\u003etrue\u003c/code\u003e, and it enables the use of \u003ccode\u003ehandlers: login\u003c/code\u003e; otherwise, Identity and Access Management (IAM) should be used.\u003c/p\u003e\n"],["\u003cp\u003eIn Python 3, the \u003ccode\u003escript\u003c/code\u003e field in \u003ccode\u003eapp.yaml\u003c/code\u003e handlers is replaced by in-app routing using a web framework like Flask or Django, and the \u003ccode\u003eentrypoint\u003c/code\u003e field is used to start the web server, which will handle the routing.\u003c/p\u003e\n"],["\u003cp\u003eIn the Python 3 runtime, dependencies are installed using the standard \u003ccode\u003erequirements.txt\u003c/code\u003e file instead of the \u003ccode\u003eappengine_config.py\u003c/code\u003e file used in Python 2, meaning the latter file can be removed.\u003c/p\u003e\n"]]],[],null,[]]