Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benoitc/gunicorn
/ functions
Functions
4,571 in github.com/benoitc/gunicorn
⨍
Functions
4,571
◇
Types & classes
1,022
↳
Endpoints
130
↓ 378 callers
Method
get
(self)
tests/test_config.py:120
↓ 242 callers
Method
set
(self, name, value)
gunicorn/config.py:80
↓ 193 callers
Method
encode
Encode a Python value to TLV binary format. Args: value: Python value to encode (None, bool, int, float,
gunicorn/dirty/tlv.py:53
↓ 168 callers
Method
decode
Decode a TLV-encoded value from binary data. Args: data: Binary data to decode offset: Starting offset in th
gunicorn/dirty/tlv.py:128
↓ 137 callers
Method
feed
Process data, fire callbacks synchronously. Args: data: bytes or bytearray of incoming data Raises: ParseErr
gunicorn/asgi/parser.py:204
↓ 82 callers
Method
_cleanup_sync
Synchronous cleanup on exit.
gunicorn/dirty/arbiter.py:1132
↓ 75 callers
Method
recv
(self, n, flags=0)
tests/dirty/test_client_streaming.py:40
↓ 74 callers
Method
get
Get value with default.
gunicorn/dirty/stash.py:384
↓ 71 callers
Method
_build_http_scope
Build ASGI HTTP scope from parsed request.
gunicorn/asgi/protocol.py:1137
↓ 65 callers
Method
get
(self)
examples/frameworks/tornadoapp.py:16
↓ 63 callers
Function
make_request
Create a request message. Args: request_id: Unique request identifier command: Command name (e.g., "show workers") a
gunicorn/ctl/protocol.py:172
↓ 63 callers
Function
uri
(data)
tests/treq.py:24
↓ 62 callers
Function
websocket_connect
Factory for creating WebSocket connections.
tests/docker/asgi_compliance/conftest.py:257
↓ 60 callers
Method
send_headers
(self)
gunicorn/http/wsgi.py:434
↓ 57 callers
Method
initiate_connection
Send initial HTTP/2 settings to client. Should be called after the SSL handshake completes and before processing any data.
gunicorn/http2/connection.py:101
↓ 57 callers
Method
items
Iterate over (key, value) pairs.
gunicorn/dirty/stash.py:396
↓ 54 callers
Method
exists
Check if a table or key exists. Args: table: Table name key: Optional key to check within the table
gunicorn/dirty/stash.py:279
↓ 50 callers
Method
receive_data
Process received DATA frame with streaming support. Args: data: Bytes received end_stream: True if END_STREAM flag is
gunicorn/http2/stream.py:129
↓ 50 callers
Method
run
()
tests/t.py:29
↓ 47 callers
Method
receive_data
Process received data and return completed requests. Args: data: Optional bytes to process. If None, reads from socket.
gunicorn/http2/connection.py:122
↓ 47 callers
Method
send
(self, data)
tests/t.py:61
↓ 36 callers
Method
accept
(self, listener)
gunicorn/workers/sync.py:26
↓ 34 callers
Function
make_chunk_message
Build a chunk message dict for streaming responses. Args: request_id: Request identifier this chunk belongs to data: Chunk d
gunicorn/dirty/protocol.py:728
↓ 34 callers
Method
patch
(self)
gunicorn/workers/ggevent.py:37
↓ 34 callers
Method
write
(self, arg)
gunicorn/http/wsgi.py:444
↓ 33 callers
Method
close
(self)
tests/test_gthread.py:50
↓ 32 callers
Method
debug
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:65
↓ 31 callers
Method
_send
ASGI send callable for lifespan.
gunicorn/asgi/lifespan.py:155
↓ 31 callers
Method
decode_message
Decode a message from bytes. Args: data: Raw bytes (length prefix + JSON payload) Returns: Decoded
gunicorn/ctl/protocol.py:57
↓ 30 callers
Function
get_parser_class
Get the appropriate parser class for the test parameter.
tests/test_asgi_callback_parser.py:14
↓ 30 callers
Method
info
Get information about a table. Args: table: Table name Returns: Dict with table info (size, etc.)
gunicorn/dirty/stash.py:256
↓ 30 callers
Method
keys
Get all keys, optionally filtered by pattern.
gunicorn/dirty/stash.py:388
↓ 30 callers
Method
load_apps
Load all configured dirty apps.
gunicorn/dirty/worker.py:210
↓ 30 callers
Function
make_end_message
Build an end-of-stream message dict. Args: request_id: Request identifier this ends Returns: dict: End message dict
gunicorn/dirty/protocol.py:746
↓ 28 callers
Function
async_http_client_factory
Factory for creating async HTTP clients.
tests/docker/asgi_compliance/conftest.py:240
↓ 28 callers
Method
get
(self)
gunicorn/config.py:336
↓ 28 callers
Method
initiate_connection
Send initial HTTP/2 settings to client. Should be called after the SSL handshake completes and before processing any data.
gunicorn/http2/async_connection.py:101
↓ 28 callers
Method
read
(self, size=None)
gunicorn/http/body.py:214
↓ 27 callers
Method
_cleanup
Clean up resources on shutdown.
gunicorn/dirty/worker.py:502
↓ 26 callers
Method
close
(self)
tests/docker/asgi_compliance/conftest.py:320
↓ 26 callers
Function
create_client_connection
Create an h2 client connection for generating test frames.
tests/test_http2_connection.py:66
↓ 26 callers
Method
receive_headers
Process received HEADERS frame. Args: headers: List of (name, value) tuples end_stream: True if END_STREAM flag is se
gunicorn/http2/stream.py:105
↓ 25 callers
Method
read
(self, size=-1)
tests/test_asgi_uwsgi.py:27
↓ 25 callers
Method
receive_data
Receive data and return completed requests. Args: timeout: Optional timeout in seconds for read operation Returns:
gunicorn/http2/async_connection.py:122
↓ 24 callers
Method
feed_data
Feed incoming data from the parent protocol's data_received(). Args: data: bytes received on the connection
gunicorn/asgi/websocket.py:85
↓ 24 callers
Method
unlink
delete pidfile
gunicorn/pidfile.py:53
↓ 24 callers
Method
warning
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:52
↓ 23 callers
Method
exception
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:56
↓ 22 callers
Method
add
(self, name, iterations, duration, chunks=None, bytes_total=None, memory_start=None, memory_end=No
benchmarks/dirty_streaming.py:167
↓ 22 callers
Method
decode_header
Decode the 16-byte message header. Args: data: 16 bytes of header data Returns: tuple: (msg_type, r
gunicorn/dirty/protocol.py:131
↓ 22 callers
Method
parse
(self, unreader)
gunicorn/http/message.py:215
↓ 21 callers
Function
make_uwsgi_packet
Create uWSGI packet for testing. Args: vars_dict: Dict of WSGI environ variables modifier1: Packet type (0 = WSGI request)
tests/test_uwsgi.py:20
↓ 20 callers
Method
close
(self, graceful=False)
gunicorn/workers/gthread.py:123
↓ 20 callers
Method
connection_lost
Called when the connection is lost or closed. Instead of immediately cancelling the task, we signal a disconnect event and send an ht
gunicorn/asgi/protocol.py:680
↓ 20 callers
Function
validate_callable
(arity)
gunicorn/config.py:493
↓ 19 callers
Method
_execute_on_worker
Execute request on a specific worker (called by consumer). Handles both regular responses and streaming (chunk-based) responses.
gunicorn/dirty/arbiter.py:523
↓ 19 callers
Method
create
(self, pid)
gunicorn/pidfile.py:21
↓ 19 callers
Function
create_client_connection
Create an h2 client connection for generating test frames.
tests/test_http2_async_connection.py:90
↓ 19 callers
Method
handle_request
(self, listener, req, client, addr)
gunicorn/workers/sync.py:168
↓ 19 callers
Method
put
Store a value in a table. The table is automatically created if it doesn't exist. Args: table: Table name
gunicorn/dirty/stash.py:191
↓ 19 callers
Method
send_data
Mark data as sent. Args: data: Bytes to send end_stream: True if this completes the response Raises:
gunicorn/http2/stream.py:200
↓ 19 callers
Method
set_data
(self, data)
tests/test_http2_async_connection.py:53
↓ 19 callers
Method
wait
(self, timeout)
gunicorn/workers/sync.py:32
↓ 18 callers
Method
_encode_from_dict
Encode a message dict to binary format. Supports the old dict-based API for backwards compatibility. Args: mess
gunicorn/dirty/protocol.py:576
↓ 18 callers
Method
error
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:48
↓ 18 callers
Method
get_sent_data
(self)
tests/test_http2_connection.py:59
↓ 18 callers
Function
make_response
Create a success response message. Args: request_id: Request identifier being responded to data: Response data Returns:
gunicorn/ctl/protocol.py:191
↓ 17 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_compliance.py:138
↓ 17 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:127
↓ 17 callers
Method
_send_pending_data
Send any pending data from h2 to the socket.
gunicorn/http2/connection.py:632
↓ 17 callers
Method
init
(self, parser, opts, args)
tests/test_config.py:53
↓ 17 callers
Method
setblocking
(self, blocking)
tests/test_gthread.py:35
↓ 17 callers
Method
start
Start server in background thread with asyncio event loop.
gunicorn/ctl/server.py:107
↓ 17 callers
Method
stream
Stream SSE events from URL.
tests/docker/asgi_compliance/conftest.py:298
↓ 16 callers
Method
_signal_handler
Handle signals by setting alive = False.
gunicorn/dirty/worker.py:195
↓ 16 callers
Function
build_uwsgi_packet
Build a uWSGI packet from a dictionary of variables. Args: vars_dict: Dictionary of uWSGI variables modifier1: uWSGI modifier1 (d
tests/test_asgi_uwsgi.py:47
↓ 16 callers
Method
from_parser
Build request from callback parser state. Args: parser: H1CProtocol or PythonProtocol instance is_ssl: Whether connec
gunicorn/asgi/parser.py:884
↓ 16 callers
Function
get_dirty_client_async
Get or create a context-local async client. This is the recommended way to get a client in async HTTP workers. Args: timeout: T
gunicorn/dirty/client.py:710
↓ 16 callers
Method
now
return date in Apache Common Log Format
gunicorn/glogging.py:386
↓ 16 callers
Method
read_message
Read one message from a socket. Args: sock: Socket to read from Returns: Decoded message dictionary
gunicorn/ctl/protocol.py:78
↓ 15 callers
Method
_register_worker_apps
Register which apps a worker has loaded. Updates both app_worker_map and worker_app_map to track the bidirectional relations
gunicorn/dirty/arbiter.py:199
↓ 15 callers
Method
close
(self)
gunicorn/sock.py:65
↓ 15 callers
Method
close
(self)
tests/test_dirty_worker.py:84
↓ 15 callers
Function
create_h2_client
Create an h2 client connection.
tests/test_http2_integration.py:69
↓ 15 callers
Method
execute
Execute an action on a dirty app. The action runs in a thread pool executor to avoid blocking the asyncio event loop. Execut
gunicorn/dirty/worker.py:450
↓ 15 callers
Method
get_sent_data
(self)
tests/test_http2_integration.py:59
↓ 15 callers
Method
reap_workers
\ Reap workers to avoid zombie processes
gunicorn/arbiter.py:625
↓ 15 callers
Method
send_headers
Mark headers as sent. Args: headers: List of (name, value) tuples to send end_stream: True if this completes the resp
gunicorn/http2/stream.py:177
↓ 15 callers
Method
send_response
Send a response on a stream. Args: stream_id: The stream ID to respond on status: HTTP status code (int)
gunicorn/http2/connection.py:391
↓ 15 callers
Method
sendall
(self, data)
tests/test_early_hints.py:80
↓ 15 callers
Method
set_recv_data
(self, data)
tests/test_http2_integration.py:62
↓ 15 callers
Method
shutdown
Initiate shutdown. Args: mode: "graceful" (SIGTERM) or "quick" (SIGINT) Returns: Dictionary with st
gunicorn/ctl/handlers.py:440
↓ 15 callers
Function
ws_client
WebSocket client factory for testing.
tests/docker/asgi_framework_compat/conftest.py:175
↓ 14 callers
Method
_make_stream
Helper to create a stream with headers and body.
tests/test_http2_request.py:155
↓ 14 callers
Method
bind
(self, sock)
gunicorn/sock.py:62
↓ 14 callers
Method
close
Close connection.
gunicorn/ctl/client.py:65
↓ 14 callers
Method
info
(self, msg, *args, **kwargs)
gunicorn/glogging.py:286
↓ 14 callers
Method
stop
Stop server and cleanup socket.
gunicorn/ctl/server.py:120
↓ 13 callers
Method
_send_pending_data
Send any pending data from h2 to the socket.
gunicorn/http2/async_connection.py:567
↓ 13 callers
Function
create_worker
Create a test worker with mocked components.
tests/dirty/test_worker_streaming.py:61
next →
1–100 of 4,571, ranked by callers