#133 · Programming Languages Developer Tool

Python Parser

Parse Python source into a searchable structural outline containing imports, classes, functions, decorators, parameters, and line numbers. The browser-based parser does not execute code and can export its findings as JSON.

Developer Input

Source code
levels
Ad space

How to use this developer tool

  1. Paste Python source code.
  2. Choose JSON, outline, or symbol-table output.
  3. Select which symbol types to include.
  4. Click Parse Python.
  5. Copy or download the generated structure.

What this developer tool does

It performs indentation-aware static extraction of common Python declarations. The output is useful for code navigation, documentation, and lightweight dependency review.

Mask strings and comments → scan declarations → read indentation → associate decorators → extract signatures → serialize structure.

Dynamic declarations, unusual multiline signatures, and metaprogramming may not be fully represented.

Example

Input

class Circle:
    def area(self, radius):
        return radius ** 2

Output

Circle
  area(self, radius)

Tips for better output

  • Use JSON output for downstream processing.
  • Use Outline for a compact human-readable summary.
  • Validate highly dynamic code with Python ast tooling.

FAQ

How do I extract all functions from a Python file?

Enable Include functions and run the parser to list function names, signatures, and line numbers.

How can I list Python classes and methods online?

Enable classes and functions; nested methods appear with their indentation level.

How do I generate a Python code outline?

Choose Text Outline and parse the source.

Can I export parsed Python structure as JSON?

Yes. Choose JSON Structure and download the result.

How do I find imports and decorators in Python code?

Keep imports and decorators enabled; they are extracted into separate fields.

Parsed modules

FunctionsName, signature, line
ClassesName, bases, line
ImportsModule and source line
DecoratorsAssociated declaration

Browse more developer tools

Calldeveloper category hub