How tornadoweb/tornado works
Tornado is both a Python web framework and an asynchronous networking library. Its principal workflow accepts a network request, parses HTTP data, dispatches through application routing to a handler, and returns a response; its client API also issues asynchronous HTTP requests. The graph preserves documented WebSockets, authentication, templates, and locale support alongside the event-loop, transport, and client layers. Relationships use README statements or SOURCE INDEX references; unsampled implementation details are not inferred beyond those references.
Main entry points: httpclient.py HTTP client API · httpserver.py HTTP server · simple_httpclient.py Simple HTTP client · ioloop.py Event loop
Components 27
Web framework
- Web application
tornado/web.py - Request routing
tornado/routing.py - Request handlers
tornado/web.py - WebSockets
tornado/websocket.py - Authentication
tornado/auth.py - Templates
tornado/template.py - Localization
tornado/locale.py
HTTP transport
- HTTP server
tornado/httpserver.py - HTTP/1 connection
tornado/http1connection.py - HTTP messages
tornado/httputil.py - Stream I/O
tornado/iostream.py - TCP server
tornado/tcpserver.py - Network utilities
tornado/netutil.py
Async runtime
- Event loop
tornado/ioloop.py - Coroutine support
tornado/gen.py - Future utilities
tornado/concurrent.py - Asyncio bridge
tornado/platform/asyncio.py - Async locks
tornado/locks.py - Async queues
tornado/queues.py - Process management
tornado/process.py
HTTP clients
- HTTP client API
tornado/httpclient.py - Simple HTTP client
tornado/simple_httpclient.py - Curl HTTP client
tornado/curl_httpclient.py
Framework support
- Encoding utilities
tornado/escape.py - Configuration options
tornado/options.py - Logging
tornado/log.py
Other components
- Application user
Connections 43
- Application user → Web application: configures routes
- Application user → HTTP server: sends requests
- Web application → Request handlers: registers handlers
tornado/web.py - Web application → HTTP server: listens via
tornado/web.py - Web application → Request routing: uses routing
tornado/web.py - Request handlers → Templates: uses templates
tornado/web.py - Request handlers → Localization: uses localization
tornado/web.py - Request handlers → Authentication: supports authentication
tornado/auth.py - HTTP server → HTTP/1 connection: creates connections
tornado/httpserver.py - HTTP server → TCP server: uses TCP server
tornado/httpserver.py - HTTP server → HTTP messages: uses HTTP messages
tornado/httpserver.py - HTTP server → Stream I/O: uses streams
tornado/httpserver.py - HTTP server → Network utilities: uses networking
tornado/httpserver.py - HTTP/1 connection → HTTP messages: uses HTTP messages
tornado/http1connection.py - HTTP/1 connection → Stream I/O: uses streams
tornado/http1connection.py - TCP server → Network utilities: uses networking
tornado/tcpserver.py - Stream I/O → Event loop: registers I/O
tornado/iostream.py - WebSockets → Stream I/O: uses streams
tornado/websocket.py - WebSockets → HTTP client API: uses HTTP client
tornado/websocket.py - WebSockets → Async queues: uses queues
tornado/websocket.py - Event loop → Asyncio bridge: integrates with
tornado/ioloop.py - Coroutine support → Event loop: schedules coroutines
tornado/gen.py - Coroutine support → Future utilities: uses futures
tornado/gen.py - Async locks → Coroutine support: uses coroutines
tornado/locks.py - Async queues → Async locks: uses locks
tornado/queues.py - Process management → Event loop: uses event loop
tornado/process.py - Process management → Future utilities: uses futures
tornado/process.py - HTTP client API → Simple HTTP client: selects implementation
tornado/httpclient.py - HTTP client API → HTTP messages: uses HTTP messages
tornado/httpclient.py - HTTP client API → Event loop: uses event loop
tornado/httpclient.py - Simple HTTP client → HTTP/1 connection: uses HTTP connection
tornado/simple_httpclient.py - Simple HTTP client → HTTP messages: uses HTTP messages
tornado/simple_httpclient.py - Simple HTTP client → Stream I/O: uses streams
tornado/simple_httpclient.py - Simple HTTP client → Network utilities: uses networking
tornado/simple_httpclient.py - Simple HTTP client → HTTP client API: implements interface
tornado/simple_httpclient.py - Curl HTTP client → HTTP client API: implements interface
tornado/curl_httpclient.py - Curl HTTP client → Event loop: uses event loop
tornado/curl_httpclient.py - Authentication → HTTP client API: makes HTTP requests
tornado/auth.py - Authentication → Request handlers: uses web framework
tornado/auth.py - Templates → Encoding utilities: uses escaping
tornado/template.py - Localization → Encoding utilities: uses escaping
tornado/locale.py - Localization → Logging: uses logging
tornado/locale.py - HTTP client API → Configuration options: uses options
tornado/httpclient.py