> **Источник:** https://python-all.ru/3.12/library/internet.html
>
> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.

---

# Интернет-протоколы и поддержка

Модули, описанные в этой главе, реализуют интернет-протоколы и поддержку сопутствующих технологий. Все они реализованы на Python. Большинству из этих модулей требуется системно-зависимый модуль [`socket`](https://python-all.ru/3.12/library/socket.html#module-socket), который в настоящее время поддерживается на большинстве популярных платформ. Вот краткий обзор:

- [`webbrowser` – Удобный контроллер веб-браузера](https://python-all.ru/3.12/library/webbrowser.html)

  - [Объекты управления браузером](https://python-all.ru/3.12/library/webbrowser.html#browser-controller-objects)
- [`wsgiref` – Утилиты WSGI и эталонная реализация](https://python-all.ru/3.12/library/wsgiref.html)

  - [`wsgiref.util` – Утилиты окружения WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.util)
  - [`wsgiref.headers` – Инструменты для заголовков ответов WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.headers)
  - [`wsgiref.simple_server` – Простой HTTP-сервер WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.simple_server)
  - [`wsgiref.validate` – Проверка соответствия WSGI](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.validate)
  - [`wsgiref.handlers` – Базовые классы сервера/шлюза](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.handlers)
  - [`wsgiref.types` – Типы WSGI для статической проверки типов](https://python-all.ru/3.12/library/wsgiref.html#module-wsgiref.types)
  - [Примеры](https://python-all.ru/3.12/library/wsgiref.html#examples)
- [`urllib` – Модули обработки URL](https://python-all.ru/3.12/library/urllib.html)
- [`urllib.request` – Расширяемая библиотека для открытия URL](https://python-all.ru/3.12/library/urllib.request.html)

  - [Объекты Request](https://python-all.ru/3.12/library/urllib.request.html#request-objects)
  - [Объекты OpenerDirector](https://python-all.ru/3.12/library/urllib.request.html#openerdirector-objects)
  - [Объекты BaseHandler](https://python-all.ru/3.12/library/urllib.request.html#basehandler-objects)
  - [Объекты HTTPRedirectHandler](https://python-all.ru/3.12/library/urllib.request.html#httpredirecthandler-objects)
  - [Объекты HTTPCookieProcessor](https://python-all.ru/3.12/library/urllib.request.html#httpcookieprocessor-objects)
  - [Объекты ProxyHandler](https://python-all.ru/3.12/library/urllib.request.html#proxyhandler-objects)
  - [Объекты HTTPPasswordMgr](https://python-all.ru/3.12/library/urllib.request.html#httppasswordmgr-objects)
  - [Объекты HTTPPasswordMgrWithPriorAuth](https://python-all.ru/3.12/library/urllib.request.html#httppasswordmgrwithpriorauth-objects)
  - [Объекты AbstractBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#abstractbasicauthhandler-objects)
  - [Объекты HTTPBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#httpbasicauthhandler-objects)
  - [Объекты ProxyBasicAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#proxybasicauthhandler-objects)
  - [Объекты AbstractDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#abstractdigestauthhandler-objects)
  - [Объекты HTTPDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#httpdigestauthhandler-objects)
  - [Объекты ProxyDigestAuthHandler](https://python-all.ru/3.12/library/urllib.request.html#proxydigestauthhandler-objects)
  - [Объекты HTTPHandler](https://python-all.ru/3.12/library/urllib.request.html#httphandler-objects)
  - [Объекты HTTPSHandler](https://python-all.ru/3.12/library/urllib.request.html#httpshandler-objects)
  - [Объекты FileHandler](https://python-all.ru/3.12/library/urllib.request.html#filehandler-objects)
  - [Объекты DataHandler](https://python-all.ru/3.12/library/urllib.request.html#datahandler-objects)
  - [Объекты FTPHandler](https://python-all.ru/3.12/library/urllib.request.html#ftphandler-objects)
  - [Объекты CacheFTPHandler](https://python-all.ru/3.12/library/urllib.request.html#cacheftphandler-objects)
  - [Объекты UnknownHandler](https://python-all.ru/3.12/library/urllib.request.html#unknownhandler-objects)
  - [Объекты HTTPErrorProcessor](https://python-all.ru/3.12/library/urllib.request.html#httperrorprocessor-objects)
  - [Примеры](https://python-all.ru/3.12/library/urllib.request.html#examples)
  - [Устаревший интерфейс](https://python-all.ru/3.12/library/urllib.request.html#legacy-interface)
  - [`urllib.request` Ограничения](https://python-all.ru/3.12/library/urllib.request.html#urllib-request-restrictions)
- [`urllib.response` – Классы ответов, используемые urllib](https://python-all.ru/3.12/library/urllib.request.html#module-urllib.response)
- [`urllib.parse` – Разбор URL на компоненты](https://python-all.ru/3.12/library/urllib.parse.html)

  - [Разбор URL](https://python-all.ru/3.12/library/urllib.parse.html#url-parsing)
  - [Безопасность разбора URL](https://python-all.ru/3.12/library/urllib.parse.html#url-parsing-security)
  - [Разбор ASCII-закодированных байтов](https://python-all.ru/3.12/library/urllib.parse.html#parsing-ascii-encoded-bytes)
  - [Структурированные результаты разбора](https://python-all.ru/3.12/library/urllib.parse.html#structured-parse-results)
  - [Экранирование URL](https://python-all.ru/3.12/library/urllib.parse.html#url-quoting)
- [`urllib.error` – Классы исключений, вызываемые urllib.request](https://python-all.ru/3.12/library/urllib.error.html)
- [`urllib.robotparser` – Парсер для robots.txt](https://python-all.ru/3.12/library/urllib.robotparser.html)
- [`http` – Модули HTTP](https://python-all.ru/3.12/library/http.html)

  - [Коды состояния HTTP](https://python-all.ru/3.12/library/http.html#http-status-codes)
  - [Категория состояния HTTP](https://python-all.ru/3.12/library/http.html#http-status-category)
  - [Методы HTTP](https://python-all.ru/3.12/library/http.html#http-methods)
- [`http.client` – Клиент протокола HTTP](https://python-all.ru/3.12/library/http.client.html)

  - [Объекты HTTPConnection](https://python-all.ru/3.12/library/http.client.html#httpconnection-objects)
  - [Объекты HTTPResponse](https://python-all.ru/3.12/library/http.client.html#httpresponse-objects)
  - [Примеры](https://python-all.ru/3.12/library/http.client.html#examples)
  - [Объекты HTTPMessage](https://python-all.ru/3.12/library/http.client.html#httpmessage-objects)
- [`ftplib` – клиент протокола FTP](https://python-all.ru/3.12/library/ftplib.html)

  - [Справочник](https://python-all.ru/3.12/library/ftplib.html#reference)

    - [Объекты FTP](https://python-all.ru/3.12/library/ftplib.html#ftp-objects)
    - [Объекты FTP\_TLS](https://python-all.ru/3.12/library/ftplib.html#ftp-tls-objects)
    - [Переменные модуля](https://python-all.ru/3.12/library/ftplib.html#module-variables)
- [`poplib` – клиент протокола POP3](https://python-all.ru/3.12/library/poplib.html)

  - [Объекты POP3](https://python-all.ru/3.12/library/poplib.html#pop3-objects)
  - [Пример POP3](https://python-all.ru/3.12/library/poplib.html#pop3-example)
- [`imaplib` – клиент протокола IMAP4](https://python-all.ru/3.12/library/imaplib.html)

  - [Объекты IMAP4](https://python-all.ru/3.12/library/imaplib.html#imap4-objects)
  - [Пример IMAP4](https://python-all.ru/3.12/library/imaplib.html#imap4-example)
- [`smtplib` – клиент протокола SMTP](https://python-all.ru/3.12/library/smtplib.html)

  - [Объекты SMTP](https://python-all.ru/3.12/library/smtplib.html#smtp-objects)
  - [Пример SMTP](https://python-all.ru/3.12/library/smtplib.html#smtp-example)
- [`uuid` – объекты UUID в соответствии с **RFC 4122**](https://python-all.ru/3.12/library/uuid.html)

  - [Использование командной строки](https://python-all.ru/3.12/library/uuid.html#command-line-usage)
  - [Пример](https://python-all.ru/3.12/library/uuid.html#example)
  - [Пример командной строки](https://python-all.ru/3.12/library/uuid.html#command-line-example)
- [`socketserver` – фреймворк для сетевых серверов](https://python-all.ru/3.12/library/socketserver.html)

  - [Замечания по созданию сервера](https://python-all.ru/3.12/library/socketserver.html#server-creation-notes)
  - [Объекты сервера](https://python-all.ru/3.12/library/socketserver.html#server-objects)
  - [Объекты обработчиков запросов](https://python-all.ru/3.12/library/socketserver.html#request-handler-objects)
  - [Примеры](https://python-all.ru/3.12/library/socketserver.html#examples)

    - [`socketserver.TCPServer` Пример](https://python-all.ru/3.12/library/socketserver.html#socketserver-tcpserver-example)
    - [`socketserver.UDPServer` Пример](https://python-all.ru/3.12/library/socketserver.html#socketserver-udpserver-example)
    - [Асинхронные примеси](https://python-all.ru/3.12/library/socketserver.html#asynchronous-mixins)
- [`http.server` – HTTP-серверы](https://python-all.ru/3.12/library/http.server.html)

  - [Интерфейс командной строки](https://python-all.ru/3.12/library/http.server.html#command-line-interface)
  - [Вопросы безопасности](https://python-all.ru/3.12/library/http.server.html#security-considerations)
- [`http.cookies` – управление состоянием HTTP](https://python-all.ru/3.12/library/http.cookies.html)

  - [Объекты Cookie](https://python-all.ru/3.12/library/http.cookies.html#cookie-objects)
  - [Объекты Morsel](https://python-all.ru/3.12/library/http.cookies.html#morsel-objects)
  - [Пример](https://python-all.ru/3.12/library/http.cookies.html#example)
- [`http.cookiejar` – Обработка cookie для HTTP-клиентов](https://python-all.ru/3.12/library/http.cookiejar.html)

  - [Объекты CookieJar и FileCookieJar](https://python-all.ru/3.12/library/http.cookiejar.html#cookiejar-and-filecookiejar-objects)
  - [Подклассы FileCookieJar и взаимодействие с веб-браузерами](https://python-all.ru/3.12/library/http.cookiejar.html#filecookiejar-subclasses-and-co-operation-with-web-browsers)
  - [Объекты CookiePolicy](https://python-all.ru/3.12/library/http.cookiejar.html#cookiepolicy-objects)
  - [Объекты DefaultCookiePolicy](https://python-all.ru/3.12/library/http.cookiejar.html#defaultcookiepolicy-objects)
  - [Объекты Cookie](https://python-all.ru/3.12/library/http.cookiejar.html#cookie-objects)
  - [Примеры](https://python-all.ru/3.12/library/http.cookiejar.html#examples)
- [`xmlrpc` – Модули сервера и клиента XML-RPC](https://python-all.ru/3.12/library/xmlrpc.html)
- [`xmlrpc.client` – Доступ клиента XML-RPC](https://python-all.ru/3.12/library/xmlrpc.client.html)

  - [Объекты ServerProxy](https://python-all.ru/3.12/library/xmlrpc.client.html#serverproxy-objects)
  - [Объекты datetime](https://python-all.ru/3.12/library/xmlrpc.client.html#datetime-objects)
  - [Объекты Binary](https://python-all.ru/3.12/library/xmlrpc.client.html#binary-objects)
  - [Объекты Fault](https://python-all.ru/3.12/library/xmlrpc.client.html#fault-objects)
  - [Объекты ProtocolError](https://python-all.ru/3.12/library/xmlrpc.client.html#protocolerror-objects)
  - [Объекты MultiCall](https://python-all.ru/3.12/library/xmlrpc.client.html#multicall-objects)
  - [Удобные функции](https://python-all.ru/3.12/library/xmlrpc.client.html#convenience-functions)
  - [Пример использования клиента](https://python-all.ru/3.12/library/xmlrpc.client.html#example-of-client-usage)
  - [Пример использования клиента и сервера](https://python-all.ru/3.12/library/xmlrpc.client.html#example-of-client-and-server-usage)
- [`xmlrpc.server` – Базовые серверы XML-RPC](https://python-all.ru/3.12/library/xmlrpc.server.html)

  - [Объекты SimpleXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#simplexmlrpcserver-objects)

    - [Пример SimpleXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#simplexmlrpcserver-example)
  - [CGIXMLRPCRequestHandler](https://python-all.ru/3.12/library/xmlrpc.server.html#cgixmlrpcrequesthandler)
  - [Документирование сервера XML-RPC](https://python-all.ru/3.12/library/xmlrpc.server.html#documenting-xmlrpc-server)
  - [Объекты DocXMLRPCServer](https://python-all.ru/3.12/library/xmlrpc.server.html#docxmlrpcserver-objects)
  - [DocCGIXMLRPCRequestHandler](https://python-all.ru/3.12/library/xmlrpc.server.html#doccgixmlrpcrequesthandler)
- [`ipaddress` – Библиотека для работы с IPv4/IPv6](https://python-all.ru/3.12/library/ipaddress.html)

  - [Удобные фабричные функции](https://python-all.ru/3.12/library/ipaddress.html#convenience-factory-functions)
  - [IP-адреса](https://python-all.ru/3.12/library/ipaddress.html#ip-addresses)

    - [Объекты адресов](https://python-all.ru/3.12/library/ipaddress.html#address-objects)
    - [Преобразование в строки и целые числа](https://python-all.ru/3.12/library/ipaddress.html#conversion-to-strings-and-integers)
    - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#operators)

      - [Операторы сравнения](https://python-all.ru/3.12/library/ipaddress.html#comparison-operators)
      - [Арифметические операторы](https://python-all.ru/3.12/library/ipaddress.html#arithmetic-operators)
  - [Определения IP-сетей](https://python-all.ru/3.12/library/ipaddress.html#ip-network-definitions)

    - [Префикс, маска сети и маска узла](https://python-all.ru/3.12/library/ipaddress.html#prefix-net-mask-and-host-mask)
    - [Объекты сетей](https://python-all.ru/3.12/library/ipaddress.html#network-objects)
    - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#id1)

      - [Логические операторы](https://python-all.ru/3.12/library/ipaddress.html#logical-operators)
      - [Итерация](https://python-all.ru/3.12/library/ipaddress.html#iteration)
      - [Сети как контейнеры адресов](https://python-all.ru/3.12/library/ipaddress.html#networks-as-containers-of-addresses)
  - [Объекты интерфейсов](https://python-all.ru/3.12/library/ipaddress.html#interface-objects)

    - [Операторы](https://python-all.ru/3.12/library/ipaddress.html#id2)

      - [Логические операторы](https://python-all.ru/3.12/library/ipaddress.html#id3)
  - [Прочие функции уровня модуля](https://python-all.ru/3.12/library/ipaddress.html#other-module-level-functions)
  - [Пользовательские исключения](https://python-all.ru/3.12/library/ipaddress.html#custom-exceptions)
