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
↓ 5 callers
Method
_create_websocket_protocol
Create WebSocketProtocol with mock transport.
tests/test_asgi_protocol_compat.py:307
↓ 5 callers
Method
_effective_peername
Return the client address advertised via PROXY protocol if any. Falls back to the transport peername when PROXY protocol is disabled,
gunicorn/asgi/protocol.py:1489
↓ 5 callers
Method
_extract_close_code_from_frame
Extract close code from WebSocket close frame.
tests/test_asgi_protocol_compat.py:324
↓ 5 callers
Method
_get_dirty_pidfile_path
Get the well-known PID file path for orphan detection. Uses self.proc_name (not self.cfg.proc_name) so that during USR2 the new maste
gunicorn/arbiter.py:827
↓ 5 callers
Method
_handle_response
Handle response message, extracting result or raising error.
gunicorn/dirty/client.py:166
↓ 5 callers
Function
_make_response
(method="GET", version=(1, 1), sendfile=False)
tests/test_http.py:376
↓ 5 callers
Method
_send_body
Send response body chunk. Combines buffered headers with first body chunk for efficient write batching.
gunicorn/asgi/protocol.py:1554
↓ 5 callers
Method
_setup_event_loop
Setup the asyncio event loop.
gunicorn/workers/gasgi.py:54
↓ 5 callers
Method
_sock_send
(self, msg)
gunicorn/instrument/statsd.py:128
↓ 5 callers
Method
_strip
(self, headers, status)
tests/test_asgi_streaming.py:390
↓ 5 callers
Method
atoms
Gets atoms for log formatting.
gunicorn/glogging.py:300
↓ 5 callers
Function
cfg_file
()
tests/test_config.py:27
↓ 5 callers
Method
copy
(self)
gunicorn/config.py:334
↓ 5 callers
Function
create_h2_connection
Create an HTTP/2 connection using the h2 library.
examples/http2_features/test_http2.py:32
↓ 5 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:1198
↓ 5 callers
Method
decode_full
Decode a complete TLV-encoded value, ensuring all data is consumed. Args: data: Binary data to decode Returns:
gunicorn/dirty/tlv.py:284
↓ 5 callers
Method
defer
Queue a callback to be run on the main thread. The callback is added to the queue first, then a wake-up byte is written to the pipe.
gunicorn/workers/gthread.py:206
↓ 5 callers
Function
drain_task
Cancel a protocol task and let the loop deliver the cancellation. Closing the loop on a task suspended mid-await leaves the coroutine to be c
tests/test_http2_h2c.py:501
↓ 5 callers
Method
feed
Feed a body chunk directly (called by parser callback).
gunicorn/asgi/protocol.py:188
↓ 5 callers
Method
from_samples
Calculate statistics from list of latency samples.
benchmarks/dirty_benchmark.py:78
↓ 5 callers
Function
get_dirty_socket_path
Get the dirty socket path.
gunicorn/dirty/client.py:667
↓ 5 callers
Method
get_extra_info
(self, name, default=None)
tests/test_http2_h2c.py:469
↓ 5 callers
Method
get_logs
Get container logs.
tests/docker/dirty_arbiter/test_parent_death.py:123
↓ 5 callers
Method
get_request_body
Get the complete request body. Returns: bytes: The request body data
gunicorn/http2/stream.py:293
↓ 5 callers
Function
h2_request
Make an HTTP/2 request and return the response.
examples/http2_features/test_http2.py:71
↓ 5 callers
Method
kill_worker
\ Kill a worker :attr pid: int, worker pid :attr sig: `signal.SIG*` value
gunicorn/arbiter.py:800
↓ 5 callers
Method
manage_workers
Maintain the number of dirty workers.
gunicorn/dirty/arbiter.py:912
↓ 5 callers
Function
normalize_headers
Normalize headers to lowercase names for comparison. H1CProtocol preserves original case, PythonProtocol lowercases.
tests/test_asgi_callback_parser.py:22
↓ 5 callers
Method
read
(self, size=None)
gunicorn/http/unreader.py:31
↓ 5 callers
Method
read_body
Read body chunk asynchronously. Args: size: Maximum bytes to read Returns: bytes: Body data, empty bytes whe
gunicorn/asgi/uwsgi.py:132
↓ 5 callers
Method
read_message_async
Read a complete binary message from async stream. Args: reader: asyncio StreamReader Returns: dict:
gunicorn/dirty/protocol.py:408
↓ 5 callers
Method
reexec
\ Relaunch the master and workers.
gunicorn/arbiter.py:497
↓ 5 callers
Function
responder
(status)
tests/test_asgi_http2_response.py:62
↓ 5 callers
Method
run
(self)
examples/when_ready.conf.py:29
↓ 5 callers
Function
run_app
Drive _handle_http2_request and report what reached the wire.
tests/test_asgi_http2_response.py:46
↓ 5 callers
Method
run_benchmark
Run a benchmark with specified parameters. Each concurrent worker maintains a persistent connection to the arbiter and makes
benchmarks/dirty_benchmark.py:284
↓ 5 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/connection.py:595
↓ 5 callers
Method
send_informational
Send an informational response (1xx) on a stream. This is used for 103 Early Hints and other 1xx responses. Informational responses a
gunicorn/http2/connection.py:419
↓ 5 callers
Function
send_response
Send a simple HTTP response.
examples/http2_features/http2_app.py:242
↓ 5 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/connection.py:639
↓ 5 callers
Method
send_trailers
Mark trailers as sent and close the stream. Args: trailers: List of (name, value) trailer tuples Raises: HTT
gunicorn/http2/stream.py:220
↓ 5 callers
Function
split_request_uri
(uri)
gunicorn/util.py:671
↓ 5 callers
Method
to_dict
Serialize error for protocol transmission.
gunicorn/dirty/errors.py:25
↓ 5 callers
Function
validate_string
(val)
gunicorn/config.py:428
↓ 5 callers
Function
wait_for_socket
Wait until Unix socket exists.
tests/test_control_socket_integration.py:60
↓ 5 callers
Method
warmup
Warm up the pool with a few requests.
benchmarks/dirty_benchmark.py:278
↓ 5 callers
Method
write_file
(self, respiter)
gunicorn/http/wsgi.py:542
↓ 4 callers
Method
__anext__
(self)
gunicorn/dirty/client.py:530
↓ 4 callers
Method
_close_socket
Close the socket connection.
gunicorn/dirty/client.py:179
↓ 4 callers
Method
_create_mock_http2_config
Create mock config for HTTP/2.
tests/test_early_hints.py:303
↓ 4 callers
Method
_create_mock_http2_request
Create a mock HTTP/2 request.
tests/test_asgi_http_scope.py:496
↓ 4 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_protocol_compat.py:871
↓ 4 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:582
↓ 4 callers
Method
_create_mock_request
Create a mock HTTP request with headers.
tests/test_asgi_header_security.py:172
↓ 4 callers
Method
_create_mock_socket
Create mock socket for HTTP/2.
tests/test_early_hints.py:308
↓ 4 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:485
↓ 4 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:571
↓ 4 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_streaming.py:209
↓ 4 callers
Method
_create_protocol
Create a WebSocketProtocol instance for testing.
tests/test_asgi_websocket_protocol.py:175
↓ 4 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_enhanced.py:265
↓ 4 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_header_security.py:159
↓ 4 callers
Method
_forbids
(self, status)
tests/test_asgi_streaming.py:437
↓ 4 callers
Method
_get_worker_connection
Get or create connection to a worker.
gunicorn/dirty/arbiter.py:629
↓ 4 callers
Method
_h2c_undecided_timeout
Nothing conclusive arrived in time. With prior knowledge alone the peer is expected to speak HTTP/2, so stalling mid-preface is refus
gunicorn/asgi/protocol.py:701
↓ 4 callers
Method
_increment_counter
Increment global request counter.
examples/dirty_example/dirty_app.py:256
↓ 4 callers
Method
_make_stream
(self, headers, stream_id=1)
tests/test_http2_request.py:455
↓ 4 callers
Method
_on_message_complete
Callback: request is fully received.
gunicorn/asgi/protocol.py:622
↓ 4 callers
Method
_receive
ASGI receive callable for lifespan.
gunicorn/asgi/lifespan.py:151
↓ 4 callers
Method
_run
(self, parser, body=b"", chunked=False, raising=False)
tests/test_http2_h2c.py:1132
↓ 4 callers
Method
_safe_write
Write data to transport, handling connection errors gracefully. Catches exceptions that occur when the client has disconnected: - OSE
gunicorn/asgi/protocol.py:895
↓ 4 callers
Method
_send_close
Send a close frame.
gunicorn/asgi/websocket.py:423
↓ 4 callers
Method
_send_informational
Send an informational response (1xx) such as 103 Early Hints. Args: status: HTTP status code (100-199) headers: List
gunicorn/asgi/protocol.py:1411
↓ 4 callers
Function
bytes_to_str
(b)
gunicorn/util.py:696
↓ 4 callers
Method
check
(self, cfg, sender, sizer, matcher)
tests/treq.py:282
↓ 4 callers
Function
check_server_available
Wait for server to become available.
examples/http2_gevent/test_http2_gevent.py:30
↓ 4 callers
Method
cleanup_stream
Remove a stream after processing is complete.
gunicorn/http2/async_connection.py:644
↓ 4 callers
Method
close
(self)
tests/test_dirty_integration.py:48
↓ 4 callers
Function
close_dirty_client
Close the thread-local client (call on worker exit).
gunicorn/dirty/client.py:740
↓ 4 callers
Method
close_on_exec
(self)
gunicorn/glogging.py:413
↓ 4 callers
Method
connect_async
Establish async connection to arbiter. Raises: DirtyConnectionError: If connection fails
gunicorn/dirty/client.py:197
↓ 4 callers
Method
connection_made
Called when a connection is established.
gunicorn/asgi/protocol.py:407
↓ 4 callers
Method
connection_made
(self, transport)
tests/test_asgi_worker.py:478
↓ 4 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:416
↓ 4 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:709
↓ 4 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:1057
↓ 4 callers
Method
delete
Delete a key from a table. Args: table: Table name key: Key to delete Returns: True if
gunicorn/dirty/stash.py:221
↓ 4 callers
Method
drain
Wait until transport is writable.
gunicorn/asgi/protocol.py:101
↓ 4 callers
Method
encode_response
Encode a success response message. Args: request_id: Request identifier this responds to result: Result valu
gunicorn/dirty/protocol.py:207
↓ 4 callers
Method
end_stream
Close the sending half of a stream, with trailers if given.
gunicorn/http2/connection.py:476
↓ 4 callers
Method
enqueue_req
Submit connection to thread pool for processing.
gunicorn/workers/gthread.py:306
↓ 4 callers
Method
exec
Execute a command in the container.
tests/docker/dirty_arbiter/test_parent_death.py:112
↓ 4 callers
Function
func
(a, b)
tests/test_config.py:210
↓ 4 callers
Function
get_dirty_worker_count
Get the current number of dirty workers.
tests/docker/dirty_ttin_ttou/test_ttin_ttou_docker.py:80
↓ 4 callers
Method
get_files
(self)
gunicorn/reloader.py:36
↓ 4 callers
Method
handle_quit
SIGQUIT handling
gunicorn/arbiter.py:328
↓ 4 callers
Method
handle_request
(self, listener, req, client, addr)
gunicorn/workers/sync.py:168
↓ 4 callers
Method
initiate_upgrade
Switch a connection to HTTP/2 after an Upgrade: h2c request. The upgraded request becomes stream 1 (RFC 7540 section 3.2). h2 opens i
gunicorn/http2/connection.py:128
↓ 4 callers
Function
is_http2_available
Check if HTTP/2 support is available. Returns: bool: True if the h2 library is installed with minimum required version.
gunicorn/http2/__init__.py:19
↓ 4 callers
Method
is_parent_alive
(self)
gunicorn/workers/sync.py:51
↓ 4 callers
Method
load
(self)
gunicorn/app/base.py:48
← previous
next →
301–400 of 4,774, ranked by callers