# qgb/qpsu architecture

> Architecture diagram of the GitHub repository qgb/qpsu, 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/qgb/qpsu
- Repository: https://github.com/qgb/qpsu

## Overview

QPSU is a Python utility library, not a single-purpose application. Its documented entry workflow is importing the top-level package to access the U/T/N/F utility modules, then using those helpers in a caller’s Python work. The main domains are general utilities, text, files, and networking; network support includes HTTP, async networking, browser control, and server/proxy modules. The tree also exposes platform and third-party convenience modules. Source excerpts are partial, so the graph omits uncertain wiring and treats several tree-supported subsystems as capabilities rather than asserted call chains.

Main entry points: [`__init__.py`](https://github.com/qgb/qpsu/blob/master/__init__.py) (QPSU package), [`N/__init__.py`](https://github.com/qgb/qpsu/blob/master/N/__init__.py) (Network core), [`U.py`](https://github.com/qgb/qpsu/blob/master/U.py) (General utilities), [`F.py`](https://github.com/qgb/qpsu/blob/master/F.py) (File utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core utilities"]
  node_package["QPSU package<br/>[__init__.py]"]
  node_py["Core wrapper<br/>[py.py]"]
  node_utils["General utilities<br/>[U.py]"]
  node_text["Text utilities<br/>[T.py]"]
  node_files["File utilities<br/>[F.py]"]
  node_process_state[("Process state<br/>[U.py]")]
end

subgraph group_network["Network utilities"]
  node_network_core["Network core<br/>[__init__.py]"]
  node_http["HTTP requests<br/>[HTTP.py]"]
  node_async_net["Async networking<br/>[ahttp.py]"]
  node_dns["Async DNS<br/>[async_dns.py]"]
  node_browser["Browser control<br/>[browser.py]"]
  node_websocket["WebSocket services"]
  node_proxy["WebSocket proxy<br/>[websocket_proxy.py]"]
  node_webserver["HTTP server<br/>[HTTPServer.py]"]
end

subgraph group_integrations["Platform integrations"]
  node_windows["Windows helpers<br/>[__init__.py]"]
  node_clipboard["Clipboard support<br/>[Clipboard.py]"]
  node_android["Android helpers<br/>[Android.py]"]
end

subgraph group_addons["Convenience modules"]
  node_adb["ADB integration<br/>[adb.py]"]
  node_appium["Appium integration<br/>[appium.py]"]
  node_taobao["Taobao backend<br/>[taobao.py]"]
end

node_developer(("Python caller"))

node_developer -->|"imports"| node_package
node_package -->|"exposes"| node_py
node_package -->|"exposes"| node_utils
node_package -->|"exposes"| node_text
node_package -->|"exposes"| node_network_core
node_package -->|"exposes"| node_files
node_developer -->|"uses"| node_utils
node_developer -->|"uses"| node_text
node_developer -->|"uses"| node_files
node_developer -->|"uses"| node_network_core
node_utils -->|"reads/writes"| node_process_state
node_network_core -->|"reads"| node_files
node_network_core -->|"calls"| node_http
node_developer -->|"uses"| node_async_net
node_developer -->|"uses"| node_dns
node_developer -->|"uses"| node_browser
node_developer -->|"uses"| node_websocket
node_developer -->|"uses"| node_proxy
node_developer -->|"uses"| node_webserver
node_developer -->|"uses"| node_windows
node_developer -->|"uses"| node_clipboard
node_developer -->|"uses"| node_android
node_developer -->|"uses"| node_adb
node_developer -->|"uses"| node_appium
node_developer -->|"uses"| node_taobao

click node_package "https://github.com/qgb/qpsu/blob/master/__init__.py"
click node_py "https://github.com/qgb/qpsu/blob/master/py.py"
click node_utils "https://github.com/qgb/qpsu/blob/master/U.py"
click node_text "https://github.com/qgb/qpsu/blob/master/T.py"
click node_files "https://github.com/qgb/qpsu/blob/master/F.py"
click node_network_core "https://github.com/qgb/qpsu/blob/master/N/__init__.py"
click node_http "https://github.com/qgb/qpsu/blob/master/N/HTTP.py"
click node_async_net "https://github.com/qgb/qpsu/blob/master/N/ahttp.py"
click node_dns "https://github.com/qgb/qpsu/blob/master/N/async_dns.py"
click node_browser "https://github.com/qgb/qpsu/blob/master/N/browser.py"
click node_websocket "https://github.com/qgb/qpsu/blob/master/N/websocket_server.py"
click node_proxy "https://github.com/qgb/qpsu/blob/master/N/websocket_proxy.py"
click node_webserver "https://github.com/qgb/qpsu/blob/master/N/HTTPServer.py"
click node_windows "https://github.com/qgb/qpsu/blob/master/Win/__init__.py"
click node_clipboard "https://github.com/qgb/qpsu/blob/master/Clipboard.py"
click node_android "https://github.com/qgb/qpsu/blob/master/Android.py"
click node_adb "https://github.com/qgb/qpsu/blob/master/adb.py"
click node_appium "https://github.com/qgb/qpsu/blob/master/appium.py"
click node_taobao "https://github.com/qgb/qpsu/blob/master/N/Backend/taobao.py"
click node_process_state "https://github.com/qgb/qpsu/blob/master/U.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_package,node_py,node_utils,node_text,node_files,node_process_state toneBlue
class node_network_core,node_http,node_async_net,node_dns,node_browser,node_websocket,node_proxy,node_webserver toneAmber
class node_windows,node_clipboard,node_android toneMint
class node_adb,node_appium,node_taobao toneRose
class node_developer toneIndigo
```

## Components

### Core utilities

- [QPSU package](https://github.com/qgb/qpsu/blob/master/__init__.py): `__init__.py`
- [Core wrapper](https://github.com/qgb/qpsu/blob/master/py.py): `py.py`
- [General utilities](https://github.com/qgb/qpsu/blob/master/U.py): `U.py`
- [Text utilities](https://github.com/qgb/qpsu/blob/master/T.py): `T.py`
- [File utilities](https://github.com/qgb/qpsu/blob/master/F.py): `F.py`
- [Process state](https://github.com/qgb/qpsu/blob/master/U.py): `U.py`

### Network utilities

- [Network core](https://github.com/qgb/qpsu/blob/master/N/__init__.py): `N/__init__.py`
- [HTTP requests](https://github.com/qgb/qpsu/blob/master/N/HTTP.py): `N/HTTP.py`
- [Async networking](https://github.com/qgb/qpsu/blob/master/N/ahttp.py): `N/ahttp.py`
- [Async DNS](https://github.com/qgb/qpsu/blob/master/N/async_dns.py): `N/async_dns.py`
- [Browser control](https://github.com/qgb/qpsu/blob/master/N/browser.py): `N/browser.py`
- [WebSocket services](https://github.com/qgb/qpsu/blob/master/N/websocket_server.py): `N/websocket_server.py`
- [WebSocket proxy](https://github.com/qgb/qpsu/blob/master/N/websocket_proxy.py): `N/websocket_proxy.py`
- [HTTP server](https://github.com/qgb/qpsu/blob/master/N/HTTPServer.py): `N/HTTPServer.py`

### Platform integrations

- [Windows helpers](https://github.com/qgb/qpsu/blob/master/Win/__init__.py): `Win/__init__.py`
- [Clipboard support](https://github.com/qgb/qpsu/blob/master/Clipboard.py): `Clipboard.py`
- [Android helpers](https://github.com/qgb/qpsu/blob/master/Android.py): `Android.py`

### Convenience modules

- [ADB integration](https://github.com/qgb/qpsu/blob/master/adb.py): `adb.py`
- [Appium integration](https://github.com/qgb/qpsu/blob/master/appium.py): `appium.py`
- [Taobao backend](https://github.com/qgb/qpsu/blob/master/N/Backend/taobao.py): `N/Backend/taobao.py`

### Other components

- **Python caller**

## Connections

- Python caller → QPSU package: imports
- QPSU package → Core wrapper: exposes
- QPSU package → General utilities: exposes
- QPSU package → Text utilities: exposes
- QPSU package → Network core: exposes
- QPSU package → File utilities: exposes
- Python caller → General utilities: uses
- Python caller → Text utilities: uses
- Python caller → File utilities: uses
- Python caller → Network core: uses
- General utilities → Process state: reads/writes
- Network core → File utilities: reads
- Network core → HTTP requests: calls
- Python caller → Async networking: uses
- Python caller → Async DNS: uses
- Python caller → Browser control: uses
- Python caller → WebSocket services: uses
- Python caller → WebSocket proxy: uses
- Python caller → HTTP server: uses
- Python caller → Windows helpers: uses
- Python caller → Clipboard support: uses
- Python caller → Android helpers: uses
- Python caller → ADB integration: uses
- Python caller → Appium integration: uses
- Python caller → Taobao backend: uses
