# nelsonseth/python-explorer architecture

> Architecture diagram of the GitHub repository nelsonseth/python-explorer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nelsonseth/python-explorer
- Repository: https://github.com/nelsonseth/python-explorer

## Overview

Python Explorer is a browser-based interface for discovering installed Python packages and inspecting their members, documentation, signatures, and class inheritance. The main workflow runs from package selection through import and interactive exploration, with search, navigation, and a separate class-graph view. The sampled callbacks show the exploration and display coordination; several layout and callback details are only represented by their enclosing module paths because their source was not sampled.

Main entry points: [`src/python_explorer/utils/callbacks.py`](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py) (Interaction Callbacks), [`src/python_explorer/layouts/main_page.py`](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/main_page.py) (Page Layout), [`src/python_explorer/utils/app.py`](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/app.py) (App Server), [`src/python_explorer/layouts/body_right_cyto.py`](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_right_cyto.py) (Class Graph Panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and UI"]
  node_cli["CLI<br/>[__init__.py]"]
  node_app["App Server<br/>[app.py]"]
  node_page["Page Layout<br/>[main_page.py]"]
end

subgraph group_discovery["Package Discovery"]
  node_envdata["Environment Catalog<br/>[envdata.py]"]
end

subgraph group_exploration["Object Exploration"]
  node_callbacks["Interaction Callbacks<br/>[callbacks.py]"]
  node_imports["Module Imports<br/>[callbacks.py]"]
  node_explore["Explore State<br/>[explore.py]"]
  node_search["Member Search<br/>[callbacks.py]"]
  node_navigation["Navigation History<br/>[explore.py]"]
  node_member_metadata["Member Metadata<br/>[explore.py]"]
  node_class_data["Class Heritage<br/>[explore.py]"]
end

subgraph group_presentation["Exploration Views"]
  node_header["Package Header<br/>[header.py]"]
  node_member_panel["Member Panel<br/>[body_left.py]"]
  node_member_info["Member Details"]
  node_class_panel["Class Graph Panel<br/>[body_right_cyto.py]"]
  node_layout_helpers["Layout Helpers<br/>[layout_utils.py]"]
  node_cyto_helpers["Graph Helpers<br/>[cyto_utils.py]"]
  node_stores["UI State Stores<br/>[stores.py]"]
end

node_operator(("User"))
node_runtime(("Python Environment"))
node_browser(("Browser"))

node_operator -->|"launches"| node_cli
node_cli -->|"calls run"| node_app
node_app -->|"sets layout"| node_page
node_app -->|"registers callbacks"| node_callbacks
node_app -->|"opens interface"| node_browser
node_operator -->|"selects and explores"| node_browser
node_page -->|"embeds"| node_header
node_page -->|"embeds"| node_member_panel
node_page -->|"embeds"| node_member_info
node_page -->|"embeds"| node_class_panel
node_page -->|"embeds"| node_stores
node_header -->|"reads catalog"| node_envdata
node_envdata -->|"inspects packages"| node_runtime
node_callbacks -->|"requests import"| node_imports
node_imports -->|"imports module"| node_runtime
node_callbacks -->|"creates or restores"| node_explore
node_explore -->|"inspects objects"| node_runtime
node_callbacks -->|"filters members"| node_search
node_callbacks -->|"updates exploration"| node_navigation
node_callbacks -->|"requests details"| node_member_metadata
node_callbacks -->|"requests inheritance"| node_class_data
node_callbacks -->|"builds graph display"| node_cyto_helpers
node_browser -->|"dispatches interactions"| node_callbacks
node_callbacks -->|"updates member list"| node_member_panel
node_callbacks -->|"updates details"| node_member_info
node_callbacks -->|"updates class view"| node_class_panel
node_callbacks -->|"updates state"| node_stores
node_class_panel -->|"uses layout options"| node_cyto_helpers
node_header -->|"uses components"| node_layout_helpers
node_member_panel -->|"uses components"| node_layout_helpers
node_member_info -->|"uses components"| node_layout_helpers
node_class_panel -->|"uses components"| node_layout_helpers

click node_cli "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/cli/__init__.py"
click node_app "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/app.py"
click node_page "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/main_page.py"
click node_header "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/header.py"
click node_member_panel "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_left.py"
click node_member_info "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_right_members.py"
click node_class_panel "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_right_cyto.py"
click node_layout_helpers "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/layout_utils.py"
click node_cyto_helpers "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/cyto_utils.py"
click node_stores "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/stores.py"
click node_callbacks "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py"
click node_envdata "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/envdata.py"
click node_imports "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py"
click node_explore "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py"
click node_search "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py"
click node_navigation "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py"
click node_member_metadata "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py"
click node_class_data "https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_app,node_page,node_operator,node_browser toneBlue
class node_envdata toneAmber
class node_callbacks,node_imports,node_explore,node_search,node_navigation,node_member_metadata,node_class_data toneMint
class node_header,node_member_panel,node_member_info,node_class_panel,node_layout_helpers,node_cyto_helpers,node_stores toneRose
class node_runtime toneIndigo
```

## Components

### Launch and UI

- [CLI](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/cli/__init__.py): `src/python_explorer/cli/__init__.py`
- [App Server](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/app.py): `src/python_explorer/utils/app.py`
- [Page Layout](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/main_page.py): `src/python_explorer/layouts/main_page.py`

### Package Discovery

- [Environment Catalog](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/envdata.py): `src/python_explorer/utils/envdata.py`

### Object Exploration

- [Interaction Callbacks](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py): `src/python_explorer/utils/callbacks.py`
- [Module Imports](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py): `src/python_explorer/utils/callbacks.py`
- [Explore State](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py): `src/python_explorer/utils/explore.py`
- [Member Search](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/callbacks.py): `src/python_explorer/utils/callbacks.py`
- [Navigation History](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py): `src/python_explorer/utils/explore.py`
- [Member Metadata](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py): `src/python_explorer/utils/explore.py`
- [Class Heritage](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/utils/explore.py): `src/python_explorer/utils/explore.py`

### Exploration Views

- [Package Header](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/header.py): `src/python_explorer/layouts/header.py`
- [Member Panel](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_left.py): `src/python_explorer/layouts/body_left.py`
- [Member Details](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_right_members.py): `src/python_explorer/layouts/body_right_members.py`
- [Class Graph Panel](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/body_right_cyto.py): `src/python_explorer/layouts/body_right_cyto.py`
- [Layout Helpers](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/layout_utils.py): `src/python_explorer/layouts/layout_utils.py`
- [Graph Helpers](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/cyto_utils.py): `src/python_explorer/layouts/cyto_utils.py`
- [UI State Stores](https://github.com/nelsonseth/python-explorer/blob/main/src/python_explorer/layouts/stores.py): `src/python_explorer/layouts/stores.py`

### Other components

- **User**
- **Python Environment**
- **Browser**

## Connections

- User → CLI: launches
- CLI → App Server: calls run
- App Server → Page Layout: sets layout
- App Server → Interaction Callbacks: registers callbacks
- App Server → Browser: opens interface
- User → Browser: selects and explores
- Page Layout → Package Header: embeds
- Page Layout → Member Panel: embeds
- Page Layout → Member Details: embeds
- Page Layout → Class Graph Panel: embeds
- Page Layout → UI State Stores: embeds
- Package Header → Environment Catalog: reads catalog
- Environment Catalog → Python Environment: inspects packages
- Interaction Callbacks → Module Imports: requests import
- Module Imports → Python Environment: imports module
- Interaction Callbacks → Explore State: creates or restores
- Explore State → Python Environment: inspects objects
- Interaction Callbacks → Member Search: filters members
- Interaction Callbacks → Navigation History: updates exploration
- Interaction Callbacks → Member Metadata: requests details
- Interaction Callbacks → Class Heritage: requests inheritance
- Interaction Callbacks → Graph Helpers: builds graph display
- Browser → Interaction Callbacks: dispatches interactions
- Interaction Callbacks → Member Panel: updates member list
- Interaction Callbacks → Member Details: updates details
- Interaction Callbacks → Class Graph Panel: updates class view
- Interaction Callbacks → UI State Stores: updates state
- Class Graph Panel → Graph Helpers: uses layout options
- Package Header → Layout Helpers: uses components
- Member Panel → Layout Helpers: uses components
- Member Details → Layout Helpers: uses components
- Class Graph Panel → Layout Helpers: uses components
