{"id":482496,"date":"2026-06-05T09:22:23","date_gmt":"2026-06-05T09:22:23","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=482496"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=482496","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0437\u0435\u0440\u043a\u0430\u043b\u043e PyPI \u043d\u0430 nginx \u0437\u0430 \u0432\u0435\u0447\u0435\u0440 (\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a pypi.org)"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u043e<\/h3>\n<p>\u0412\u0447\u0435\u0440\u0430 <a href=\"http:\/\/pypi.org\" rel=\"noopener noreferrer nofollow\">pypi.org<\/a> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0431\u044b\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439. \u0414\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u044d\u0442\u043e \u00ab\u043f\u043e\u0434\u043e\u0436\u0434\u0451\u043c\u00bb, \u0430 \u0434\u043b\u044f CI\/CD, \u043f\u0440\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f \u2014 \u044d\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u0448\u0438\u0439 pip install \u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f: <a href=\"http:\/\/pypi.org\" rel=\"noopener noreferrer nofollow\">pypi.org<\/a> \u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <a href=\"http:\/\/files.pythonhosted.org\" rel=\"noopener noreferrer nofollow\">files.pythonhosted.org<\/a> \u0436\u0438\u0432\u0443\u0442 \u043d\u0430 CDN Fastly, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u0441\u044f. \u0412\u0447\u0435\u0440\u0430\u0448\u043d\u044f\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435 \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0435\u0440\u043a\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c PyPI (\u044d\u0442\u043e \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u044b \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f). \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0440\u0435\u0432\u0435\u0440\u0441-\u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0430 nginx. \u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u0441 \u043d\u0443\u043b\u044f \u2014 \u0441 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f pip.<\/p>\n<p>\u041d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u0438? \u0415\u0441\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u043e \u2014 <a href=\"http:\/\/depkit.ru\" rel=\"noopener noreferrer nofollow\">pypi.depkit.ru<\/a>. \u041e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u043a\u0435\u0448\u0430 \u043f\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 index-url (\u043a\u0430\u043a \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438) \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0451.<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e<\/h3>\n<p>pip \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PyPI \u0432 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0451\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \/simple\/&lt;\u043f\u0430\u043a\u0435\u0442&gt;\/ \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u044b (wheels \u0438 sdists) \u2014 \u043e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 <a href=\"http:\/\/files.pythonhosted.org\" rel=\"noopener noreferrer nofollow\">files.pythonhosted.org<\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0434\u0435\u044f \u0437\u0435\u0440\u043a\u0430\u043b\u0430: \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 <a href=\"http:\/\/pypi.org\" rel=\"noopener noreferrer nofollow\">pypi.org<\/a>, \u043d\u043e \u043d\u0430 \u043b\u0435\u0442\u0443 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 HTML \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0432\u0435\u043b\u0438 \u043d\u0430 \u043d\u0430\u0448 \u0434\u043e\u043c\u0435\u043d. \u0422\u043e\u0433\u0434\u0430 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441, \u0438 \u0444\u0430\u0439\u043b\u044b pip \u0442\u044f\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f (\u0438 \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f) \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 nginx sub_filter \u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0432 \u0442\u0435\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<h4>\u0428\u0430\u0433 1. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/h4>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043e\u0434\u0438\u043d server-\u0431\u043b\u043e\u043a \u0441 \u0434\u0432\u0443\u043c\u044f location:<\/p>\n<pre><code>  server {      listen 443 ssl;      server_name pypi.example.com;     # \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d      # ssl_certificate     \/etc\/letsencrypt\/live\/pypi.example.com\/fullchain.pem;      # ssl_certificate_key \/etc\/letsencrypt\/live\/pypi.example.com\/privkey.pem;      # --- \u0438\u043d\u0434\u0435\u043a\u0441 \/simple\/: \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c pypi.org \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b ---      location \/simple\/ {          proxy_pass https:\/\/pypi.org;          proxy_set_header Host pypi.org;          proxy_ssl_server_name on;          # \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0436\u0430\u0442\u0438\u0435 \u043e\u0442 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0430 \u2014 \u0438\u043d\u0430\u0447\u0435 sub_filter \u043d\u0435\u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c          proxy_set_header Accept-Encoding \"\";          sub_filter_types text\/html;          sub_filter \"https:\/\/files.pythonhosted.org\/\" \"https:\/\/pypi.example.com\/files\/\";          sub_filter_once off;          # \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0412\u0421\u0415 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435      }      # --- \u0441\u0430\u043c\u0438 wheels\/sdists: \u0447\u0438\u0441\u0442\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438\u043f\u0430\u0441\u0441 \u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 ---      location \/files\/ {          rewrite ^\/files\/(.*)$ \/$1 break;          proxy_pass https:\/\/files.pythonhosted.org;          proxy_set_header Host files.pythonhosted.org;          proxy_ssl_server_name on;      }  }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430:<\/p>\n<ul>\n<li>\n<p>pip \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \/simple\/&lt;\u043f\u0430\u043a\u0435\u0442&gt;\/ \u2192 nginx \u043e\u0442\u0434\u0430\u0451\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 <a href=\"http:\/\/pypi.org\" rel=\"noopener noreferrer nofollow\">pypi.org<\/a>;<\/p>\n<\/li>\n<li>\n<p>sub_filter \u043c\u0435\u043d\u044f\u0435\u0442 \u0432 \u043d\u0435\u0439 \u0432\u0441\u0435 <a href=\"https:\/\/files.pythonhosted.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/files.pythonhosted.org\/<\/a> \u043d\u0430 <a href=\"https:\/\/pypi.example.com\/files\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pypi.example.com\/files\/<\/a><a href=\"https:\/\/pypi.example.com\/files\/;\" rel=\"noopener noreferrer nofollow\">;<\/a><\/p>\n<\/li>\n<li>\n<p>pip \u0438\u0434\u0451\u0442 \u0437\u0430 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0443\u0436\u0435 \u043d\u0430 \u043d\u0430\u0448 \/files\/;<\/p>\n<\/li>\n<li>\n<p>location \/files\/ \u0441\u0440\u0435\u0437\u0430\u0435\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \/files \u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 <a href=\"http:\/\/files.pythonhosted.org\" rel=\"noopener noreferrer nofollow\">files.pythonhosted.org<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0439 server_name \u0432 \u043e\u0431\u043e\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 (\u0432 server_name \u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 sub_filter) \u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u2014 pip \u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e HTTPS.<\/p>\n<h4>\u0428\u0430\u0433 2. \u0413\u0440\u0430\u0431\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u044f\u0442 \u043f\u0430\u0440\u044b \u0447\u0430\u0441\u043e\u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/h4>\n<ul>\n<li>\n<p>Accept-Encoding \u201c\u201d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d. sub_filter \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u0441\u0436\u0430\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0411\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f Accept-Encoding \u0430\u043f\u0441\u0442\u0440\u0438\u043c \u0432\u0435\u0440\u043d\u0451\u0442 gzip, \u0438 \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u043b\u0447\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042d\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u21161 \u0443 \u0442\u0435\u0445, \u00ab\u0443 \u043a\u043e\u0433\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00bb.<\/p>\n<\/li>\n<li>\n<p>sub_filter_once off. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u2014 \u043d\u0443\u0436\u043d\u043e off.<\/p>\n<\/li>\n<li>\n<p>proxy_ssl_server_name on. \u041e\u0431\u0430 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0430 \u0437\u0430 TLS \u0441 SNI; \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<\/p>\n<\/li>\n<li>\n<p>rewrite ^\/files\/(.*)$ \/$1 break;. \u041f\u0440\u0435\u0444\u0438\u043a\u0441 \/files \u2014 \u043d\u0430\u0448, \u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0435\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0435\u0437\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0428\u0430\u0433 3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0435\u0440\u043a\u0430\u043b\u0430 \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435 \u0434\u0451\u0440\u0433\u0430\u043b\u0438\u0441\u044c \u0441 Fastly \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0430 \u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0434\u0438\u0441\u043a\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c proxy_cache \u0434\u043b\u044f \/files\/.<\/p>\n<p>\u0412 http {}:<\/p>\n<pre><code>  proxy_cache_path \/var\/cache\/nginx\/pypi      levels=1:2      keys_zone=pypi_files:100m      max_size=200g            # \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u0430 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0435\u0448 \u043f\u0430\u043a\u0435\u0442\u043e\u0432      inactive=90d      use_temp_path=off;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0432 location \/files\/:<\/p>\n<pre><code>  location \/files\/ {      rewrite ^\/files\/(.*)$ \/$1 break;      proxy_pass https:\/\/files.pythonhosted.org;      proxy_set_header Host files.pythonhosted.org;      proxy_ssl_server_name on;      proxy_cache pypi_files;      proxy_cache_valid 200 90d;       # \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b PyPI \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b \u2014 \u043c\u043e\u0436\u043d\u043e \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u043e\u043b\u0433\u043e      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;      proxy_cache_lock on;      add_header X-Cache-Status $upstream_cache_status;   # HIT\/MISS \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438  }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u044b \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 PyPI \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b (\u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f = \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u043a\u0435\u0448\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442 \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f \u0443\u0436\u0435 \u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u2014 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a Fastly. \u0418\u043d\u0434\u0435\u043a\u0441 \/simple\/ \u043b\u0443\u0447\u0448\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e (\u043c\u0438\u043d\u0443\u0442\u044b) \u0438\u043b\u0438 \u043d\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0431\u0435\u0437 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438.<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/h3>\n<p>\u0420\u0430\u0437\u043e\u0432\u043e:<\/p>\n<pre><code>pip install --index-url https:\/\/pypi.example.com\/simple\/ <\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u2014 \u0432 ~\/.config\/pip\/pip.conf (\u0438\u043b\u0438 pip.ini \u043d\u0430 Windows):<\/p>\n<pre><code>[global] index-url = https:\/\/pypi.example.com\/simple\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code>export PIP_INDEX_URL=https:\/\/pypi.example.com\/simple\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>uv:<\/p>\n<pre><code>UV_INDEX_URL=https:\/\/pypi.example.com\/simple\/ uv pip install <\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>Poetry (pyproject.toml):<\/p>\n<pre><code>[[tool.poetry.source]] name = \u201cmirror\u201d url = \u201chttps:\/\/pypi.example.com\/simple\/\u201d priority = \u201cprimary\u201d<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h3>\n<pre><code>  # \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 pythonhosted \u2014 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u044b  curl -s https:\/\/pypi.example.com\/simple\/flask\/ | grep -c files.pythonhosted.org   # 0  # \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0435\u0440\u043a\u0430\u043b\u043e  pip download --no-deps --index-url https:\/\/pypi.example.com\/simple\/ click==8.1.7  # \u043a\u0435\u0448 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0432\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0430\u0442\u044c X-Cache-Status: HIT  curl -sI https:\/\/pypi.example.com\/files\/&lt;\u043f\u0443\u0442\u044c-\u043a-\u0444\u0430\u0439\u043b\u0443&gt; | grep X-Cache-Status<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 pip \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442 \u043f\u0430\u043a\u0435\u0442 \u0438 \u0442\u044f\u043d\u0435\u0442 wheel \u0447\u0435\u0440\u0435\u0437 \u0432\u0430\u0448 \/files\/ \u2014 \u0432\u0441\u0451 \u0441\u043e\u0431\u0440\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u2014 \u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u043e \u2014 <a href=\"http:\/\/pypi.depkit.ru\" rel=\"noopener noreferrer nofollow\">pypi.depkit.ru<\/a>. \u041e\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u044b \u2014 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 Fastly;<\/p>\n<\/li>\n<li>\n<p>\u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u043a\u0435\u0448\u0430 \u043f\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 wheels \u043e\u0442\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 index-url.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2014 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0447\u0442\u043e \u0432\u044b\u0448\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043c\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<pre><code>  pip install --index-url https:\/\/pypi.depkit.ru\/simple\/ &lt;package&gt;  # ~\/.config\/pip\/pip.conf  [global]  index-url = https:\/\/pypi.depkit.ru\/simple\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>\u0421\u0432\u043e\u0451 \u0437\u0435\u0440\u043a\u0430\u043b\u043e PyPI \u2014 \u044d\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>\u043e\u0434\u0438\u043d server-\u0431\u043b\u043e\u043a nginx \u0438\u0437 \u0434\u0432\u0443\u0445 location \u043f\u043b\u044e\u0441 proxy_cache;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442: \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0444\u0430\u0439\u043b\u044b \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e CDN \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u043d\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u0432\u0435\u0447\u0435\u0440, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u043a\u043e\u0433\u0434\u0430 \u2014 <a href=\"http:\/\/depkit.ru\" rel=\"noopener noreferrer nofollow\">pypi.depkit.ru<\/a> \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u0435\u0448\u0435\u043c \u0438 \u0431\u044b\u0441\u0442\u0440\u043e. \u0412\u0447\u0435\u0440\u0430\u0448\u043d\u044f\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430: \u0442\u0430\u043a\u043e\u0439 \u0440\u0438\u0441\u043a \u0434\u0435\u0448\u0435\u0432\u043b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0447\u0435\u043c \u0447\u0438\u043d\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u0432\u0430\u0440\u0438\u0438.<\/p>\n<\/div>\n<p>\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\/1043976\/\">https:\/\/habr.com\/ru\/articles\/1043976\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u043e\u0412\u0447\u0435\u0440\u0430 pypi.org \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0431\u044b\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439. \u0414\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u044d\u0442\u043e \u00ab\u043f\u043e\u0434\u043e\u0436\u0434\u0451\u043c\u00bb, \u0430 \u0434\u043b\u044f CI\/CD, \u043f\u0440\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f \u2014 \u044d\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u0448\u0438\u0439 pip install \u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438.\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f: pypi.org \u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 files.pythonhosted.org \u0436\u0438\u0432\u0443\u0442 \u043d\u0430 CDN Fastly, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u0441\u044f. \u0412\u0447\u0435\u0440\u0430\u0448\u043d\u044f\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435 \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f.\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0435\u0440\u043a\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c PyPI (\u044d\u0442\u043e \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u044b \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f). \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0440\u0435\u0432\u0435\u0440\u0441-\u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0430 nginx. \u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u0441 \u043d\u0443\u043b\u044f \u2014 \u0441 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f pip.\u041d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u0438? \u0415\u0441\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u043e \u2014 pypi.depkit.ru. \u041e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u043a\u0435\u0448\u0430 \u043f\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 index-url (\u043a\u0430\u043a \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438) \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0451.\u041a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043epip \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PyPI \u0432 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430:\u0411\u0435\u0440\u0451\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \/simple\/&lt;\u043f\u0430\u043a\u0435\u0442&gt;\/ \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043d\u0438\u0445.\u041f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u044b (wheels \u0438 sdists) \u2014 \u043e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 files.pythonhosted.org.\u0418\u0434\u0435\u044f \u0437\u0435\u0440\u043a\u0430\u043b\u0430: \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 pypi.org, \u043d\u043e \u043d\u0430 \u043b\u0435\u0442\u0443 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 HTML \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0432\u0435\u043b\u0438 \u043d\u0430 \u043d\u0430\u0448 \u0434\u043e\u043c\u0435\u043d. \u0422\u043e\u0433\u0434\u0430 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441, \u0438 \u0444\u0430\u0439\u043b\u044b pip \u0442\u044f\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f (\u0438 \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f) \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443.\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 nginx sub_filter \u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0432 \u0442\u0435\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.\u0428\u0430\u0433 1. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043e\u0434\u0438\u043d server-\u0431\u043b\u043e\u043a \u0441 \u0434\u0432\u0443\u043c\u044f location:  server {      listen 443 ssl;      server_name pypi.example.com;     # \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d      # ssl_certificate     \/etc\/letsencrypt\/live\/pypi.example.com\/fullchain.pem;      # ssl_certificate_key \/etc\/letsencrypt\/live\/pypi.example.com\/privkey.pem;      # &#8212; \u0438\u043d\u0434\u0435\u043a\u0441 \/simple\/: \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c pypi.org \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b &#8212;      location \/simple\/ {          proxy_pass https:\/\/pypi.org;          proxy_set_header Host pypi.org;          proxy_ssl_server_name on;          # \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0436\u0430\u0442\u0438\u0435 \u043e\u0442 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0430 \u2014 \u0438\u043d\u0430\u0447\u0435 sub_filter \u043d\u0435\u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c          proxy_set_header Accept-Encoding &#171;&#187;;          sub_filter_types text\/html;          sub_filter &#171;https:\/\/files.pythonhosted.org\/&#187; &#171;https:\/\/pypi.example.com\/files\/&#187;;          sub_filter_once off;          # \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0412\u0421\u0415 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435      }      # &#8212; \u0441\u0430\u043c\u0438 wheels\/sdists: \u0447\u0438\u0441\u0442\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438\u043f\u0430\u0441\u0441 \u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 &#8212;      location \/files\/ {          rewrite ^\/files\/(.*)$ \/$1 break;          proxy_pass https:\/\/files.pythonhosted.org;          proxy_set_header Host files.pythonhosted.org;          proxy_ssl_server_name on;      }  }\u041b\u043e\u0433\u0438\u043a\u0430:pip \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \/simple\/&lt;\u043f\u0430\u043a\u0435\u0442&gt;\/ \u2192 nginx \u043e\u0442\u0434\u0430\u0451\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 pypi.org;sub_filter \u043c\u0435\u043d\u044f\u0435\u0442 \u0432 \u043d\u0435\u0439 \u0432\u0441\u0435 https:\/\/files.pythonhosted.org\/ \u043d\u0430 https:\/\/pypi.example.com\/files\/;pip \u0438\u0434\u0451\u0442 \u0437\u0430 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0443\u0436\u0435 \u043d\u0430 \u043d\u0430\u0448 \/files\/;location \/files\/ \u0441\u0440\u0435\u0437\u0430\u0435\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \/files \u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 files.pythonhosted.org.\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0439 server_name \u0432 \u043e\u0431\u043e\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 (\u0432 server_name \u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 sub_filter) \u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u2014 pip \u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e HTTPS.\u0428\u0430\u0433 2. \u0413\u0440\u0430\u0431\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u044f\u0442 \u043f\u0430\u0440\u044b \u0447\u0430\u0441\u043e\u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0438Accept-Encoding \u201c\u201d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d. sub_filter \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u0441\u0436\u0430\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0411\u0435\u0437 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f Accept-Encoding \u0430\u043f\u0441\u0442\u0440\u0438\u043c \u0432\u0435\u0440\u043d\u0451\u0442 gzip, \u0438 \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u043b\u0447\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042d\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u21161 \u0443 \u0442\u0435\u0445, \u00ab\u0443 \u043a\u043e\u0433\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00bb.sub_filter_once off. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u2014 \u043d\u0443\u0436\u043d\u043e off.proxy_ssl_server_name on. \u041e\u0431\u0430 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0430 \u0437\u0430 TLS \u0441 SNI; \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.rewrite ^\/files\/(.*)$ \/$1 break;. \u041f\u0440\u0435\u0444\u0438\u043a\u0441 \/files \u2014 \u043d\u0430\u0448, \u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0435\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0435\u0437\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.\u0428\u0430\u0433 3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0435\u0440\u043a\u0430\u043b\u0430 \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435 \u0434\u0451\u0440\u0433\u0430\u043b\u0438\u0441\u044c \u0441 Fastly \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0430 \u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0434\u0438\u0441\u043a\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c proxy_cache \u0434\u043b\u044f \/files\/.\u0412 http {}:  proxy_cache_path \/var\/cache\/nginx\/pypi      levels=1:2      keys_zone=pypi_files:100m      max_size=200g            # \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u0430 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0435\u0448 \u043f\u0430\u043a\u0435\u0442\u043e\u0432      inactive=90d      use_temp_path=off;\u0418 \u0432 location \/files\/:  location \/files\/ {      rewrite ^\/files\/(.*)$ \/$1 break;      proxy_pass https:\/\/files.pythonhosted.org;      proxy_set_header Host files.pythonhosted.org;      proxy_ssl_server_name on;      proxy_cache pypi_files;      proxy_cache_valid 200 90d;       # \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b PyPI \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b \u2014 \u043c\u043e\u0436\u043d\u043e \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u043e\u043b\u0433\u043e      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;      proxy_cache_lock on;      add_header X-Cache-Status $upstream_cache_status;   # HIT\/MISS \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438  }\u0424\u0430\u0439\u043b\u044b \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 PyPI \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b (\u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f = \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u043a\u0435\u0448\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442 \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f \u0443\u0436\u0435 \u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u2014 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a Fastly. \u0418\u043d\u0434\u0435\u043a\u0441 \/simple\/ \u043b\u0443\u0447\u0448\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e (\u043c\u0438\u043d\u0443\u0442\u044b) \u0438\u043b\u0438 \u043d\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0431\u0435\u0437 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438.\u041a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u0420\u0430\u0437\u043e\u0432\u043e:pip install &#8212;index-url https:\/\/pypi.example.com\/simple\/ \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u2014 \u0432 ~\/.config\/pip\/pip.conf (\u0438\u043b\u0438 pip.ini \u043d\u0430 Windows):[global] index-url = https:\/\/pypi.example.com\/simple\/\u0418\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:export PIP_INDEX_URL=https:\/\/pypi.example.com\/simple\/uv:UV_INDEX_URL=https:\/\/pypi.example.com\/simple\/ uv pip install Poetry (pyproject.toml):[[tool.poetry.source]] name = \u201cmirror\u201d url = \u201chttps:\/\/pypi.example.com\/simple\/\u201d priority = \u201cprimary\u201d\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430  # \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 pythonhosted \u2014 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u044b  curl -s https:\/\/pypi.example.com\/simple\/flask\/ | grep -c files.pythonhosted.org   # 0  # \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0435\u0440\u043a\u0430\u043b\u043e  pip download &#8212;no-deps &#8212;index-url https:\/\/pypi.example.com\/simple\/ click==8.1.7  # \u043a\u0435\u0448 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0432\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0430\u0442\u044c X-Cache-Status: HIT  curl -sI https:\/\/pypi.example.com\/files\/&lt;\u043f\u0443\u0442\u044c-\u043a-\u0444\u0430\u0439\u043b\u0443&gt; | grep X-Cache-Status\u0415\u0441\u043b\u0438 pip \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442 \u043f\u0430\u043a\u0435\u0442 \u0438 \u0442\u044f\u043d\u0435\u0442 wheel \u0447\u0435\u0440\u0435\u0437 \u0432\u0430\u0448 \/files\/ \u2014 \u0432\u0441\u0451 \u0441\u043e\u0431\u0440\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.\u041d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u2014 \u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u043e \u2014 pypi.depkit.ru. \u041e\u043d\u043e:\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u044b \u2014 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 Fastly;\u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u043a\u0435\u0448\u0430 \u043f\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 wheels \u043e\u0442\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e;\u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 index-url.\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2014 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0447\u0442\u043e \u0432\u044b\u0448\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043c\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439:  pip install &#8212;index-url https:\/\/pypi.depkit.ru\/simple\/ &lt;package&gt;  # ~\/.config\/pip\/pip.conf  [global]  index-url = https:\/\/pypi.depkit.ru\/simple\/\u0418\u0442\u043e\u0433\u0421\u0432\u043e\u0451 \u0437\u0435\u0440\u043a\u0430\u043b\u043e PyPI \u2014 \u044d\u0442\u043e:\u043e\u0434\u0438\u043d server-\u0431\u043b\u043e\u043a nginx \u0438\u0437 \u0434\u0432\u0443\u0445 location \u043f\u043b\u044e\u0441 proxy_cache;\u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442: \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0444\u0430\u0439\u043b\u044b \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443;\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e CDN \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.\u041f\u043e\u0434\u043d\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u0432\u0435\u0447\u0435\u0440, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u043a\u043e\u0433\u0434\u0430 \u2014 pypi.depkit.ru \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 IP, \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u0435\u0448\u0435\u043c \u0438 \u0431\u044b\u0441\u0442\u0440\u043e. \u0412\u0447\u0435\u0440\u0430\u0448\u043d\u044f\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430: \u0442\u0430\u043a\u043e\u0439 \u0440\u0438\u0441\u043a \u0434\u0435\u0448\u0435\u0432\u043b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0447\u0435\u043c \u0447\u0438\u043d\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u0432\u0430\u0440\u0438\u0438.\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1043976\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-482496","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482496","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=482496"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482496\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=482496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=482496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=482496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}