Документация Python неофициальный перевод

internet.md

162 строк · 15.5 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.10/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.10/library/socket.html#module-socket), который в настоящее время поддерживается на большинстве популярных платформ. Ниже приведён обзор:1011- [`webbrowser` – Удобный контроллер веб-браузера](https://python-all.ru/3.10/library/webbrowser.html)1213  - [Объекты управления браузером](https://python-all.ru/3.10/library/webbrowser.html#browser-controller-objects)14- [`wsgiref` – Утилиты WSGI и эталонная реализация](https://python-all.ru/3.10/library/wsgiref.html)1516  - [`wsgiref.util` – Утилиты окружения WSGI](https://python-all.ru/3.10/library/wsgiref.html#module-wsgiref.util)17  - [`wsgiref.headers` – Инструменты для заголовков ответов WSGI](https://python-all.ru/3.10/library/wsgiref.html#module-wsgiref.headers)18  - [`wsgiref.simple_server` – Простой HTTP-сервер WSGI](https://python-all.ru/3.10/library/wsgiref.html#module-wsgiref.simple_server)19  - [`wsgiref.validate` – Проверка соответствия WSGI](https://python-all.ru/3.10/library/wsgiref.html#module-wsgiref.validate)20  - [`wsgiref.handlers` – Базовые классы сервера/шлюза](https://python-all.ru/3.10/library/wsgiref.html#module-wsgiref.handlers)21  - [Примеры](https://python-all.ru/3.10/library/wsgiref.html#examples)22- [`urllib` – Модули обработки URL](https://python-all.ru/3.10/library/urllib.html)23- [`urllib.request` – Расширяемая библиотека для открытия URL](https://python-all.ru/3.10/library/urllib.request.html)2425  - [Объекты Request](https://python-all.ru/3.10/library/urllib.request.html#request-objects)26  - [Объекты OpenerDirector](https://python-all.ru/3.10/library/urllib.request.html#openerdirector-objects)27  - [Объекты BaseHandler](https://python-all.ru/3.10/library/urllib.request.html#basehandler-objects)28  - [Объекты HTTPRedirectHandler](https://python-all.ru/3.10/library/urllib.request.html#httpredirecthandler-objects)29  - [Объекты HTTPCookieProcessor](https://python-all.ru/3.10/library/urllib.request.html#httpcookieprocessor-objects)30  - [Объекты ProxyHandler](https://python-all.ru/3.10/library/urllib.request.html#proxyhandler-objects)31  - [Объекты HTTPPasswordMgr](https://python-all.ru/3.10/library/urllib.request.html#httppasswordmgr-objects)32  - [Объекты HTTPPasswordMgrWithPriorAuth](https://python-all.ru/3.10/library/urllib.request.html#httppasswordmgrwithpriorauth-objects)33  - [Объекты AbstractBasicAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#abstractbasicauthhandler-objects)34  - [Объекты HTTPBasicAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#httpbasicauthhandler-objects)35  - [Объекты ProxyBasicAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#proxybasicauthhandler-objects)36  - [Объекты AbstractDigestAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#abstractdigestauthhandler-objects)37  - [Объекты HTTPDigestAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#httpdigestauthhandler-objects)38  - [Объекты ProxyDigestAuthHandler](https://python-all.ru/3.10/library/urllib.request.html#proxydigestauthhandler-objects)39  - [Объекты HTTPHandler](https://python-all.ru/3.10/library/urllib.request.html#httphandler-objects)40  - [Объекты HTTPSHandler](https://python-all.ru/3.10/library/urllib.request.html#httpshandler-objects)41  - [Объекты FileHandler](https://python-all.ru/3.10/library/urllib.request.html#filehandler-objects)42  - [Объекты DataHandler](https://python-all.ru/3.10/library/urllib.request.html#datahandler-objects)43  - [Объекты FTPHandler](https://python-all.ru/3.10/library/urllib.request.html#ftphandler-objects)44  - [Объекты CacheFTPHandler](https://python-all.ru/3.10/library/urllib.request.html#cacheftphandler-objects)45  - [Объекты UnknownHandler](https://python-all.ru/3.10/library/urllib.request.html#unknownhandler-objects)46  - [Объекты HTTPErrorProcessor](https://python-all.ru/3.10/library/urllib.request.html#httperrorprocessor-objects)47  - [Примеры](https://python-all.ru/3.10/library/urllib.request.html#examples)48  - [Устаревший интерфейс](https://python-all.ru/3.10/library/urllib.request.html#legacy-interface)49  - [`urllib.request` Ограничения](https://python-all.ru/3.10/library/urllib.request.html#urllib-request-restrictions)50- [`urllib.response` – Классы ответов, используемые urllib](https://python-all.ru/3.10/library/urllib.request.html#module-urllib.response)51- [`urllib.parse` – Разбор URL на компоненты](https://python-all.ru/3.10/library/urllib.parse.html)5253  - [Разбор URL](https://python-all.ru/3.10/library/urllib.parse.html#url-parsing)54  - [Безопасность разбора URL](https://python-all.ru/3.10/library/urllib.parse.html#url-parsing-security)55  - [Разбор ASCII-закодированных байтов](https://python-all.ru/3.10/library/urllib.parse.html#parsing-ascii-encoded-bytes)56  - [Структурированные результаты разбора](https://python-all.ru/3.10/library/urllib.parse.html#structured-parse-results)57  - [Экранирование URL](https://python-all.ru/3.10/library/urllib.parse.html#url-quoting)58- [`urllib.error` – Классы исключений, вызываемые urllib.request](https://python-all.ru/3.10/library/urllib.error.html)59- [`urllib.robotparser` – Парсер для robots.txt](https://python-all.ru/3.10/library/urllib.robotparser.html)60- [`http` – Модули HTTP](https://python-all.ru/3.10/library/http.html)6162  - [Коды состояния HTTP](https://python-all.ru/3.10/library/http.html#http-status-codes)63- [`http.client` – Клиент протокола HTTP](https://python-all.ru/3.10/library/http.client.html)6465  - [Объекты HTTPConnection](https://python-all.ru/3.10/library/http.client.html#httpconnection-objects)66  - [Объекты HTTPResponse](https://python-all.ru/3.10/library/http.client.html#httpresponse-objects)67  - [Примеры](https://python-all.ru/3.10/library/http.client.html#examples)68  - [Объекты HTTPMessage](https://python-all.ru/3.10/library/http.client.html#httpmessage-objects)69- [`ftplib` – клиент протокола FTP](https://python-all.ru/3.10/library/ftplib.html)7071  - [Объекты FTP](https://python-all.ru/3.10/library/ftplib.html#ftp-objects)72  - [Объекты FTP\_TLS](https://python-all.ru/3.10/library/ftplib.html#ftp-tls-objects)73- [`poplib` – клиент протокола POP3](https://python-all.ru/3.10/library/poplib.html)7475  - [Объекты POP3](https://python-all.ru/3.10/library/poplib.html#pop3-objects)76  - [Пример POP3](https://python-all.ru/3.10/library/poplib.html#pop3-example)77- [`imaplib` – клиент протокола IMAP4](https://python-all.ru/3.10/library/imaplib.html)7879  - [Объекты IMAP4](https://python-all.ru/3.10/library/imaplib.html#imap4-objects)80  - [Пример IMAP4](https://python-all.ru/3.10/library/imaplib.html#imap4-example)81- [`smtplib` – клиент протокола SMTP](https://python-all.ru/3.10/library/smtplib.html)8283  - [Объекты SMTP](https://python-all.ru/3.10/library/smtplib.html#smtp-objects)84  - [Пример SMTP](https://python-all.ru/3.10/library/smtplib.html#smtp-example)85- [`uuid` – объекты UUID в соответствии с **RFC 4122**](https://python-all.ru/3.10/library/uuid.html)8687  - [Пример](https://python-all.ru/3.10/library/uuid.html#example)88- [`socketserver` – фреймворк для сетевых серверов](https://python-all.ru/3.10/library/socketserver.html)8990  - [Замечания по созданию сервера](https://python-all.ru/3.10/library/socketserver.html#server-creation-notes)91  - [Объекты сервера](https://python-all.ru/3.10/library/socketserver.html#server-objects)92  - [Объекты обработчиков запросов](https://python-all.ru/3.10/library/socketserver.html#request-handler-objects)93  - [Примеры](https://python-all.ru/3.10/library/socketserver.html#examples)9495    - [`socketserver.TCPServer` Пример](https://python-all.ru/3.10/library/socketserver.html#socketserver-tcpserver-example)96    - [`socketserver.UDPServer` Пример](https://python-all.ru/3.10/library/socketserver.html#socketserver-udpserver-example)97    - [Асинхронные примеси](https://python-all.ru/3.10/library/socketserver.html#asynchronous-mixins)98- [`http.server` – HTTP-серверы](https://python-all.ru/3.10/library/http.server.html)99100  - [Вопросы безопасности](https://python-all.ru/3.10/library/http.server.html#security-considerations)101- [`http.cookies` – управление состоянием HTTP](https://python-all.ru/3.10/library/http.cookies.html)102103  - [Объекты Cookie](https://python-all.ru/3.10/library/http.cookies.html#cookie-objects)104  - [Объекты Morsel](https://python-all.ru/3.10/library/http.cookies.html#morsel-objects)105  - [Пример](https://python-all.ru/3.10/library/http.cookies.html#example)106- [`http.cookiejar` – Обработка cookie для HTTP-клиентов](https://python-all.ru/3.10/library/http.cookiejar.html)107108  - [Объекты CookieJar и FileCookieJar](https://python-all.ru/3.10/library/http.cookiejar.html#cookiejar-and-filecookiejar-objects)109  - [Подклассы FileCookieJar и взаимодействие с веб-браузерами](https://python-all.ru/3.10/library/http.cookiejar.html#filecookiejar-subclasses-and-co-operation-with-web-browsers)110  - [Объекты CookiePolicy](https://python-all.ru/3.10/library/http.cookiejar.html#cookiepolicy-objects)111  - [Объекты DefaultCookiePolicy](https://python-all.ru/3.10/library/http.cookiejar.html#defaultcookiepolicy-objects)112  - [Объекты Cookie](https://python-all.ru/3.10/library/http.cookiejar.html#cookie-objects)113  - [Примеры](https://python-all.ru/3.10/library/http.cookiejar.html#examples)114- [`xmlrpc` – Модули сервера и клиента XML-RPC](https://python-all.ru/3.10/library/xmlrpc.html)115- [`xmlrpc.client` – Доступ клиента XML-RPC](https://python-all.ru/3.10/library/xmlrpc.client.html)116117  - [Объекты ServerProxy](https://python-all.ru/3.10/library/xmlrpc.client.html#serverproxy-objects)118  - [Объекты datetime](https://python-all.ru/3.10/library/xmlrpc.client.html#datetime-objects)119  - [Объекты Binary](https://python-all.ru/3.10/library/xmlrpc.client.html#binary-objects)120  - [Объекты Fault](https://python-all.ru/3.10/library/xmlrpc.client.html#fault-objects)121  - [Объекты ProtocolError](https://python-all.ru/3.10/library/xmlrpc.client.html#protocolerror-objects)122  - [Объекты MultiCall](https://python-all.ru/3.10/library/xmlrpc.client.html#multicall-objects)123  - [Удобные функции](https://python-all.ru/3.10/library/xmlrpc.client.html#convenience-functions)124  - [Пример использования клиента](https://python-all.ru/3.10/library/xmlrpc.client.html#example-of-client-usage)125  - [Пример использования клиента и сервера](https://python-all.ru/3.10/library/xmlrpc.client.html#example-of-client-and-server-usage)126- [`xmlrpc.server` – Базовые серверы XML-RPC](https://python-all.ru/3.10/library/xmlrpc.server.html)127128  - [Объекты SimpleXMLRPCServer](https://python-all.ru/3.10/library/xmlrpc.server.html#simplexmlrpcserver-objects)129130    - [Пример SimpleXMLRPCServer](https://python-all.ru/3.10/library/xmlrpc.server.html#simplexmlrpcserver-example)131  - [CGIXMLRPCRequestHandler](https://python-all.ru/3.10/library/xmlrpc.server.html#cgixmlrpcrequesthandler)132  - [Документирование сервера XML-RPC](https://python-all.ru/3.10/library/xmlrpc.server.html#documenting-xmlrpc-server)133  - [Объекты DocXMLRPCServer](https://python-all.ru/3.10/library/xmlrpc.server.html#docxmlrpcserver-objects)134  - [DocCGIXMLRPCRequestHandler](https://python-all.ru/3.10/library/xmlrpc.server.html#doccgixmlrpcrequesthandler)135- [`ipaddress` – Библиотека для работы с IPv4/IPv6](https://python-all.ru/3.10/library/ipaddress.html)136137  - [Удобные фабричные функции](https://python-all.ru/3.10/library/ipaddress.html#convenience-factory-functions)138  - [IP-адреса](https://python-all.ru/3.10/library/ipaddress.html#ip-addresses)139140    - [Объекты адресов](https://python-all.ru/3.10/library/ipaddress.html#address-objects)141    - [Преобразование в строки и целые числа](https://python-all.ru/3.10/library/ipaddress.html#conversion-to-strings-and-integers)142    - [Операторы](https://python-all.ru/3.10/library/ipaddress.html#operators)143144      - [Операторы сравнения](https://python-all.ru/3.10/library/ipaddress.html#comparison-operators)145      - [Арифметические операторы](https://python-all.ru/3.10/library/ipaddress.html#arithmetic-operators)146  - [Определения IP-сетей](https://python-all.ru/3.10/library/ipaddress.html#ip-network-definitions)147148    - [Префикс, маска сети и маска узла](https://python-all.ru/3.10/library/ipaddress.html#prefix-net-mask-and-host-mask)149    - [Объекты сетей](https://python-all.ru/3.10/library/ipaddress.html#network-objects)150    - [Операторы](https://python-all.ru/3.10/library/ipaddress.html#id1)151152      - [Логические операторы](https://python-all.ru/3.10/library/ipaddress.html#logical-operators)153      - [Итерация](https://python-all.ru/3.10/library/ipaddress.html#iteration)154      - [Сети как контейнеры адресов](https://python-all.ru/3.10/library/ipaddress.html#networks-as-containers-of-addresses)155  - [Объекты интерфейсов](https://python-all.ru/3.10/library/ipaddress.html#interface-objects)156157    - [Операторы](https://python-all.ru/3.10/library/ipaddress.html#id2)158159      - [Логические операторы](https://python-all.ru/3.10/library/ipaddress.html#id3)160  - [Прочие функции уровня модуля](https://python-all.ru/3.10/library/ipaddress.html#other-module-level-functions)161  - [Пользовательские исключения](https://python-all.ru/3.10/library/ipaddress.html#custom-exceptions)162