index.md
1> **Источник:** https://python-all.ru/3.13/c-api/index.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Справочное руководство по Python/C API89В данном руководстве описано API для программистов на C и C++, которые хотят создавать модули расширения или встраивать Python. Оно является дополнением к [Расширение и встраивание интерпретатора Python](https://python-all.ru/3.13/extending/index.html#extending-index), в котором описаны общие принципы написания расширений, но нет подробной документации по функциям API.1011- [Введение](https://python-all.ru/3.13/c-api/intro.html)1213 - [Стандарты кодирования](https://python-all.ru/3.13/c-api/intro.html#coding-standards)14 - [Заголовочные файлы](https://python-all.ru/3.13/c-api/intro.html#include-files)15 - [Полезные макросы](https://python-all.ru/3.13/c-api/intro.html#useful-macros)16 - [Объекты, типы и счетчики ссылок](https://python-all.ru/3.13/c-api/intro.html#objects-types-and-reference-counts)17 - [Исключения](https://python-all.ru/3.13/c-api/intro.html#exceptions)18 - [Встраивание Python](https://python-all.ru/3.13/c-api/intro.html#embedding-python)19 - [Отладочные сборки](https://python-all.ru/3.13/c-api/intro.html#debugging-builds)20 - [Рекомендуемые сторонние инструменты](https://python-all.ru/3.13/c-api/intro.html#recommended-third-party-tools)21- [Стабильность C API](https://python-all.ru/3.13/c-api/stable.html)2223 - [Нестабильное C API](https://python-all.ru/3.13/c-api/stable.html#unstable-c-api)24 - [Стабильный ABI](https://python-all.ru/3.13/c-api/stable.html#stable-application-binary-interface)25 - [Особенности платформ](https://python-all.ru/3.13/c-api/stable.html#platform-considerations)26 - [Содержимое ограниченного API](https://python-all.ru/3.13/c-api/stable.html#contents-of-limited-api)27- [Очень высокоуровневый слой](https://python-all.ru/3.13/c-api/veryhigh.html)2829 - [Доступные стартовые символы](https://python-all.ru/3.13/c-api/veryhigh.html#available-start-symbols)30 - [Влияние на стек](https://python-all.ru/3.13/c-api/veryhigh.html#stack-effects)31- [Подсчёт ссылок](https://python-all.ru/3.13/c-api/refcounting.html)32- [Обработка исключений](https://python-all.ru/3.13/c-api/exceptions.html)3334 - [Вывод и очистка](https://python-all.ru/3.13/c-api/exceptions.html#printing-and-clearing)35 - [Возбуждение исключений](https://python-all.ru/3.13/c-api/exceptions.html#raising-exceptions)36 - [Выдача предупреждений](https://python-all.ru/3.13/c-api/exceptions.html#issuing-warnings)37 - [Запрос индикатора ошибки](https://python-all.ru/3.13/c-api/exceptions.html#querying-the-error-indicator)38 - [Обработка сигналов](https://python-all.ru/3.13/c-api/exceptions.html#signal-handling)39 - [Классы исключений](https://python-all.ru/3.13/c-api/exceptions.html#exception-classes)40 - [Объекты исключений](https://python-all.ru/3.13/c-api/exceptions.html#exception-objects)41 - [Объекты исключений Unicode](https://python-all.ru/3.13/c-api/exceptions.html#unicode-exception-objects)42 - [Управление рекурсией](https://python-all.ru/3.13/c-api/exceptions.html#recursion-control)43 - [Типы исключений и предупреждений](https://python-all.ru/3.13/c-api/exceptions.html#exception-and-warning-types)44 - [Трассировки](https://python-all.ru/3.13/c-api/exceptions.html#tracebacks)45- [Утилиты](https://python-all.ru/3.13/c-api/utilities.html)4647 - [Утилиты операционной системы](https://python-all.ru/3.13/c-api/sys.html)48 - [Системные функции](https://python-all.ru/3.13/c-api/sys.html#system-functions)49 - [Управление процессами](https://python-all.ru/3.13/c-api/sys.html#process-control)50 - [Импорт модулей](https://python-all.ru/3.13/c-api/import.html)51 - [Поддержка маршалинга данных](https://python-all.ru/3.13/c-api/marshal.html)52 - [Разбор аргументов и сборка значений](https://python-all.ru/3.13/c-api/arg.html)53 - [Преобразование и форматирование строк](https://python-all.ru/3.13/c-api/conversion.html)54 - [Классификация и преобразование символов](https://python-all.ru/3.13/c-api/conversion.html#character-classification-and-conversion)55 - [PyHash API](https://python-all.ru/3.13/c-api/hash.html)56 - [Рефлексия](https://python-all.ru/3.13/c-api/reflection.html)57 - [Реестр кодировок и вспомогательные функции](https://python-all.ru/3.13/c-api/codec.html)58 - [PyTime C API](https://python-all.ru/3.13/c-api/time.html)59 - [Поддержка карт производительности](https://python-all.ru/3.13/c-api/perfmaps.html)60- [Слой абстрактных объектов](https://python-all.ru/3.13/c-api/abstract.html)6162 - [Протокол объекта](https://python-all.ru/3.13/c-api/object.html)63 - [Протокол вызова](https://python-all.ru/3.13/c-api/call.html)64 - [Протокол чисел](https://python-all.ru/3.13/c-api/number.html)65 - [Протокол последовательностей](https://python-all.ru/3.13/c-api/sequence.html)66 - [Протокол отображений](https://python-all.ru/3.13/c-api/mapping.html)67 - [Протокол итератора](https://python-all.ru/3.13/c-api/iter.html)68 - [Протокол буфера](https://python-all.ru/3.13/c-api/buffer.html)69- [Слой конкретных объектов](https://python-all.ru/3.13/c-api/concrete.html)7071 - [Базовые объекты](https://python-all.ru/3.13/c-api/concrete.html#fundamental-objects)72 - [Числовые объекты](https://python-all.ru/3.13/c-api/concrete.html#numeric-objects)73 - [Объекты последовательностей](https://python-all.ru/3.13/c-api/concrete.html#sequence-objects)74 - [Объекты контейнеров](https://python-all.ru/3.13/c-api/concrete.html#container-objects)75 - [Объекты функций](https://python-all.ru/3.13/c-api/concrete.html#function-objects)76 - [Прочие объекты](https://python-all.ru/3.13/c-api/concrete.html#other-objects)77 - [C API для модулей расширения](https://python-all.ru/3.13/c-api/concrete.html#c-api-for-extension-modules)78- [Инициализация, завершение и потоки](https://python-all.ru/3.13/c-api/init.html)7980 - [Перед инициализацией Python](https://python-all.ru/3.13/c-api/init.html#before-python-initialization)81 - [Глобальные переменные конфигурации](https://python-all.ru/3.13/c-api/init.html#global-configuration-variables)82 - [Инициализация и финализация интерпретатора](https://python-all.ru/3.13/c-api/init.html#initializing-and-finalizing-the-interpreter)83 - [Параметры уровня процесса](https://python-all.ru/3.13/c-api/init.html#process-wide-parameters)84 - [Состояние потока и глобальная блокировка интерпретатора](https://python-all.ru/3.13/c-api/init.html#thread-state-and-the-global-interpreter-lock)85 - [Поддержка под-интерпретаторов](https://python-all.ru/3.13/c-api/init.html#sub-interpreter-support)86 - [Асинхронные уведомления](https://python-all.ru/3.13/c-api/init.html#asynchronous-notifications)87 - [Профилирование и трассировка](https://python-all.ru/3.13/c-api/init.html#profiling-and-tracing)88 - [Трассировка ссылок](https://python-all.ru/3.13/c-api/init.html#reference-tracing)89 - [Расширенная поддержка отладчика](https://python-all.ru/3.13/c-api/init.html#advanced-debugger-support)90 - [Поддержка локального хранилища потока](https://python-all.ru/3.13/c-api/init.html#thread-local-storage-support)91 - [Примитивы синхронизации](https://python-all.ru/3.13/c-api/init.html#synchronization-primitives)92 - [API потоков операционной системы](https://python-all.ru/3.13/c-api/init.html#operating-system-thread-apis)93- [Конфигурация инициализации Python](https://python-all.ru/3.13/c-api/init_config.html)9495 - [Пример](https://python-all.ru/3.13/c-api/init_config.html#example)96 - [PyWideStringList](https://python-all.ru/3.13/c-api/init_config.html#pywidestringlist)97 - [PyStatus](https://python-all.ru/3.13/c-api/init_config.html#pystatus)98 - [PyPreConfig](https://python-all.ru/3.13/c-api/init_config.html#pypreconfig)99 - [Предварительная инициализация Python с помощью PyPreConfig](https://python-all.ru/3.13/c-api/init_config.html#preinitialize-python-with-pypreconfig)100 - [PyConfig](https://python-all.ru/3.13/c-api/init_config.html#pyconfig)101 - [Инициализация с помощью PyConfig](https://python-all.ru/3.13/c-api/init_config.html#initialization-with-pyconfig)102 - [Изолированная конфигурация](https://python-all.ru/3.13/c-api/init_config.html#isolated-configuration)103 - [Конфигурация Python](https://python-all.ru/3.13/c-api/init_config.html#python-configuration)104 - [Конфигурация путей Python](https://python-all.ru/3.13/c-api/init_config.html#python-path-configuration)105 - [Py\_GetArgcArgv()](https://python-all.ru/3.13/c-api/init_config.html#py-getargcargv)106 - [Приватный предварительный API многофазной инициализации](https://python-all.ru/3.13/c-api/init_config.html#multi-phase-initialization-private-provisional-api)107- [Управление памятью](https://python-all.ru/3.13/c-api/memory.html)108109 - [Обзор](https://python-all.ru/3.13/c-api/memory.html#overview)110 - [Домены аллокаторов](https://python-all.ru/3.13/c-api/memory.html#allocator-domains)111 - [Интерфейс низкоуровневой памяти](https://python-all.ru/3.13/c-api/memory.html#raw-memory-interface)112 - [Интерфейс памяти](https://python-all.ru/3.13/c-api/memory.html#memory-interface)113 - [Аллокаторы объектов](https://python-all.ru/3.13/c-api/memory.html#object-allocators)114 - [Аллокаторы памяти по умолчанию](https://python-all.ru/3.13/c-api/memory.html#default-memory-allocators)115 - [Настройка аллокаторов памяти](https://python-all.ru/3.13/c-api/memory.html#customize-memory-allocators)116 - [Отладочные перехватчики аллокаторов памяти Python](https://python-all.ru/3.13/c-api/memory.html#debug-hooks-on-the-python-memory-allocators)117 - [Аллокатор pymalloc](https://python-all.ru/3.13/c-api/memory.html#the-pymalloc-allocator)118 - [Аллокатор mimalloc](https://python-all.ru/3.13/c-api/memory.html#the-mimalloc-allocator)119 - [C API модуля tracemalloc](https://python-all.ru/3.13/c-api/memory.html#tracemalloc-c-api)120 - [Примеры](https://python-all.ru/3.13/c-api/memory.html#examples)121- [Поддержка реализации объектов](https://python-all.ru/3.13/c-api/objimpl.html)122123 - [Выделение объектов в куче](https://python-all.ru/3.13/c-api/allocation.html)124 - [Общие структуры объектов](https://python-all.ru/3.13/c-api/structures.html)125 - [Структуры объектов типов](https://python-all.ru/3.13/c-api/typeobj.html)126 - [Поддержка циклической сборки мусора](https://python-all.ru/3.13/c-api/gcsupport.html)127- [Версионирование API и ABI](https://python-all.ru/3.13/c-api/apiabiversion.html)128- [Мониторинг C API](https://python-all.ru/3.13/c-api/monitoring.html)129- [Генерация событий выполнения](https://python-all.ru/3.13/c-api/monitoring.html#generating-execution-events)130131 - [Управление состоянием мониторинга](https://python-all.ru/3.13/c-api/monitoring.html#managing-the-monitoring-state)132