
Structural, not textual.
The model preserves formatting and intent while resolving symbols, imports, types, and relationships across modules and repositories.
Upgrade Python runtimes, modernize deprecated APIs, manage pyproject.toml dependencies, and remediate CVEs. Built on a compiler-accurate model of your code, governed end-to-end.
Code is modeled structurally and semantically rather than treated as text. Recipes execute against that model, applying consistent changes across many Python repositories.
Python is shipped on the same engine as Java and C#. The categories below cover the recipes available now.
A sample from the Python recipe catalog. Browse the catalog for the full list.
datetime.utcnow(), asyncio.get_event_loop() inside coroutines, and the old ast.Num and ast.Str node types. Removed modules like distutils, imp, and cgi are flagged for review.
typing.List becomes list, Optional[X] becomes X | None, and % formatting and str.format() calls become f-strings.
populate_by_name to validate_by_name, and flag the changes that need a decision.
langchain_community, the provider packages, and langchain_classic. Deprecated agent patterns such as create_react_agent are flagged.
DataFrame.append() becomes pd.concat() for pandas 2.0, backoff retry decorators move to tenacity, and the deprecated avro-python3 package moves to avro.
is None checks, and more. Each recipe leaves code alone where its rewrite could change behavior.
Moderne helps keep our codebases cleaner, safer, and easier to evolve. It is a major unlock for teams that want to spend more time shipping and less time maintaining.
Python code modernization at enterprise scale refers to coordinating large-scale changes across many Python repositories, such as upgrading Python runtimes, updating deprecated APIs, aligning dependencies, and remediating security vulnerabilities.
Enterprises safely apply large-scale Python code changes by using semantic code analysis and deterministic automation rather than manual refactoring or one-off scripts. Coding agents can use the same automation. The agent plans the change, and a recipe makes the edits.
Semantic code analysis for Python means analyzing Python code using a structural, type-attributed model rather than treating code as plain text.
AST-based Python refactoring tools operate on syntax trees but often lose higher-level semantic context, such as symbol resolution, dependency relationships, and behavioral intent.
Enterprises upgrade Python versions across many repositories by analyzing deprecated APIs, runtime compatibility, and dependency constraints using semantic automation.
Enterprises coordinate Python changes across multiple repositories by executing portfolio-wide change initiatives that analyze impact across repositories, apply consistent transformations, and deliver changes as reviewable pull requests.
Yes. Python is represented in the Lossless Semantic Tree, and coding agents reach it through Moderne’s agent tools. When a recipe covers the change, such as a pyproject.toml dependency upgrade, the agent runs the recipe and every repository gets the same edit. When no recipe covers a change yet, the agent can write one in Python, test it, and run it on every repository. The agent’s tokens go into writing the recipe once, not into editing each repository.
Run Python changes on the same engine as Java.