How rivoraecosystem/riven works
Riven is a Python HTTP/3 server with RCP as its native application interface and ASGI compatibility. Its principal workflow configures an application and TLS/listening options, starts the server, handles HTTP/3 requests through application-facing streams, and returns responses over QUIC. The repository also includes lifespan management and optional WebTransport sessions and streams. Evidence is limited to the README, source index references, and sampled excerpts; unsampled implementation details are not inferred.
Main entry points: _protocol.py HTTP/3 protocol adapter · server.py Server and shutdown · _session_wt.py WebTransport session · _config.py Server configuration
Components 18
Startup and lifecycle
- CLI and runner
riven/main.py - Server configuration
riven/_config.py - Server and shutdown
riven/server.py - App lifespan
riven/lifespan/lifespan.py
HTTP/3 handling
- HTTP/3 protocol adapter
riven/protocol_h3/_protocol.py - HTTP application stream
riven/protocol_h3/_stream_h3.py - HTTP/3 protocol helpers
riven/protocol_h3/h3_protocol.py - Connection utilities
riven/protocol_h3/_connection_utils.py - Protocol events
riven/protocol_h3/events.py
WebTransport
- WebTransport capsules
riven/protocol_h3/capsules.py - WebTransport session
riven/protocol_h3/_session_wt.py - WebTransport streams
riven/protocol_h3/_stream_wt.py
Runtime support
- Protocol errors
riven/protocol_h3/error.py - Runtime exceptions
riven/exceptions/exceptions.py - Event loop selection
riven/loop/auto.py - Logging and colors
riven/logger/colors.py
Other components
- Server operator
- RCP or ASGI app
Connections 23
- Server operator → CLI and runner: configures and starts
README.md - CLI and runner → Server configuration: builds
riven/main.py - CLI and runner → Server and shutdown: starts
riven/main.py - Server and shutdown → Server configuration: reads settings
riven/server.py - Server and shutdown → HTTP/3 protocol adapter: creates protocol
riven/server.py - Server and shutdown → App lifespan: manages lifecycle
riven/server.py - Server configuration → RCP or ASGI app: loads app
riven/_config.py - Server configuration → Event loop selection: selects loop
riven/_config.py - App lifespan → Server configuration: loads app settings
riven/lifespan/lifespan.py - App lifespan → RCP or ASGI app: dispatches lifespan
riven/lifespan/lifespan.py - HTTP/3 protocol adapter → HTTP application stream: dispatches streams
riven/protocol_h3/_protocol.py - HTTP application stream → RCP or ASGI app: invokes app
riven/protocol_h3/_stream_h3.py - HTTP application stream → HTTP/3 protocol adapter: sends response data
riven/protocol_h3/_stream_h3.py - HTTP/3 protocol adapter → Connection utilities: uses helpers
riven/protocol_h3/_stream_h3.py - HTTP/3 protocol adapter → HTTP/3 protocol helpers: uses protocol helpers
riven/protocol_h3/_protocol.py - HTTP/3 protocol adapter → WebTransport session: dispatches sessions
riven/protocol_h3/_protocol.py - WebTransport session → WebTransport streams: creates streams
riven/protocol_h3/_session_wt.py - WebTransport streams → WebTransport session: uses session state
riven/protocol_h3/_stream_wt.py - WebTransport session → WebTransport capsules: uses capsules
riven/protocol_h3/_session_wt.py - HTTP/3 protocol helpers → WebTransport capsules: uses capsules
riven/protocol_h3/h3_protocol.py - HTTP/3 protocol adapter → Runtime exceptions: raises protocol errors
riven/protocol_h3/_protocol.py - WebTransport session → Protocol errors: uses error codes
riven/protocol_h3/_session_wt.py - Server and shutdown → Logging and colors: formats startup logs
riven/server.py