{"id":379806,"date":"2024-06-25T03:57:18","date_gmt":"2024-06-25T03:57:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=379806"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=379806","title":{"rendered":"<span>FastAPI: \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/820199\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/v_\/dc\/rc\/v_dcrcujqqosuimw7dr4bkikjqa.jpeg\" align=\"left\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/v_\/dc\/rc\/v_dcrcujqqosuimw7dr4bkikjqa.jpeg\" data-blurred=\"true\"\/><\/a> \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438!<\/p>\n<p>  FastAPI \u2014 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u044b\u0439, \u043d\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u0447\u0438\u0441\u0442\u044b\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Python. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, FastAPI \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u0430\u043a Golang. \u042d\u0442\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043d\u0438\u0433\u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 Python, \u043a\u0430\u043a FastAPI \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0411\u0438\u043b\u043b \u041b\u044e\u0431\u0430\u043d\u043e\u0432\u0438\u0447 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c FastAPI \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e \u0442\u0430\u043a\u0438\u043c \u0442\u0435\u043c\u0430\u043c, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u044b, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u0430\u0440\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u0441\u044c \u0441 RESTful API, \u043f\u0440\u0438\u0435\u043c\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438, \u043a\u0430\u043a Flask \u0438 Django, \u0432\u044b \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 FastAPI.<a name=\"habracut\"><\/a><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u044d\u0442\u0430 \u043a\u043d\u0438\u0433\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u0430 \u043a\u043d\u0438\u0433\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 FastAPI. \u041a\u043d\u0438\u0433\u0430 \u0434\u0430\u0435\u0442 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 FastAPI \u0438 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0435\u0433\u043e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u043e\u043b\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043d\u0438\u0433\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0412 \u0434\u0432\u0443\u0445 \u0433\u043b\u0430\u0432\u0430\u0445 \u0447\u0430\u0441\u0442\u0438 I \u043a\u043d\u0438\u0433\u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u044f\u0437\u044b\u043a\u0435 Python \u2014 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 API, \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043c\u043d\u043e\u0433\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435-\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<br \/>  \u0427\u0430\u0441\u0442\u044c II \u2014 \u044d\u0442\u043e \u043e\u0431\u0437\u043e\u0440 FastAPI, \u0441\u0432\u0435\u0436\u0435\u0433\u043e \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430 Python. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0447\u0430\u0441\u0442\u0438 I \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>  \u0412 \u0447\u0430\u0441\u0442\u0438 III \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0435\u043c\u0441\u044f \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 FastAPI, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043e\u0432\u0435\u0442\u044b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432 \u0447\u0430\u0441\u0442\u0438 IV \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0433\u0430\u043b\u0435\u0440\u0435\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 FastAPI. \u0414\u043b\u044f \u043d\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u0431\u0449\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0438 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p><\/div>\n<\/p><\/div>\n<h1>Pydantic, \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043e\u0431\u0437\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h1>\n<p>  <\/p>\n<h2>\u041e\u0431\u0437\u043e\u0440<\/h2>\n<p>  FastAPI \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0430\u043a\u0435\u0442 Python \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Pydantic. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <i>\u043c\u043e\u0434\u0435\u043b\u0438<\/i> (\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b Python). \u041e\u043d\u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 FastAPI \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 Python.<\/p>\n<p>  \u0412 \u0433\u043b\u0430\u0432\u0435 2 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c. \u0412 Python \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043c\u0435\u043d\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u0442\u0438\u043f\u044b.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u0432\u044f\u0436\u0435\u043c \u0441 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0442\u0438\u043f\u0430, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 Python \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u043a \u044f\u0437\u044b\u043a\u0443, \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438. \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0435\u0435 \u043d\u0435\u0442. \u0422\u043e\u0433\u0434\u0430 \u0432 \u0447\u0435\u043c \u0441\u043c\u044b\u0441\u043b?<\/p>\n<p>  \u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0431\u044b\u0442\u044c \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0430 Python \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a mypy, \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442 \u043e \u043b\u044e\u0431\u044b\u0445 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f\u0445.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0438\u043f\u043e\u0432. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u043f\u0430\u043a\u0435\u0442 Pydantic \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0434\u043b\u044f \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u0437\u0436\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 FastAPI \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438? \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0433\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f:<\/p>\n<pre><code class=\"python\">name: type<\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"python\">name: type = value<\/code><\/pre>\n<p>  \u0422\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 Python, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>int<\/code> \u0438\u043b\u0438<br \/>  <code>str<\/code>, \u0438\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0435\u0439, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a <code>tuple<\/code>, <code>list<\/code> \u0438\u043b\u0438 <code>dict<\/code>:<\/p>\n<pre><code class=\"python\">thing: str = \"yeti\"<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Python \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.9 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043c\u0435\u043d \u0442\u0438\u043f\u043e\u0432 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">from typing import Str thing: Str = \"yeti\"<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439:<\/p>\n<pre><code class=\"python\">physics_magic_number: float = 1.0\/137.03599913 hp_lovecraft_noun: str = \"ichor\" exploding_sheep: tuple = \"sis\", \"boom\", bah!\" responses: dict = {\"Marco\": \"Polo\", \"answer\": 42}<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0442\u0438\u043f\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439:<\/p>\n<pre><code class=\"python\">name: dict[keytype, valtype] = {key1: val1, key2: val2}<\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<ul>\n<li>Any \u2014 \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f;<\/li>\n<li>Union \u2014 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Union[<code>str<\/code>, <code>int<\/code>].<\/li>\n<\/ul>\n<p>  \u0412 Python, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 3.10, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <i>type1<\/i> | <i>type2<\/i>, \u0430 \u043d\u0435 Union[<i>type1<\/i>,<i>type2<\/i>].<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 Pydantic \u0434\u043b\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 (<code>dict<\/code>) \u0432 Python \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"python\">from typing import Any responses: dict[str, Any] = {\"Marco\": \"Polo\", \"answer\": 42}<\/code><\/pre>\n<p>  \u0418\u043b\u0438, \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c\u0438:<\/p>\n<pre><code class=\"python\">from typing import Union responses: dict[str, Union[str, int]] = {\"Marco\": \"Polo\", \"answer\": 42}<\/code><\/pre>\n<p>  \u043b\u0438\u0431\u043e (\u0432 Python 3.10 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445):<\/p>\n<pre><code class=\"python\">responses: dict[str, str | int] = {\"Marco\": \"Polo\", \"answer\": 42}<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 Python \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439 \u0442\u0438\u043f\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u043e\u0439, \u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u2014 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"python\">$ python ... >>> thing0 Traceback (most recent call last):   File \"&lt;stdin>\", line 1, in &lt;module> NameError: name thing0 is not defined >>> thing0: str<\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u043d\u0435 \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c Python:<\/p>\n<pre><code class=\"python\">$ python ... >>> thing1: str = \"yeti\" >>> thing1 = 47 <\/code><\/pre>\n<p>  \u041d\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b mypy. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>pip<\/code> <code>install<\/code> <code>mypy<\/code>. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0434\u0432\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>stuff.py<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"python\">$ mypy stuff.py stuff.py:2: error: Incompatible types in assignment (expression has type \"int\", variable has type \"str\") Found 1 error in 1 file (checked 1 source file) <\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435 \u0442\u0438\u043f\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430:<\/p>\n<pre><code class=\"python\">function(args) -> type:<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Pydantic:<\/p>\n<pre><code class=\"python\">def get_thing() -> str:     return \"yeti\"<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u043b\u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438. \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<h2>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u0430?<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0433\u043b\u0430\u0432 \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u0433\u0430\u0442\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0430\u043a \u0438 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0438, \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b <i>\u043a\u0440\u0438\u043f\u0442\u0438\u0434\u043e\u0432<\/i> (\u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432) \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (\u0442\u043e\u0436\u0435 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0445 \u0438\u0449\u0443\u0442. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0438\u043f\u0442\u0438\u0434\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:  <\/p>\n<ul>\n<li> <code>name<\/code> \u2014 \u043a\u043b\u044e\u0447;<br \/>   <code>country <\/code>\u2014 \u0434\u0432\u0443\u0445\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 ISO (3166-1 alpha 2) \u0438\u043b\u0438 *, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0432\u0441\u0435\u00bb;<br \/>   <code>area<\/code> (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439) \u2014 \u0448\u0442\u0430\u0442 \u0421\u0428\u0410 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u044b;<br \/>   <code>description<\/code> \u2014 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435;<br \/>   <code>aka<\/code> \u2014 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043a\u0430\u043a\u2026\u00bb (also known as\u2026).<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 5.3 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u0438\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.3.<\/b> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439<\/p>\n<pre><code class=\"python\">>>> NAME = 0 >>> COUNTRY = 1 >>> AREA = 2 >>> DESCRIPTION = 3 >>> AKA = 4 >>> tuple_thing = (\"yeti\", \"CN\", \"Himalayas\",     \"Hirsute Himalayan\", \"Abominable Snowman\") >>> print(\"Name is\", tuple_thing[NAME]) Name is yeti<\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.4 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u0430\u043c.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.4. <\/b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/p>\n<pre><code class=\"python\">>>> dict_thing = {\"name\": \"yeti\", ...     \"country\": \"CN\", ...     \"area\": \"Himalayas\", ...     \"description\": \"Hirsute Himalayan\", ...     \"aka\": \"Abominable Snowman\"} >>> print(\"Name is\", dict_thing[\"name\"]) Name is yeti<\/code><\/pre>\n<p>  \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<br \/>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.5 <i>\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u0442\u0435\u0436<\/i> \u2014 \u044d\u0442\u043e \u043a\u043e\u0440\u0442\u0435\u0436, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0438\u043c\u0435\u043d\u0438.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.5.<\/b> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u0442\u0435\u0436\u0430<\/p>\n<pre><code class=\"python\">>>> from collections import namedtuple >>> CreatureNamedTuple = namedtuple(\"CreatureNamedTuple\", ...     \"name, country, area, description, aka\") >>> namedtuple_thing = CreatureNamedTuple(\"yeti\", ...     \"CN\", ...     \"Himalaya\", ...     \"Hirsute HImalayan\", ...     \"Abominable Snowman\") >>> print(\"Name is\", namedtuple_thing[0]) Name is yeti >>> print(\"Name is\", namedtuple_thing.name) Name is yeti<\/code><\/pre>\n<p>  \u041d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c namedtuple_thing[\u00abname\u00bb]. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 <code>tuple<\/code>, \u0430 \u043d\u0435 <code>dict<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c.<br \/>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.6 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 Python \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>class<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>self<\/code>. \u041d\u043e \u0434\u043b\u044f \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f<br \/>  \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.6. <\/b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<pre><code class=\"python\">>>> class CreatureClass(): ...     def __init__(self, ...       name: str, ...       country: str, ...       area: str, ...       description: str, ...       aka: str): ...       self.name = name ...       self.country = country ...       self.area = area ...       self.description = description ...       self.aka = aka ... >>> class_thing = CreatureClass( ...     \"yeti\", ...     \"CN\", ...     \"Himalayas\" ...     \"Hirsute Himalayan\", ...     \"Abominable Snowman\") >>> print(\"Name is\", class_thing.name) Name is yeti<\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c: \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u043e\u0445\u043e\u0433\u043e? \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432), \u043d\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f (\u043c\u0435\u0442\u043e\u0434\u043e\u0432). \u0412 \u043e\u0434\u0438\u043d \u0431\u0435\u0437\u0443\u043c\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0435\u0441\u0435\u043d \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f. (\u042d\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c1.) \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0437 \u043f\u043e\u043c\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0443\u0440\u043e\u0432\u043d\u044f\u043c\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u0435\u0442\u043e\u0434\u044b \u2014 \u044d\u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u0442\u0440\u0443\u0434\u043e\u043c \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u043b\u0438 \u0432 Python \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <i>\u0437\u0430\u043f\u0438\u0441\u044c\u044e <\/i>(<i>record<\/i>) \u0438\u043b\u0438 <i>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <\/i>(<i>struct<\/i>) (\u0433\u0440\u0443\u043f\u043f\u0430 \u0438\u043c\u0435\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439)? \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 Python \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <i>\u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/i> (<i>dataclass<\/i>). \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.7 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u0438 self-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0442 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.7.<\/b> \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <code>dataclass<\/code><\/p>\n<pre><code class=\"python\">>>> from dataclasses import dataclass >>> >>> @dataclass ... class CreatureDataClass(): ...     name: str ...     country: str ...     area: str ...     description: str ...     aka: str ... >>> dataclass_thing = CreatureDataClass( ...     \"yeti\", ...     \"CN\", ...     \"Himalayas\" ...     \"Hirsute Himalayan\", ...     \"Abominable Snowman\") >>> print(\"Name is\", dataclass_thing.name) Name is yeti <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u043c\u0435\u0441\u0442\u0435. \u041d\u043e \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u0443 \u0414\u0435\u0434\u0443\u0448\u043a\u0438 \u041c\u043e\u0440\u043e\u0437\u0430 \u0432\u043e\u0442 \u0447\u0442\u043e:  <\/p>\n<ul>\n<li> <i>\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 <\/i>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432;<\/li>\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435\/\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e;<\/li>\n<li>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a JSON, \u0438 \u0438\u0437 \u043d\u0438\u0445.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b<\/h2>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0437\u0430\u043c\u0430\u043d\u0447\u0438\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Python, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0438. \u041d\u043e \u0432\u044b \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u0435, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b. \u0410 \u0437\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c. \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c <i>\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435<\/i>.  <\/p>\n<ul>\n<li> \u041a\u043b\u044e\u0447 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d?<\/li>\n<li> \u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e?<\/li>\n<li> \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043a\u043b\u044e\u0447?<\/li>\n<li> \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 \u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443?<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0438\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438<br \/>  \u043e\u043d\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443?<\/li>\n<\/ul>\n<p>  \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0442\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439:  <\/p>\n<ul>\n<li> <i>Dataclasses<\/i> (<a href=\"https:\/\/oreil.ly\/mxANA\">https:\/\/oreil.ly\/mxANA<\/a>) \u2014 \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 Python;<\/li>\n<li> <i>attrs<\/i> (<a href=\"https:\/\/www.attrs.org\">https:\/\/www.attrs.org<\/a>) \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0443\u043f\u0435\u0440\u043d\u0430\u0431\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<br \/>  \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li> <i>Pydantic<\/i> (<a href=\"https:\/\/docs.pydantic.dev\">https:\/\/docs.pydantic.dev<\/a>) \u2014 \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 FastAPI, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 FastAPI.<br \/>  \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u0443 \u043a\u043d\u0438\u0433\u0443, \u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a.<\/li>\n<\/ul>\n<p>  \u0423\u0434\u043e\u0431\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 YouTube (<a href=\"https:\/\/%0Aoreil.ly\/pkQD3\">https:\/\/oreil.ly\/pkQD3<\/a>). \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e Pydantic \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435, \u0430 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 FastAPI \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0440\u0443\u0433\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e Pydantic \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 (\u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <code>BaseModel<\/code>), \u0430 \u0434\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b Python \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u042d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441\u0442\u0438\u043b\u044f.<\/p>\n<p>  \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 (<a href=\"https:\/\/oreil.ly\/gU28a\">https:\/\/oreil.ly\/gU28a<\/a>) Pydantic \u043f\u0440\u0435\u0432\u0437\u043e\u0448\u0435\u043b \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a marshmallow (<a href=\"https:\/\/marshmallow.readthedocs.io\">https:\/\/marshmallow.readthedocs.io<\/a>) \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u0438\u043d\u0442\u0440\u0438\u0433\u0443\u044e\u0449\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Voluptuous1 (<a href=\"https:\/\/github.com\/alecthomas\/voluptuous\">https:\/\/github.com\/alecthomas\/voluptuous<\/a>). \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043b\u044e\u0441 Pydantic \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0442\u0438\u043f\u043e\u0432 Python \u2014 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>  \u0412 \u043a\u043d\u0438\u0433\u0435 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 Pydantic, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 FastAPI.<\/p>\n<p>  Pydantic \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a:  <\/p>\n<ul>\n<li>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435;<\/li>\n<li>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f;<\/li>\n<li>\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u0438\u043b\u0438 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439;<\/li>\n<li>\u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e;<\/li>\n<li>\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>  \u0412\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 URL, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u0442\u0435\u043b\u043e HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0432 FastAPI \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u0438 Pydantic. \u0412 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u0430:  <\/p>\n<ul>\n<li><code>model.py<\/code> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c Pydantic;<\/li>\n<li> <code>data.py<\/code> \u2014 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043c\u043e\u0434\u0435\u043b\u0438;<\/li>\n<li><code>web.py<\/code> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f FastAPI, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0443\u044e \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430\u043c, \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0438\u0445 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c <i>\u043c\u043e\u0434\u0435\u043b\u044c<\/i> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.8.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.8.<\/b> \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430: model.py<\/p>\n<pre><code class=\"python\">from pydantic import BaseModel class Creature(BaseModel):     name: str     country: str     area: str     description: str     aka: str thing = Creature(     name=\"yeti\",     country=\"CN\",     area=\"Himalayas\",     description=\"Hirsute Himalayan\",     aka=\"Abominable Snowman\") ) print(\"Name is\", thing.name)<\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 <code>Creature<\/code> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 BaseModel \u0438\u0437 Pydantic. \u0427\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<br \/>  <code>: str<\/code> \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u043e\u0432 <code>name<\/code>, <code>country<\/code>,<code>area<\/code>, <code>description<\/code> \u0438 <code>aka<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0434-<br \/>  \u0441\u043a\u0430\u0437\u043a\u0443 \u0442\u0438\u043f\u0430 \u2014 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Python.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0412 Pydantic, \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u043e Optional \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0438\u043f\u0430, \u043f\u043e\u043b\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.9 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0438\u0445<br \/>  \u0438\u043c\u0435\u043d\u0430.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.9.<\/b> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/p>\n<pre><code class=\"python\">>>> thing = Creature( ...     name=\"yeti\", ...     country=\"CN\", ...     area=\"Himalayas\" ...     description=\"Hirsute Himalayan\", ...     aka=\"Abominable Snowman\") >>>     print(\"Name is\", thing.name) Name is yeti<\/code><\/pre>\n<p>  \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.10 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445 \u044d\u0442\u0438\u043c \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0442\u0438\u043f\u0430 list[Creature] \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Python, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Creature.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.10.<\/b> \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 data.py<\/p>\n<pre><code class=\"python\">from model import Creature _creatures: list[Creature] = [     Creature(name=\"yeti\",         country=\"CN\",         area=\"Himalayas\",         description=\"Hirsute Himalayan\",         aka=\"Abominable Snowman\" ),     Creature(name=\"sasquatch\",         country=\"US\",         area=\"*\",         description=\"Yeti's Cousin Eddie\",         aka=\"Bigfoot\") ] def get_creatures() -> list[Creature]: return _creatures<\/code><\/pre>\n<p>  (\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b &#171;*&#187; \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 area \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Bigfoot<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0436\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0437\u0434\u0435.)<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0440\u0430\u043d\u0435\u0435 \u0444\u0430\u0439\u043b model.py. \u041e\u043d \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0441\u0432\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <code>Creature_creatures<\/code> \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>get_creatures<\/code>() \u0434\u043b\u044f \u0438\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430.<br \/>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.11 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0444\u0430\u0439\u043b <code>web.py<\/code>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f FastAPI.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.11.<\/b> \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f FastAPI: <code>web.py<\/code><\/p>\n<pre><code class=\"python\">from model import Creature from fastapi import FastAPI app = FastAPI() @app.get(\"\/creature\") def get_all() -> list[Creature]:     from data import get_creatures     return get_creatures()<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.12.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.12.<\/b> \u0417\u0430\u043f\u0443\u0441\u043a Uvicorn<\/p>\n<pre><code class=\"python\">$ uvicorn creature:app INFO:     Started server process [24782] INFO:     Waiting for application startup. INFO:     Application startup complete. INFO:     Uvicorn running on http:\/\/127.0.0.1:8000 (Press CTRL+C to quit)<\/code><\/pre>\n<p>  \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u043e\u043a\u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 5.13 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 HTTPie (\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c Requests \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e).<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.13.<\/b> \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e HTTPie<\/p>\n<pre><code class=\"python\">$ http http:\/\/localhost:8000\/creature HTTP\/1.1 200 OK content-length: 183 content-type: application\/json date: Mon, 12 Sep 2022 02:21:15 GMT server: uvicorn [ {         \"aka\": \"Abominable Snowman\",         \"area\": \"Himalayas\",         \"country\": \"CN\",         \"name\": \"yeti\",         \"description\": \"Hirsute Himalayan\" }, {         \"aka\": \"Bigfoot\",         \"country\": \"US\",         \"area\": \"*\",         \"name\": \"sasquatch\",         \"description\": \"Yeti's Cousin Eddie\" }<\/code><\/pre>\n<p>  FastAPI \u0438 Starlette \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 Creature \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 JSON. \u042d\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 FastAPI, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c.<br \/>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043e\u043a\u043d\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Uvicorn, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0430:<\/p>\n<pre><code class=\"python\">INFO: 127.0.0.1:52375 - \"GET \/creature HTTP\/1.1\" 200 OK<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432<\/h2>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ul>\n<li>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c;<\/li>\n<li>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c Pydantic;<\/li>\n<li>\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li> \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u0435\u0431-\u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0435\u0433\u043e<br \/>  \u0432 JSON.<\/li>\n<\/ul>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u043e\u043b\u044f\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Creature. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c (Pydantic \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0438 \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u0432\u0435\u0431-\u043a\u043e\u0434\u0443, \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c).<br \/>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.14 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>test1.py.<\/code><br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.14.<\/b> \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 Creature<\/p>\n<pre><code class=\"python\">from model import Creature dragon = Creature(     name=\"dragon\",     description=[\"incorrect\", \"string\", \"list\"],     country=\"*\" ,     area=\"*\",     aka=\"firedrake\")<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 5.15. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043b\u0438 \u043f\u043e\u043b\u044e <code>description<\/code> \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a, \u0430 \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.15.<\/b> \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430<\/p>\n<pre><code class=\"python\">$ python test1.py Traceback (most recent call last):   File \"...\/test1.py\", line 3, in &lt;module>     dragon = Creature(   File \"pydantic\/main.py\", line 342, in     pydantic.main.BaseModel.init     pydantic.error_wrappers.ValidationError:     1 validation error for Creature description str type expected (type=type_error.str)<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h2>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>Creature<\/code>,<br \/>  \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.  <\/p>\n<ul>\n<li>\u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (<code>conint<\/code>) \u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439:<br \/>  <code>gt <\/code>\u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c;<br \/>  <code>lt <\/code>\u2014 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c;<br \/>  <code>ge <\/code>\u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e;<br \/>  <code>le<\/code> \u2014 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e;<br \/>  <code>multiple_of<\/code> \u2014 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<\/li>\n<li> \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 (<code>constr<\/code>) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<br \/>  <code>min_length<\/code> \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 (\u043d\u0435 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445);<br \/>  <code>max_length<\/code> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445;<br \/>  <code>to_upper<\/code> \u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b;<br \/>  <code>to_lower<\/code> \u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b;<br \/>  <code>regex <\/code>\u2014 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c Python.<\/li>\n<li> \u041a\u043e\u0440\u0442\u0435\u0436, \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e:<br \/>  <code>min_items <\/code>\u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432;<br \/>  <code>max_items <\/code>\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p>  \u041e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043c\u043e\u0434\u0435\u043b\u0438.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 5.16 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 name \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u0432\u0443\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#171;&#187; (\u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430) \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.16.<\/b> \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/p>\n<pre><code class=\"python\">>>> from pydantic import BaseModel, constr >>> >>> class Creature(BaseModel): ...     name: constr(min_length=2) ...     country: str ...     area: str ...     description: str ...     aka: str ... >>> bad_creature = Creature(name=\"!\", ... description=\"it's a raccoon\", ... area=\"your attic\") Traceback (most recent call last):   File \"&lt;stdin>\", line 1, in &lt;module>   File \"pydantic\/main.py\", line 342,   in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Creature name   ensure this value has at least 2 characters   (type=value_error.any_str.min_length; limit_value=2)<\/code><\/pre>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e constr \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 <i>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (constrained string)<\/i>.<br \/>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 5.17 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f <code>Field<\/code> \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Pydantic.<br \/>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5.17. <\/b>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u0431\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>Field<\/code><\/p>\n<pre><code class=\"python\"> >>> from pydantic import BaseModel, Field >>> >>> class Creature(BaseModel): ...     name: str = Field(..., min_length=2) ...     country: str ...     area: str ...     description: str ...     aka: str ... >>> bad_creature = Creature(name=\"!\", ...     area=\"your attic\", ...     description=\"it's a raccoon\") Traceback (most recent call last):   File \"&lt;stdin>\", line 1, in &lt;module>   File \"pydantic\/main.py\", line 342,   in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError:   1 validation error for Creature name   ensure this value has at least 2 characters (type=value_error.any_str.min_length; limit_value=2)<\/code><\/pre>\n<p>  \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u2026 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Field<\/code>() \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e.<\/p>\n<p>  \u042d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Pydantic. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0435\u0431-\u0443\u0440\u043e\u0432\u043d\u044f \u0438\u043b\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Pydantic \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 Python \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <i>\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/i> \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431 \u0430\u0432\u0442\u043e\u0440\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>\u0411\u0438\u043b\u043b \u041b\u044e\u0431\u0430\u043d\u043e\u0432\u0438\u0447<\/b> \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u041f\u041e \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 40 \u043b\u0435\u0442, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 Linux, Web \u0438 Python. \u0411\u0438\u043b\u043b \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u043b \u0441\u043e\u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043a\u043d\u0438\u0433\u0438 \u201c\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Linux\u201d \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u201c\u041f\u0440\u043e\u0441\u0442\u043e\u0439 Python\u201d.<\/div>\n<\/p><\/div>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441 \u043a\u043d\u0438\u0433\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/fastapi-veb-razrabotka-na-python\">\u0441\u0430\u0439\u0442\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/a>:<\/p>\n<p>  <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/fastapi-veb-razrabotka-na-python#Oglavlenie-1\">\u00bb \u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a><br \/>  <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/fastapi-veb-razrabotka-na-python#Otryvok-1\">\u00bb \u041e\u0442\u0440\u044b\u0432\u043e\u043a<\/a><\/p>\n<p>  \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u0443\u043c\u0430\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043d\u0438\u0433\u0438 \u043d\u0430 e-mail \u0432\u044b\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430.<br \/>  \u0414\u043b\u044f \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u043a\u0438\u0434\u043a\u0430 25% \u043f\u043e \u043a\u0443\u043f\u043e\u043d\u0443 \u2014 <b>FastAPI<\/b><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/820199\/\"> https:\/\/habr.com\/ru\/articles\/820199\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/820199\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/v_\/dc\/rc\/v_dcrcujqqosuimw7dr4bkikjqa.jpeg\" align=\"left\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/v_\/dc\/rc\/v_dcrcujqqosuimw7dr4bkikjqa.jpeg\" data-blurred=\"true\"\/><\/a> \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438!<\/p>\n<p>  FastAPI \u2014 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u044b\u0439, \u043d\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u0447\u0438\u0441\u0442\u044b\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Python. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, FastAPI \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u0430\u043a Golang. \u042d\u0442\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043d\u0438\u0433\u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 Python, \u043a\u0430\u043a FastAPI \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0411\u0438\u043b\u043b \u041b\u044e\u0431\u0430\u043d\u043e\u0432\u0438\u0447 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c FastAPI \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e \u0442\u0430\u043a\u0438\u043c \u0442\u0435\u043c\u0430\u043c, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u044b, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u0430\u0440\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u0441\u044c \u0441 RESTful API, \u043f\u0440\u0438\u0435\u043c\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438, \u043a\u0430\u043a Flask \u0438 Django, \u0432\u044b \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 FastAPI.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-379806","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/379806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=379806"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/379806\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=379806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=379806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=379806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}