internet.md
1> **Источник:** https://python-all.ru/3.12/library/internet.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Интернет-протоколы и поддержка89Модули, описанные в этой главе, реализуют интернет-протоколы и поддержку сопутствующих технологий. Все они реализованы на Python. Большинству из этих модулей требуется системно-зависимый модуль [`socket`](https://python-all.ru/3.12/library/socket.html#module-socket), который в настоящее время поддерживается на большинстве популярных платформ. Вот краткий обзор:1011- [`webbrowser` – Удобный контроллер веб-браузера](https://python-all.ru/3.12/library/webbrowser.html)1213 - [Объекты управления браузером](https://python-all.ru/3.12/library/webbrowser.html#browser-controller-objects)14- [`wsgiref` – Утилиты WSGI и эталонная реализация](https://python-all.ru/3.12/library/wsgiref.html)1516 - [`wsgiref.util` – Утилиты окружения WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.util)17 - [`wsgiref.headers` – Инструменты для заголовков ответов WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.headers)18 - [`wsgiref.simple_server` – Простой HTTP-сервер WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.simple_server)19 - [`wsgiref.validate` – Проверка соответствия WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.validate)20 - [`wsgiref.handlers` – Базовые классы сервера/шлюза](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.handlers)21 - [`wsgiref.types` – Типы WSGI для статической проверки типов](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.types)22 - [Примеры](https://python-all.ru/3.12/library/wsgiref.html#examples)23- [`urllib` – Модули обработки URL](https://python-all.ru/3.12/library/urllib.html)24- [`urllib.request` – Расширяемая библиотека для открытия URL](https://python-all.ru/3.12/library/urllib.request.html)2526 - [Объекты Request](https://python-all.ru/3.12/library/urllib.request.html#request-objects)27 - [Объекты OpenerDirector](https://python-all.ru/3.12/library/urllib.request.html#openerdirector-objects)28 - [Объекты BaseHandler](https://python-all.ru/3.12/library/urllib.request.html#basehandler-objects)29 - [Объекты HTTPRedirectHandler](https://python-all.ru/3.12/library/urllib.request.html#httpredirecthandler-objects)30 - [Объекты HTTPCookieProcessor](https://python-all.ru/3.12/library/urllib.request.html#httpcookieprocessor-objects)31 - [Объекты ProxyHandler](https://python-all.ru/3.12/library/urllib.request.html#proxyhandler-objects)32 - [Объекты HTTPPasswordMgr](https://python-all.ru/3.12/library/urllib.request.html#httppasswordmgr-objects)33 - [Объекты HTTPPasswordMgrWithPriorAuth](https://python-all.ru/3.12/library/urllib.request.html#httppasswordmgrwithpriorauth-objects)34 - [Объекты AbstractBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#abstractbasicauthhandler-objects)35 - [Объекты HTTPBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#httpbasicauthhandler-objects)36 - [Объекты ProxyBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#proxybasicauthhandler-objects)37 - [Объекты AbstractDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#abstractdigestauthhandler-objects)38 - [Объекты HTTPDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#httpdigestauthhandler-objects)39 - [Объекты ProxyDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#proxydigestauthhandler-objects)40 - [Объекты HTTPHandler](https://python-all.ru/3.12/library/urllib.request.html#httphandler-objects)41 - [Объекты HTTPSHandler](https://python-all.ru/3.12/library/urllib.request.html#httpshandler-objects)42 - [Объекты FileHandler](https://python-all.ru/3.12/library/urllib.request.html#filehandler-objects)43 - [Объекты DataHandler](https://python-all.ru/3.12/library/urllib.request.html#datahandler-objects)44 - [Объекты FTPHandler](https://python-all.ru/3.12/library/urllib.request.html#ftphandler-objects)45 - [Объекты CacheFTPHandler](https://python-all.ru/3.12/library/urllib.request.html#cacheftphandler-objects)46 - [Объекты UnknownHandler](https://python-all.ru/3.12/library/urllib.request.html#unknownhandler-objects)47 - [Объекты HTTPErrorProcessor](https://python-all.ru/3.12/library/urllib.request.html#httperrorprocessor-objects)48 - [Примеры](https://python-all.ru/3.12/library/urllib.request.html#examples)49 - [Устаревший интерфейс](https://python-all.ru/3.12/library/urllib.request.html#legacy-interface)50 - [`urllib.request` Ограничения](https://python-all.ru/3.12/library/urllib.request.html#urllib-request-restrictions)51- [`urllib.response` – Классы ответов, используемые urllib](https://python-all.ru/3.12/library/urllib.request.html#module-urllib.response)52- [`urllib.parse` – Разбор URL на компоненты](https://python-all.ru/3.12/library/urllib.parse.html)5354 - [Разбор URL](https://python-all.ru/3.12/library/urllib.parse.html#url-parsing)55 - [Безопасность разбора URL](https://python-all.ru/3.12/library/urllib.parse.html#url-parsing-security)56 - [Разбор ASCII-закодированных байтов](https://python-all.ru/3.12/library/urllib.parse.html#parsing-ascii-encoded-bytes)57 - [Структурированные результаты разбора](https://python-all.ru/3.12/library/urllib.parse.html#structured-parse-results)58 - [Экранирование URL](https://python-all.ru/3.12/library/urllib.parse.html#url-quoting)59- [`urllib.error` – Классы исключений, вызываемые urllib.request](https://python-all.ru/3.12/library/urllib.error.html)60- [`urllib.robotparser` – Парсер для robots.txt](https://python-all.ru/3.12/library/urllib.robotparser.html)61- [`http` – Модули HTTP](https://python-all.ru/3.12/library/http.html)6263 - [Коды состояния HTTP](https://python-all.ru/3.12/library/http.html#http-status-codes)64 - [Категория состояния HTTP](https://python-all.ru/3.12/library/http.html#http-status-category)65 - [Методы HTTP](https://python-all.ru/3.12/library/http.html#http-methods)66- [`http.client` – Клиент протокола HTTP](https://python-all.ru/3.12/library/http.client.html)6768 - [Объекты HTTPConnection](https://python-all.ru/3.12/library/http.client.html#httpconnection-objects)69 - [Объекты HTTPResponse](https://python-all.ru/3.12/library/http.client.html#httpresponse-objects)70 - [Примеры](https://python-all.ru/3.12/library/http.client.html#examples)71 - [Объекты HTTPMessage](https://python-all.ru/3.12/library/http.client.html#httpmessage-objects)72- [`ftplib` – клиент протокола FTP](https://python-all.ru/3.12/library/ftplib.html)7374 - [Справочник](https://python-all.ru/3.12/library/ftplib.html#reference)7576 - [Объекты FTP](https://python-all.ru/3.12/library/ftplib.html#ftp-objects)77 - [Объекты FTP\_TLS](https://python-all.ru/3.12/library/ftplib.html#ftp-tls-objects)78 - [Переменные модуля](https://python-all.ru/3.12/library/ftplib.html#module-variables)79- [`poplib` – клиент протокола POP3](https://python-all.ru/3.12/library/poplib.html)8081 - [Объекты POP3](https://python-all.ru/3.12/library/poplib.html#pop3-objects)82 - [Пример POP3](https://python-all.ru/3.12/library/poplib.html#pop3-example)83- [`imaplib` – клиент протокола IMAP4](https://python-all.ru/3.12/library/imaplib.html)8485 - [Объекты IMAP4](https://python-all.ru/3.12/library/imaplib.html#imap4-objects)86 - [Пример IMAP4](https://python-all.ru/3.12/library/imaplib.html#imap4-example)87- [`smtplib` – клиент протокола SMTP](https://python-all.ru/3.12/library/smtplib.html)8889 - [Объекты SMTP](https://python-all.ru/3.12/library/smtplib.html#smtp-objects)90 - [Пример SMTP](https://python-all.ru/3.12/library/smtplib.html#smtp-example)91- [`uuid` – объекты UUID в соответствии с **RFC 4122**](https://python-all.ru/3.12/library/uuid.html)9293 - [Использование командной строки](https://python-all.ru/3.12/library/uuid.html#command-line-usage)94 - [Пример](https://python-all.ru/3.12/library/uuid.html#example)95 - [Пример командной строки](https://python-all.ru/3.12/library/uuid.html#command-line-example)96- [`socketserver` – фреймворк для сетевых серверов](https://python-all.ru/3.12/library/socketserver.html)9798 - [Замечания по созданию сервера](https://python-all.ru/3.12/library/socketserver.html#server-creation-notes)99 - [Объекты сервера](https://python-all.ru/3.12/library/socketserver.html#server-objects)100 - [Объекты обработчиков запросов](https://python-all.ru/3.12/library/socketserver.html#request-handler-objects)101 - [Примеры](https://python-all.ru/3.12/library/socketserver.html#examples)102103 - [`socketserver.TCPServer` Пример](https://python-all.ru/3.12/library/socketserver.html#socketserver-tcpserver-example)104 - [`socketserver.UDPServer` Пример](https://python-all.ru/3.12/library/socketserver.html#socketserver-udpserver-example)105 - [Асинхронные примеси](https://python-all.ru/3.12/library/socketserver.html#asynchronous-mixins)106- [`http.server` – HTTP-серверы](https://python-all.ru/3.12/library/http.server.html)107108 - [Интерфейс командной строки](https://python-all.ru/3.12/library/http.server.html#command-line-interface)109 - [Вопросы безопасности](https://python-all.ru/3.12/library/http.server.html#security-considerations)110- [`http.cookies` – управление состоянием HTTP](https://python-all.ru/3.12/library/http.cookies.html)111112 - [Объекты Cookie](https://python-all.ru/3.12/library/http.cookies.html#cookie-objects)113 - [Объекты Morsel](https://python-all.ru/3.12/library/http.cookies.html#morsel-objects)114 - [Пример](https://python-all.ru/3.12/library/http.cookies.html#example)115- [`http.cookiejar` – Обработка cookie для HTTP-клиентов](https://python-all.ru/3.12/library/http.cookiejar.html)116117 - [Объекты CookieJar и FileCookieJar](https://python-all.ru/3.12/library/http.cookiejar.html#cookiejar-and-filecookiejar-objects)118 - [Подклассы FileCookieJar и взаимодействие с веб-браузерами](https://python-all.ru/3.12/library/http.cookiejar.html#filecookiejar-subclasses-and-co-operation-with-web-browsers)119 - [Объекты CookiePolicy](https://python-all.ru/3.12/library/http.cookiejar.html#cookiepolicy-objects)120 - [Объекты DefaultCookiePolicy](https://python-all.ru/3.12/library/http.cookiejar.html#defaultcookiepolicy-objects)121 - [Объекты Cookie](https://python-all.ru/3.12/library/http.cookiejar.html#cookie-objects)122 - [Примеры](https://python-all.ru/3.12/library/http.cookiejar.html#examples)123- [`xmlrpc` – Модули сервера и клиента XML-RPC](https://python-all.ru/3.12/library/xmlrpc.html)124- [`xmlrpc.client` – Доступ клиента XML-RPC](https://python-all.ru/3.12/library/xmlrpc.client.html)125126 - [Объекты ServerProxy](https://python-all.ru/3.12/library/xmlrpc.client.html#serverproxy-objects)127 - [Объекты datetime](https://python-all.ru/3.12/library/xmlrpc.client.html#datetime-objects)128 - [Объекты Binary](https://python-all.ru/3.12/library/xmlrpc.client.html#binary-objects)129 - [Объекты Fault](https://python-all.ru/3.12/library/xmlrpc.client.html#fault-objects)130 - [Объекты ProtocolError](https://python-all.ru/3.12/library/xmlrpc.client.html#protocolerror-objects)131 - [Объекты MultiCall](https://python-all.ru/3.12/library/xmlrpc.client.html#multicall-objects)132 - [Удобные функции](https://python-all.ru/3.12/library/xmlrpc.client.html#convenience-functions)133 - [Пример использования клиента](https://python-all.ru/3.12/library/xmlrpc.client.html#example-of-client-usage)134 - [Пример использования клиента и сервера](https://python-all.ru/3.12/library/xmlrpc.client.html#example-of-client-and-server-usage)135- [`xmlrpc.server` – Базовые серверы XML-RPC](https://python-all.ru/3.12/library/xmlrpc.server.html)136137 - [Объекты SimpleXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#simplexmlrpcserver-objects)138139 - [Пример SimpleXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#simplexmlrpcserver-example)140 - [CGIXMLRPCRequestHandler](https://python-all.ru/3.12/library/xmlrpc.server.html#cgixmlrpcrequesthandler)141 - [Документирование сервера XML-RPC](https://python-all.ru/3.12/library/xmlrpc.server.html#documenting-xmlrpc-server)142 - [Объекты DocXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#docxmlrpcserver-objects)143 - [DocCGIXMLRPCRequestHandler](https://python-all.ru/3.12/library/xmlrpc.server.html#doccgixmlrpcrequesthandler)144- [`ipaddress` – Библиотека для работы с IPv4/IPv6](https://python-all.ru/3.12/library/ipaddress.html)145146 - [Удобные фабричные функции](https://python-all.ru/3.12/library/ipaddress.html#convenience-factory-functions)147 - [IP-адреса](https://python-all.ru/3.12/library/ipaddress.html#ip-addresses)148149 - [Объекты адресов](https://python-all.ru/3.12/library/ipaddress.html#address-objects)150 - [Преобразование в строки и целые числа](https://python-all.ru/3.12/library/ipaddress.html#conversion-to-strings-and-integers)151 - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#operators)152153 - [Операторы сравнения](https://python-all.ru/3.12/library/ipaddress.html#comparison-operators)154 - [Арифметические операторы](https://python-all.ru/3.12/library/ipaddress.html#arithmetic-operators)155 - [Определения IP-сетей](https://python-all.ru/3.12/library/ipaddress.html#ip-network-definitions)156157 - [Префикс, маска сети и маска узла](https://python-all.ru/3.12/library/ipaddress.html#prefix-net-mask-and-host-mask)158 - [Объекты сетей](https://python-all.ru/3.12/library/ipaddress.html#network-objects)159 - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#id1)160161 - [Логические операторы](https://python-all.ru/3.12/library/ipaddress.html#logical-operators)162 - [Итерация](https://python-all.ru/3.12/library/ipaddress.html#iteration)163 - [Сети как контейнеры адресов](https://python-all.ru/3.12/library/ipaddress.html#networks-as-containers-of-addresses)164 - [Объекты интерфейсов](https://python-all.ru/3.12/library/ipaddress.html#interface-objects)165166 - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#id2)167168 - [Логические операторы](https://python-all.ru/3.12/library/ipaddress.html#id3)169 - [Прочие функции уровня модуля](https://python-all.ru/3.12/library/ipaddress.html#other-module-level-functions)170 - [Пользовательские исключения](https://python-all.ru/3.12/library/ipaddress.html#custom-exceptions)171