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
↓ 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
_reset_buffer
Reset buffer for reuse instead of creating new BytesIO.
gunicorn/asgi/unreader.py:36
↓ 3 callers
Method
_send_error_response
Send an error response.
gunicorn/asgi/protocol.py:1410
↓ 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
_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
_wake_waiter
Wake up any pending receive() call.
gunicorn/asgi/protocol.py:208
↓ 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
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:530
↓ 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
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:306
↓ 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:24
↓ 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:200
↓ 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
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:315
↓ 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:191
↓ 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:59
↓ 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:239
↓ 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:191
↓ 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:483
↓ 3 callers
Method
set_accept_enabled
Enable or disable accepting new connections.
gunicorn/workers/gthread.py:261
↓ 3 callers
Method
set_timeout
(self)
gunicorn/workers/gthread.py:88
↓ 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:2103
↓ 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:1942
↓ 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
_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:232
↓ 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:727
↓ 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:51
↓ 2 callers
Method
_close
Close the connection.
gunicorn/dirty/stash.py:128
↓ 2 callers
Method
_convert_h2_headers
Convert ASGI headers to HTTP/2 format (lowercase string names).
gunicorn/asgi/protocol.py:1549
↓ 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
← previous
next →
401–500 of 4,571, ranked by callers