How szeka9/pyrobusta works
PyRobusta is a memory-conscious MicroPython HTTP/1.1 server. Its main workflow starts with application configuration and optional feature setup, accepts client sockets, processes requests through a buffered HTTP state machine, dispatches routes, and streams responses. The graph also preserves documented security, multipart, and file-server capabilities. Some feature-to-engine wiring is unsampled, so those relationships are omitted or marked unverified rather than inferred as direct calls.
Main entry points: application.py Application runner · http.py HTTP state machine · http_connection.py HTTP connection · http_basic_auth.py Basic authentication
Components 20
Application startup
- Application runner
src/pyrobusta/application.py - Configuration
src/pyrobusta/utils/config.py
Connections and buffers
- Socket server
src/pyrobusta/server/http_server.py - HTTP connection
src/pyrobusta/bindings/http_connection.py - Transport connection
src/pyrobusta/transport/connection.py - Fixed-size buffers
src/pyrobusta/stream/buffer.py
HTTP processing
- HTTP state machine
src/pyrobusta/protocol/http.py - Route dispatch
src/pyrobusta/protocol/http.py
HTTP features
- Multipart handling
src/pyrobusta/protocol/http_multipart.py - File API
src/pyrobusta/protocol/http_file_server.py - Web assets
src/pyrobusta/utils/assets.py - Basic authentication
src/pyrobusta/protocol/http_basic_auth.py - Signed cookies
src/pyrobusta/protocol/http_cookie.py - Browser security
src/pyrobusta/protocol/http_security.py
Security and utilities
- Users and roles
src/pyrobusta/utils/iam.py - Cryptography
src/pyrobusta/utils/crypto.py - Path handling
src/pyrobusta/utils/lexpath.py - Logging
src/pyrobusta/utils/logging.py
Other components
- HTTP client
- TLS runtime
Connections 28
- Application runner → Configuration: loads
src/pyrobusta/application.py - Application runner → HTTP state machine: configures
src/pyrobusta/application.py - Application runner → Socket server: starts
src/pyrobusta/application.py - Application runner → Users and roles: loads when enabled
src/pyrobusta/application.py - Application runner → Multipart handling: patches when enabled
src/pyrobusta/application.py - Application runner → Basic authentication: patches when enabled
src/pyrobusta/application.py - Application runner → File API: patches when enabled
src/pyrobusta/application.py - Application runner → Browser security: patches when enabled
src/pyrobusta/application.py - Application runner → TLS runtime: configures when enabled
src/pyrobusta/application.py - HTTP client → Socket server: opens connection
src/pyrobusta/server/http_server.py - Socket server → HTTP connection: creates
src/pyrobusta/server/http_server.py - Socket server → Fixed-size buffers: reserves pools
src/pyrobusta/server/http_server.py - HTTP connection → Transport connection: extends
src/pyrobusta/bindings/http_connection.py - HTTP connection → HTTP state machine: runs parser
src/pyrobusta/bindings/http_connection.py - HTTP connection → Fixed-size buffers: reads and writes
src/pyrobusta/bindings/http_connection.py - HTTP state machine → Fixed-size buffers: parses request bytes
src/pyrobusta/protocol/http.py - HTTP state machine → Route dispatch: dispatches routes
README.md - HTTP state machine → Path handling: uses path parsing
src/pyrobusta/protocol/http.py - HTTP connection → HTTP client: streams response
src/pyrobusta/bindings/http_connection.py - Basic authentication → Users and roles: checks user and roles
src/pyrobusta/protocol/http_basic_auth.py - Basic authentication → Signed cookies: uses sessions and CSRF
src/pyrobusta/protocol/http_basic_auth.py - Basic authentication → Cryptography: verifies credentials
src/pyrobusta/protocol/http_basic_auth.py - Users and roles → Cryptography: hashes passwords
src/pyrobusta/utils/iam.py - Users and roles → Path handling: parses role paths
src/pyrobusta/utils/iam.py - Signed cookies → Cryptography: signs tokens
src/pyrobusta/protocol/http_cookie.py - File API → Web assets: serves installed assets
src/pyrobusta/protocol/http_file_server.py - File API → Path handling: validates paths
src/pyrobusta/protocol/http_file_server.py - HTTP state machine → Multipart handling: parses multipart bodies