Talk

From Docstrings to Diagrams in 20 Minutes with Python

Thursday, May 28

14:40 - 15:10
RoomGnocchi
LanguageEnglish
Audience levelIntermediate
Elevator pitch

Stop manual drawing! Learn to automate architecture diagrams by extracting docstrings and code signatures directly from your source. We’ll demo a Python script that uses AI to turn your code into PlantUML diagrams, ensuring your documentation never goes obsolete as your project grows.

Abstract

Design diagrams often become obsolete the moment they are finished because code changes faster than you can make a diagram. This session introduces a streamlined workflow to ensure your documentation stays in sync with your codebase by making diagrams from code using docstrings. Since docstrings live alongside your code, they are the source material for architectural depictions in diagrams.

We will demonstrate how to use built-in Python tools to extract information directly from your code. You will see a live walkthrough of a script that sends this information to AI, then translates English descriptions into structured diagram code. Whether you are mapping a single function or an entire library, this approach eliminates the burden of manual diagram creation. You will leave with a practical script and prompt templates to start generating living diagrams for your projects right away.

Key Takeaways: Automated Extraction: Learn how to pull signatures and docstrings without executing code. AI Interpretation: Use succinct prompts to convert code intent into visual formats like PlantUML. Smart Filtering: Teach AI to distinguish between critical system flows and minor utility functions. Instant Rendering: Generate professional SVG or PNG images with zero manual drawing.

TagsDocumentation, Other, UI/UX
Participant

Tadeh Hakopian

With a background in Architecture and Development Tadeh has supported building large scale projects with diverse teams for over 10 years. By promoting open dialogue, systems thinking, and long term planning he has improved operational efficiencies in all his endeavors. He is a course author, trainer, and open source contributor as well as a speaker at national conferences in technology, architecture, design. He loves to talk about the new possibilities with technology and innovation at everyone’s disposal while building communities along the way.