Python AST: Analyzing and Transforming Code Programmatically
Learn how to use Python's built-in `ast` module to inspect, traverse, and modify source code, enabling you to build powerful static analysis and refactoring scripts.
-
💬
ИИ инструктор
Задавайте вопросы по любому уроку — понятный ответ придёт мгновенно, в любой момент. -
🕐
Начните в любое время
Без расписаний и дедлайнов — учитесь в своём темпе, когда удобно. -
🌐
На русском языке
Уроки, задания и сертификат — всё полностью на вашем языке.
О курсе
Do you want to build custom linters, automate complex refactoring tasks, or generate code based on existing structures? Understanding Abstract Syntax Trees (AST) is the key to manipulating Python code itself. This course provides a complete introduction to the structure and traversal of Python source code using the standard library `ast` module. By the end, you will be able to read, modify, and output Python code structures programmatically, turning complex code maintenance into automated processes.
What you'll learn:
* Understand the fundamental structure and terminology of Abstract Syntax Trees (AST).
* Learn how to parse Python source code into a usable AST object using the `ast` module.
* Apply `NodeVisitor` and `NodeTransformer` patterns for efficient tree traversal and modification.
* Practice building simple static analysis tools to enforce coding standards or check for modern Python features like type hints.
* Configure programmatic code modifications and safely generate new Python source code from a modified AST.
The content begins with essential terminology and the relationship between source code and the AST structure. We then move into practical exercises covering parsing, traversal techniques, and finally, advanced modification and code generation patterns. This course is designed for beginner Python developers who are comfortable with basic syntax and are ready to explore advanced metaprogramming concepts. No prior experience with code analysis or AST is required. Start mastering programmatic control over your Python code today.
Что вы получите
-
📜
Сертификат об окончании
Добавьте в профиль LinkedIn -
💬
Личный AI-наставник
Застрял на уроке? Спроси встроенного наставника о чём угодно, в любой момент. -
🎧
Аудиоверсия включена
Учитесь в дороге — экран не нужен -
♾️
Пожизненный доступ
Возвращайтесь в любое время, без срока -
📱
Телефон или компьютер
Работает везде и на любом устройстве -
💸
Возврат в течение 14 дней
Без вопросов -
⚡
Кратко и по делу
2 ч 36 мин практического материала
Отзывы
Отзывов пока нет — поделитесь своим первым.
Часто спрашивают
Что нужно для прохождения курса? +
Только смартфон или компьютер с доступом в интернет. Никаких установок и оборудования.
Как оплатить? +
Банковской картой через Stripe. Данные карты обрабатывает Stripe — мы их не храним.
Можно ли вернуть деньги? +
Да — полный возврат в течение 14 дней, без вопросов.
Как долго будут доступны материалы? +
Навсегда. После покупки курс остаётся с вами — возвращайтесь в любое время.
Получу ли я сертификат? +
Да. По окончании выдаётся сертификат, который можно добавить в профиль LinkedIn.
Подходит для специалистов в
IT
Дизайн
Финансы
Маркетинг
Медицина
Образование
HoReCa
Производство