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
↓ 4 callers
Function
load_dirty_apps
Load multiple dirty apps from a list of import paths. Args: import_paths: List of import path strings Returns: dict: Ma
gunicorn/dirty/app.py:281
↓ 4 callers
Function
make_asgi_protocol
(cfg, loop)
tests/test_http2_h2c.py:516
↓ 4 callers
Function
make_request
Build a request message dict. Args: request_id: Unique request identifier (int or str) app_path: Import path of the dirty ap
gunicorn/dirty/protocol.py:655
↓ 4 callers
Function
make_response
Build a success response message dict. Args: request_id: Request identifier this responds to result: Result value Retur
gunicorn/dirty/protocol.py:680
↓ 4 callers
Method
manage_workers
\ Maintain the number of workers by spawning or killing as required.
gunicorn/arbiter.py:695
↓ 4 callers
Method
read_body_chunk
Read next body chunk asynchronously for streaming. Returns: bytes: Next chunk of body data, or None if body is complete.
gunicorn/http2/stream.py:301
↓ 4 callers
Method
receive_trailers
Process received trailing headers. Args: trailers: List of (name, value) tuples
gunicorn/http2/stream.py:161
↓ 4 callers
Method
remaining
Bytes fed after the completed message (b'' if none or not complete). Matches the accessor H1CProtocol gained in 0.6.8, so a caller does not
gunicorn/asgi/parser.py:234
↓ 4 callers
Method
send_bytes
(self)
tests/treq.py:110
↓ 4 callers
Method
send_data
Send data on a stream. Args: stream_id: The stream ID data: Body data bytes end_stream: Whether this ends
gunicorn/http2/async_connection.py:501
↓ 4 callers
Function
sent_data
(conn)
tests/test_http2_response.py:25
↓ 4 callers
Method
should_close
(self)
gunicorn/http/wsgi.py:318
↓ 4 callers
Method
should_close
Determine if the connection should be closed after this request.
gunicorn/uwsgi/message.py:227
↓ 4 callers
Method
should_close
(self)
tests/test_early_hints.py:69
↓ 4 callers
Method
spawn_dirty_arbiter
\ Spawn the dirty arbiter process. The dirty arbiter manages a separate pool of workers for long-running, blocking operations
gunicorn/arbiter.py:878
↓ 4 callers
Method
spawn_worker
(self)
gunicorn/arbiter.py:727
↓ 4 callers
Method
wait_closed
(self)
tests/test_dirty_integration.py:51
↓ 4 callers
Method
wait_for_and_dispatch_events
Wait for events and dispatch callbacks.
gunicorn/workers/gthread.py:389
↓ 4 callers
Method
wait_for_data
Wait for data to be available on the socket. Uses selectors to wait for the socket to become readable within the given timeout. This
gunicorn/workers/gthread.py:123
↓ 4 callers
Method
wait_for_no_gunicorn
Wait until no gunicorn processes are running.
tests/docker/dirty_arbiter/test_parent_death.py:243
↓ 3 callers
Method
__new__
(cls, name, bases, attrs)
gunicorn/config.py:265
↓ 3 callers
Method
_apply_header_policy
Apply per-header policy shared between Python and fast parsers. Mutates ``self._expected_100_continue`` and ``self.scheme`` as needed.
gunicorn/http/message.py:218
↓ 3 callers
Method
_build_masked_frame
Build a client-to-server masked WebSocket frame.
tests/test_asgi_protocol_compat.py:673
↓ 3 callers
Method
_cancel_keepalive_timer
Cancel keepalive timer when new request arrives.
gunicorn/asgi/protocol.py:820
↓ 3 callers
Method
_cfg
(self, mode)
tests/test_http2_h2c.py:710
↓ 3 callers
Method
_close_async
Close the async connection.
gunicorn/dirty/client.py:307
↓ 3 callers
Method
_conn
(self)
tests/test_http2_connection.py:1264
↓ 3 callers
Method
_create_mock_http2_request
Create a mock HTTP/2 request with priority.
tests/test_asgi_compliance.py:573
↓ 3 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_protocol_compat.py:232
↓ 3 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:38
↓ 3 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_compliance.py:656
↓ 3 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_protocol_compat.py:217
↓ 3 callers
Method
_create_protocol
Create WebSocketProtocol with mock transport.
tests/test_asgi_protocol_compat.py:579
↓ 3 callers
Method
_create_protocol
Create WebSocketProtocol with mock transport.
tests/test_asgi_protocol_compat.py:656
↓ 3 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:25
↓ 3 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_enhanced.py:65
↓ 3 callers
Method
_create_protocol
Create a WebSocketProtocol with optional subprotocols.
tests/test_asgi_websocket_enhanced.py:140
↓ 3 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_enhanced.py:201
↓ 3 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:562
↓ 3 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_error_handling.py:27
↓ 3 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_error_handling.py:127
↓ 3 callers
Function
_get_h1c
Lazily import gunicorn_h1c if available.
tests/treq_asgi.py:42
↓ 3 callers
Method
_handle_http2_connection
Handle an HTTP/2 connection. ``upgrade`` is set when the connection arrives over Upgrade: h2c and carries ``(settings, http1_req, bod
gunicorn/asgi/protocol.py:1651
↓ 3 callers
Function
_ip_in_allow_list
Check if IP address is in the allow list. Args: ip_str: The IP address string to check allow_list: The original allow list (strin
gunicorn/http/message.py:160
↓ 3 callers
Method
_parser
(self, parser)
tests/test_http2_h2c.py:996
↓ 3 callers
Method
_peer_trusted_for_forwarded
Return the (secure_scheme_headers, forwarder_headers) the peer is allowed to set. When the peer's address is not in ``forwarded_allow_ips`` (
gunicorn/http/message.py:206
↓ 3 callers
Method
_reset_buffer
Reset buffer for reuse instead of creating new BytesIO.
gunicorn/asgi/unreader.py:36
↓ 3 callers
Method
_send_frame
Send a WebSocket frame. Server frames are not masked (RFC 6455).
gunicorn/asgi/websocket.py:394
↓ 3 callers
Method
_shutdown
Initiate async shutdown.
gunicorn/dirty/arbiter.py:338
↓ 3 callers
Method
_start_http1
Commit to HTTP/1.x and replay anything already read. Called straight from connection_made(), and again when h2c sniffing gives up on
gunicorn/asgi/protocol.py:448
↓ 3 callers
Method
_stop_for_fork
Stop server before fork (called by fork handler).
gunicorn/ctl/server.py:147
↓ 3 callers
Method
_v2_header
(fam_proto, addr_payload)
tests/test_asgi_proxy_protocol.py:53
↓ 3 callers
Method
_wait_for_flow_control_window
Wait for flow control window to become positive. Returns: int: Available window size, or -1 if waiting failed
gunicorn/http2/connection.py:532
↓ 3 callers
Method
_wake_waiter
Wake up any pending receive() call.
gunicorn/asgi/protocol.py:209
↓ 3 callers
Method
_worker_monitor
Periodically check worker health and manage pool.
gunicorn/dirty/arbiter.py:383
↓ 3 callers
Function
app
WSGI application that demonstrates dirty worker integration.
examples/dirty_example/wsgi_app.py:30
↓ 3 callers
Method
can_sendfile
(self)
gunicorn/http/wsgi.py:493
↓ 3 callers
Method
chdir
(self)
gunicorn/app/base.py:83
↓ 3 callers
Method
check_config
Validate configuration for ASGI worker.
gunicorn/workers/gasgi.py:42
↓ 3 callers
Method
close
(self)
gunicorn/http/wsgi.py:547
↓ 3 callers
Method
close
(self)
gunicorn/workers/workertmp.py:52
↓ 3 callers
Method
close_async
Close the async connection.
gunicorn/dirty/client.py:318
↓ 3 callers
Method
connect
(self)
tests/docker/asgi_framework_compat/frameworks/django_app/consumers.py:41
↓ 3 callers
Function
create_worker
Create a test worker for benchmarks.
benchmarks/dirty_streaming.py:124
↓ 3 callers
Method
create_worker
Create a worker for testing.
tests/test_gtornado.py:347
↓ 3 callers
Method
create_worker
Create a worker for testing.
tests/test_asgi_worker.py:171
↓ 3 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:502
↓ 3 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:629
↓ 3 callers
Method
critical
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:44
↓ 3 callers
Method
data_received
Called when data is received on the connection.
gunicorn/asgi/protocol.py:650
↓ 3 callers
Function
default_ssl_context_factory
()
gunicorn/sock.py:268
↓ 3 callers
Method
dirty_add
Spawn additional dirty workers. Sends a MANAGE message to the dirty arbiter to spawn workers. Args: count: Numb
gunicorn/ctl/handlers.py:308
↓ 3 callers
Method
dirty_remove
Remove dirty workers. Sends a MANAGE message to the dirty arbiter to remove workers. Args: count: Number of dir
gunicorn/ctl/handlers.py:329
↓ 3 callers
Function
drain_body
Drain the request body.
tests/docker/asgi_compliance/apps/main_app.py:239
↓ 3 callers
Method
force_close
(self)
gunicorn/http/wsgi.py:315
↓ 3 callers
Function
generate
()
examples/celery_alternative/app.py:157
↓ 3 callers
Method
get_gunicorn_pids
Get PIDs of gunicorn processes.
tests/docker/per_app_allocation/test_per_app_e2e.py:137
↓ 3 callers
Function
get_header_value
Extract a header value from h2 headers list. h2 library may return headers as bytes or strings depending on version.
tests/test_http2_integration.py:26
↓ 3 callers
Method
get_pseudo_headers
Extract HTTP/2 pseudo-headers from request headers. Returns: dict: Mapping of pseudo-header names to values (e.
gunicorn/http2/stream.py:330
↓ 3 callers
Method
get_regular_headers
Get regular (non-pseudo) headers from request. Returns: list: List of (name, value) tuples for regular headers
gunicorn/http2/stream.py:343
↓ 3 callers
Method
handle_error
(self, req, client, addr, exc)
gunicorn/workers/base.py:201
↓ 3 callers
Method
init
Initialize database connection and cache.
examples/celery_alternative/tasks.py:301
↓ 3 callers
Method
init_signals
\ Initialize master signal handling. Most of the signals are queued. Child signals only wake up the master.
gunicorn/arbiter.py:226
↓ 3 callers
Method
is_chunked
(self)
gunicorn/http/wsgi.py:410
↓ 3 callers
Method
kill_dirty_arbiter
\ Send a signal to the dirty arbiter. :attr sig: `signal.SIG*` value
gunicorn/arbiter.py:924
↓ 3 callers
Method
kill_workers
\ Kill all workers with the signal `sig` :attr sig: `signal.SIG*` value
gunicorn/arbiter.py:791
↓ 3 callers
Method
murder_keepalived
Close expired keepalive connections.
gunicorn/workers/gthread.py:346
↓ 3 callers
Method
murder_workers
\ Kill unused/idle workers
gunicorn/arbiter.py:604
↓ 3 callers
Method
proxy_allow_networks
Return cached network objects for proxy_allow_ips (internal use).
gunicorn/config.py:192
↓ 3 callers
Method
read_message
Read a complete message from socket (sync). Args: sock: Socket to read from Returns: dict: Message
gunicorn/dirty/protocol.py:520
↓ 3 callers
Function
read_sse_events
Read SSE events from a streaming response. Stops when receiving a 'complete' or 'error' event, or max_events reached.
examples/celery_alternative/tests/test_integration.py:30
↓ 3 callers
Method
readlines
Read all lines from the body. Args: hint: Approximate byte count hint Returns: list: List of lines
gunicorn/http2/request.py:64
↓ 3 callers
Method
reap_workers
Reap dead worker processes.
gunicorn/dirty/arbiter.py:1070
↓ 3 callers
Method
receive
(self, text_data=None, bytes_data=None)
tests/docker/asgi_framework_compat/frameworks/django_app/consumers.py:44
↓ 3 callers
Method
reset
Reset for next request (keepalive).
gunicorn/asgi/parser.py:256
↓ 3 callers
Method
reset
(self)
tests/test_statsd.py:52
↓ 3 callers
Method
run
Run the dirty arbiter (blocking call).
gunicorn/dirty/arbiter.py:234
↓ 3 callers
Method
run
Run the main asyncio event loop.
gunicorn/dirty/worker.py:227
↓ 3 callers
Method
run
(self)
gunicorn/app/base.py:201
↓ 3 callers
Method
run_callbacks
Run queued callbacks. Called when the pipe is readable. Drains all available wake-up bytes and runs corresponding callbacks. The max_
gunicorn/workers/gthread.py:222
← previous
next →
401–500 of 4,774, ranked by callers