Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benoitc/gunicorn
/ functions
Functions
4,774 in github.com/benoitc/gunicorn
⨍
Functions
4,774
◇
Types & classes
1,056
↳
Endpoints
130
↓ 3 callers
Method
send_trailers
Send trailing headers on a stream. Trailers are headers sent after the response body, commonly used for gRPC status codes, checksums,
gunicorn/http2/async_connection.py:544
↓ 3 callers
Method
set_accept_enabled
Enable or disable accepting new connections.
gunicorn/workers/gthread.py:292
↓ 3 callers
Method
set_timeout
(self)
gunicorn/workers/gthread.py:119
↓ 3 callers
Method
show_all
Return overview of all processes (arbiter, web workers, dirty arbiter, dirty workers). Returns: Dictionary with complete
gunicorn/ctl/handlers.py:457
↓ 3 callers
Method
show_listeners
Return bound socket information. Returns: Dictionary with listeners list
gunicorn/ctl/handlers.py:195
↓ 3 callers
Method
show_workers
Return list of HTTP workers. Returns: Dictionary with workers list containing: - pid: Worker process ID
gunicorn/ctl/handlers.py:34
↓ 3 callers
Method
shutdown
Signal shutdown and wait for completion. This should be called during graceful shutdown.
gunicorn/asgi/lifespan.py:90
↓ 3 callers
Method
spawn_worker
Spawn a new dirty worker. Worker app assignment follows these priorities: 1. If there are pending respawns (from dead worker
gunicorn/dirty/arbiter.py:935
↓ 3 callers
Function
ssl_context
(conf)
gunicorn/sock.py:267
↓ 3 callers
Method
ssl_context
(config, default_ssl_context_factory)
gunicorn/config.py:2118
↓ 3 callers
Method
wait_for_signals
\ Wait for signals with timeout. Returns a list of signals that were received.
gunicorn/arbiter.py:418
↓ 3 callers
Method
wakeup
Wake up the arbiter's main loop.
gunicorn/arbiter.py:397
↓ 3 callers
Method
worker_add
Increase worker count. Args: count: Number of workers to add (default 1) Returns: Dictionary with a
gunicorn/ctl/handlers.py:227
↓ 3 callers
Method
worker_int
(worker)
gunicorn/config.py:1957
↓ 3 callers
Method
worker_kill
Gracefully terminate a specific worker. Args: pid: Worker process ID Returns: Dictionary with kille
gunicorn/ctl/handlers.py:278
↓ 3 callers
Method
worker_remove
Decrease worker count. Args: count: Number of workers to remove (default 1) Returns: Dictionary wit
gunicorn/ctl/handlers.py:250
↓ 3 callers
Method
write_message
Write a message to socket (sync). Args: sock: Socket to write to message: Message dict with 'type', 'id', an
gunicorn/dirty/protocol.py:560
↓ 3 callers
Function
ws_echo
Echo text messages.
tests/docker/asgi_framework_compat/frameworks/quart_app/app.py:170
↓ 2 callers
Method
__init__
(self)
gunicorn/http/unreader.py:13
↓ 2 callers
Method
__init__
(self, client, name)
gunicorn/dirty/stash.py:350
↓ 2 callers
Method
__init__
(self, message=None, error_code=None)
gunicorn/http2/errors.py:37
↓ 2 callers
Method
__init__
(self, args=None)
tests/test_config.py:38
↓ 2 callers
Method
_buffer_size
Get size of buffered data.
gunicorn/asgi/unreader.py:49
↓ 2 callers
Method
_cancel_task_if_pending
Cancel the task if it's still pending after grace period.
gunicorn/asgi/protocol.py:880
↓ 2 callers
Method
_check_allowed_ip
Verify source IP is in the allowed list.
gunicorn/uwsgi/message.py:70
↓ 2 callers
Function
_check_trusted_proxy
Check if peer address is in the trusted proxy list. Cached at connection start to avoid repeated IP parsing per request.
gunicorn/asgi/protocol.py:52
↓ 2 callers
Method
_close
Close the connection.
gunicorn/dirty/stash.py:128
↓ 2 callers
Method
_conn
(self)
tests/test_http2_async_connection.py:1029
↓ 2 callers
Method
_conn
(self)
tests/test_http2_connection.py:1208
↓ 2 callers
Method
_connection
(self)
tests/test_http2_h2c.py:1237
↓ 2 callers
Method
_convert_h2_headers
Convert ASGI headers to HTTP/2 format (lowercase string names).
gunicorn/asgi/protocol.py:1737
↓ 2 callers
Method
_create_manager
Create a LifespanManager with specific app.
tests/test_asgi_lifespan.py:272
↓ 2 callers
Method
_create_masked_frame
Create a masked WebSocket frame. Args: fin: FIN bit (1 for final, 0 for continuation) opcode: Frame opcode
tests/test_asgi_websocket_protocol.py:929
↓ 2 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_protocol_compat.py:73
↓ 2 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_forwarded_headers.py:39
↓ 2 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_forwarded_headers.py:107
↓ 2 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_forwarded_headers.py:263
↓ 2 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_forwarded_headers.py:366
↓ 2 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_protocol.py:289
↓ 2 callers
Method
_create_protocol
Create a WebSocketProtocol instance for testing.
tests/test_asgi_websocket_protocol.py:919
↓ 2 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_enhanced.py:450
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_forwarded_headers.py:26
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_forwarded_headers.py:96
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_forwarded_headers.py:252
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_forwarded_headers.py:355
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_error_handling.py:223
↓ 2 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_error_handling.py:281
↓ 2 callers
Method
_create_protocol_with_state
Create an ASGIProtocol with worker state.
tests/test_asgi_compliance.py:644
↓ 2 callers
Method
_create_websocket_protocol
Create WebSocketProtocol with mock transport.
tests/test_asgi_protocol_compat.py:763
↓ 2 callers
Method
_extract_request_info
Extract HTTP request info from uWSGI vars. Header Mapping (CGI/WSGI to HTTP): The uWSGI protocol passes HTTP headers using CGI-style
gunicorn/uwsgi/message.py:159
↓ 2 callers
Method
_feed_callback_parser
Feed data to callback parser, handling parse errors. Returns True if parsing should continue, False if connection was closed.
gunicorn/asgi/protocol.py:724
↓ 2 callers
Function
_h2c_available
Whether cleartext HTTP/2 could apply to this server at all.
gunicorn/http2/negotiation.py:56
↓ 2 callers
Method
_handle_http2_request
Handle a single HTTP/2 request with streaming support. Streams both request and response body chunks immediately, avoiding buffering
gunicorn/asgi/protocol.py:1748
↓ 2 callers
Method
_handle_sigchld
Handle SIGCHLD - reap dead workers.
gunicorn/dirty/arbiter.py:398
↓ 2 callers
Method
_handle_websocket
Handle WebSocket upgrade request.
gunicorn/asgi/protocol.py:1098
↓ 2 callers
Method
_is_valid_token
Check if data contains only RFC 9110 token characters.
gunicorn/asgi/parser.py:850
↓ 2 callers
Method
_load_model
Simulate loading a model (expensive operation).
examples/dirty_example/dirty_app.py:51
↓ 2 callers
Method
_make_stream
(self, headers)
tests/test_http2_request.py:377
↓ 2 callers
Method
_on_body
Callback: received body data chunk.
gunicorn/asgi/protocol.py:611
↓ 2 callers
Method
_parse_vars
Parse uWSGI vars block into key-value pairs. Format: key_size (2 bytes LE) + key + val_size (2 bytes LE) + value
gunicorn/uwsgi/message.py:120
↓ 2 callers
Method
_peer_is_trusted_proxy
Whether the peer may set forwarding and scheme headers.
gunicorn/http/message.py:199
↓ 2 callers
Method
_pop_chunk
Pop a chunk and return the appropriate message.
gunicorn/asgi/protocol.py:253
↓ 2 callers
Method
_response_forbids_content_length
(status)
gunicorn/http/wsgi.py:372
↓ 2 callers
Method
_response_forbids_content_length
Per RFC 9110 §6.4.2 a server MUST NOT send Content-Length on 1xx or 204 responses. HEAD and 304 are NOT covered: HEAD MAY include the
gunicorn/asgi/protocol.py:1530
↓ 2 callers
Method
_response_omits_body
(method, status)
gunicorn/http/wsgi.py:362
↓ 2 callers
Method
_restart_after_fork
Restart server in parent after fork (called by fork handler).
gunicorn/ctl/server.py:178
↓ 2 callers
Method
_send_manage_message
Send a worker management message to the dirty arbiter. Args: operation: "add" or "remove" count: Number of w
gunicorn/ctl/handlers.py:350
↓ 2 callers
Method
_send_response_start
Send HTTP response status and headers. Uses cached status lines and headers for common cases to avoid repeated string formatting and
gunicorn/asgi/protocol.py:1439
↓ 2 callers
Method
_shutdown
Initiate async shutdown.
gunicorn/dirty/worker.py:205
↓ 2 callers
Function
_sock_type
(addr)
gunicorn/sock.py:152
↓ 2 callers
Method
_start_worker_consumer
Start a consumer task for a worker's request queue.
gunicorn/dirty/arbiter.py:497
↓ 2 callers
Method
_strip_body_framing_headers
Remove framing headers that must not appear on a no-body response. Transfer-Encoding is always stripped (chunked framing implies a body
gunicorn/asgi/protocol.py:1539
↓ 2 callers
Method
_unregister_worker
Unregister a worker's apps when it exits. Removes the worker from all tracking maps. Args: worker_pid: The PID
gunicorn/dirty/arbiter.py:217
↓ 2 callers
Method
_wait_for_ready
Wait for gunicorn to be ready.
tests/docker/dirty_arbiter/test_parent_death.py:101
↓ 2 callers
Method
add_extra_file
(self, filename)
gunicorn/reloader.py:33
↓ 2 callers
Method
add_watch
(self, dirname, mask=None)
tests/test_reload.py:93
↓ 2 callers
Function
app
(environ, start_response)
gunicorn/util.py:661
↓ 2 callers
Function
assert_readline
(payload, size, expected)
tests/test_http.py:28
↓ 2 callers
Function
base_environ
(cfg)
gunicorn/http/wsgi.py:78
↓ 2 callers
Function
benchmark_arbiter_forwarding
Benchmark arbiter message forwarding throughput.
benchmarks/dirty_streaming.py:248
↓ 2 callers
Function
benchmark_async_client_streaming
Benchmark DirtyAsyncStreamIterator directly. Measures async iterator overhead vs raw message reading.
benchmarks/dirty_streaming.py:465
↓ 2 callers
Function
benchmark_async_vs_sync_client_streaming
Compare stream() vs stream_async() performance with the same workload.
benchmarks/dirty_streaming.py:582
↓ 2 callers
Function
benchmark_streaming_latency
Benchmark time-to-first-chunk and time-to-last-chunk.
benchmarks/dirty_streaming.py:285
↓ 2 callers
Function
benchmark_worker_streaming_throughput
Benchmark worker streaming throughput with various chunk sizes.
benchmarks/dirty_streaming.py:207
↓ 2 callers
Function
cfg_module
()
tests/test_config.py:23
↓ 2 callers
Function
check_environ
A context manager that asserts post-conditions of ``listen_fds`` at exit. This helper is used to ease checking of the test post-conditions f
tests/test_systemd.py:15
↓ 2 callers
Method
close
Close the client connection.
gunicorn/dirty/stash.py:322
↓ 2 callers
Method
close
(self)
tests/docker/per_app_allocation/app.py:152
↓ 2 callers
Function
create
Build the (response, environ) pair for a request. ``response_class`` and ``response_args`` let a protocol supply its own writer: HTTP/2 passe
gunicorn/http/wsgi.py:188
↓ 2 callers
Function
create_arbiter
Create a test arbiter for benchmarks.
benchmarks/dirty_streaming.py:147
↓ 2 callers
Method
create_worker
Create a worker instance for testing.
tests/test_gtornado.py:54
↓ 2 callers
Method
create_worker
Create a worker instance for testing.
tests/test_gtornado.py:92
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:139
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:184
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:226
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:465
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_asgi_worker.py:132
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_asgi_worker.py:228
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:569
↓ 2 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:821
← previous
next →
501–600 of 4,774, ranked by callers