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
↓ 8 callers
Method
notify
\ Your worker subclass must arrange to have this method called once every ``self.timeout`` seconds. If you fail in accomplishing
gunicorn/workers/base.py:71
↓ 8 callers
Method
read_into
Read data from unreader and append to bytearray buffer.
gunicorn/http/message.py:651
↓ 8 callers
Function
run_async_handle
Drive AsyncWorker.handle() over a socketpair. Returns the worker. ``close_client`` gives the HTTP/1 path an EOF to stop on. An upgrade needs
tests/test_http2_h2c.py:390
↓ 8 callers
Method
stream_chunks
Stream response chunks from URL.
tests/docker/asgi_compliance/conftest.py:337
↓ 8 callers
Function
upgrade_request
An Upgrade: h2c request, optionally carrying a payload.
tests/test_http2_h2c.py:812
↓ 8 callers
Method
wait_closed
(self)
tests/test_dirty_worker.py:87
↓ 8 callers
Method
wsgi
(self)
gunicorn/app/base.py:64
↓ 7 callers
Method
_base
(self, **extra)
tests/test_http2_request.py:758
↓ 7 callers
Method
_close_worker_connection
Close connection to a worker.
gunicorn/dirty/arbiter.py:650
↓ 7 callers
Method
_create_manager
Create a LifespanManager instance.
tests/test_asgi_lifespan.py:121
↓ 7 callers
Method
_create_mock_request
Create a mock WebSocket upgrade request.
tests/test_asgi_http_scope.py:368
↓ 7 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_websocket_protocol.py:437
↓ 7 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:357
↓ 7 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_websocket_protocol.py:425
↓ 7 callers
Method
_handle_http_request
Handle a single HTTP request.
gunicorn/asgi/protocol.py:1115
↓ 7 callers
Function
_normalize_sockaddr
Normalize socket address to ASGI-compatible (host, port) tuple. ASGI spec requires server/client to be (host, port) tuples. IPv6 sockets retu
gunicorn/asgi/protocol.py:42
↓ 7 callers
Method
_omits
(self, method, status)
tests/test_asgi_streaming.py:354
↓ 7 callers
Method
_protocol
(self, cfg, peername=TRUSTED_ADDR)
tests/test_http2_h2c.py:854
↓ 7 callers
Method
_signal_handler
Handle signals.
gunicorn/dirty/arbiter.py:280
↓ 7 callers
Method
_unmask
Unmask WebSocket payload data.
gunicorn/asgi/websocket.py:365
↓ 7 callers
Function
app
Simplest possible application object
tests/support.py:19
↓ 7 callers
Function
cleanup_gunicorn
Clean up a gunicorn process.
tests/test_control_socket_integration.py:124
↓ 7 callers
Method
close
(self)
tests/test_dirty_arbiter.py:57
↓ 7 callers
Method
error
(self, msg, *args, **kwargs)
gunicorn/glogging.py:280
↓ 7 callers
Function
find_free_port
Find a free port to bind to.
tests/test_control_socket_integration.py:41
↓ 7 callers
Method
finish_request
Handle completion of a request (called via method_queue on main thread).
gunicorn/workers/gthread.py:449
↓ 7 callers
Method
from_dict
Deserialize error from protocol transmission. Creates an error instance from a serialized dict. The returned error will be an instanc
gunicorn/dirty/errors.py:34
↓ 7 callers
Function
get_app_workers_attribute
Get the workers class attribute from a dirty app without instantiating it. This is used by the arbiter to determine how many workers should
gunicorn/dirty/app.py:300
↓ 7 callers
Function
get_dirty_client
Get or create a thread-local sync client. This is the recommended way to get a client in sync HTTP workers. Args: timeout: Time
gunicorn/dirty/client.py:681
↓ 7 callers
Function
make_error_response
Build an error response message dict. Args: request_id: Request identifier this responds to error: DirtyError instance or di
gunicorn/dirty/protocol.py:698
↓ 7 callers
Function
make_request
Make a simple HTTP request and return the response body.
tests/test_signal_integration.py:59
↓ 7 callers
Function
make_request
Make a simple HTTP request and return the response body.
tests/test_control_socket_integration.py:70
↓ 7 callers
Function
parse_command
Parse a command line into command and args. Args: line: Command line string Returns: Tuple of (command_string, args_lis
gunicorn/ctl/client.py:114
↓ 7 callers
Method
post_request
(worker, req, environ, resp)
gunicorn/config.py:2028
↓ 7 callers
Method
pre_request
(worker, req)
gunicorn/config.py:2011
↓ 7 callers
Method
reopen_files
(self)
gunicorn/glogging.py:390
↓ 7 callers
Method
reset
Reset this stream with RST_STREAM. Args: error_code: HTTP/2 error code (default: CANCEL)
gunicorn/http2/stream.py:238
↓ 7 callers
Method
send_error
Send an error response on a stream. Args: stream_id: The stream ID status_code: HTTP status code message:
gunicorn/http2/connection.py:683
↓ 7 callers
Function
set_dirty_socket_path
Set the global dirty socket path (called during initialization).
gunicorn/dirty/client.py:657
↓ 7 callers
Method
start_response
(self, status, headers, exc_info=None)
gunicorn/http/wsgi.py:329
↓ 7 callers
Function
wait_for_server
Wait until server is accepting connections.
tests/test_control_socket_integration.py:48
↓ 6 callers
Method
_cleanup_orphaned_dirty_arbiter
Kill any orphaned dirty arbiter from a previous crash. Only runs on fresh start (master_pid == 0), not during USR2.
gunicorn/arbiter.py:838
↓ 6 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_protocol_http.py:436
↓ 6 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_protocol_http.py:425
↓ 6 callers
Method
_create_protocol
Create a WebSocketProtocol instance.
tests/test_asgi_websocket_protocol.py:592
↓ 6 callers
Method
_create_protocol
Create a WebSocketProtocol instance for testing.
tests/test_asgi_websocket_protocol.py:684
↓ 6 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:447
↓ 6 callers
Function
_get_default_control_socket
Get default control socket path based on available directories. Prefers XDG_RUNTIME_DIR if available (standard on Linux, sometimes BSD), fall
gunicorn/config.py:3229
↓ 6 callers
Method
_half_close_local
Transition to half-closed (local) state.
gunicorn/http2/stream.py:269
↓ 6 callers
Method
_half_close_remote
Transition to half-closed (remote) state.
gunicorn/http2/stream.py:281
↓ 6 callers
Method
_protocol
(self, mode)
tests/test_http2_h2c.py:939
↓ 6 callers
Method
_read_frame
Read a single WebSocket frame. Returns: tuple: (opcode, payload) or None if connection closed
gunicorn/asgi/websocket.py:262
↓ 6 callers
Method
_req
(self, headers)
tests/test_http2_h2c.py:671
↓ 6 callers
Method
_send_error_response
Send an error response.
gunicorn/asgi/protocol.py:1583
↓ 6 callers
Method
app
(scope, receive, send)
tests/test_asgi_worker.py:285
↓ 6 callers
Method
close
Close the pipe file descriptors.
gunicorn/workers/gthread.py:189
↓ 6 callers
Method
close
Close the connection gracefully with GOAWAY.
gunicorn/http2/async_connection.py:606
↓ 6 callers
Function
create_mock_ssl_socket
Create a mock SSL socket for testing ALPN negotiation.
tests/test_http2_alpn.py:15
↓ 6 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:918
↓ 6 callers
Method
create_worker
Helper to create a ThreadWorker for testing.
tests/test_gthread.py:1572
↓ 6 callers
Function
drain_body
Drain the request body.
tests/docker/asgi_compliance/apps/lifespan_app.py:273
↓ 6 callers
Method
encode_message
Encode a message for transmission. Args: data: Dictionary to encode Returns: Length-prefixed JSON b
gunicorn/ctl/protocol.py:42
↓ 6 callers
Function
get_short_socket_path
Get a short socket path that won't exceed Unix socket path limits. macOS limits Unix socket paths to ~104 characters, so we use /tmp directly.
tests/test_control_socket_integration.py:141
↓ 6 callers
Method
increment
(self, name, value, sampling_rate=1.0)
gunicorn/instrument/statsd.py:116
↓ 6 callers
Method
init
(self)
gunicorn/workers/gthread.py:62
↓ 6 callers
Method
init
Initialize the pipe and queue.
gunicorn/workers/gthread.py:179
↓ 6 callers
Method
init_process
\ If you override this method in a subclass, the last statement in the function should be to call this method with super().ini
gunicorn/workers/base.py:87
↓ 6 callers
Method
kill_process
Send a signal to a process in the container.
tests/docker/dirty_arbiter/test_parent_death.py:222
↓ 6 callers
Method
kill_worker
Kill a worker by PID.
gunicorn/dirty/arbiter.py:1007
↓ 6 callers
Function
make_worker
(graceful_timeout=1)
tests/test_asgi_nr_conns_shutdown.py:58
↓ 6 callers
Method
notify
Update heartbeat timestamp.
gunicorn/dirty/worker.py:138
↓ 6 callers
Function
open_connection
(worker)
tests/test_asgi_nr_conns_shutdown.py:71
↓ 6 callers
Method
parser
(self)
gunicorn/config.py:91
↓ 6 callers
Method
read
Read data from the stream, using buffered data first. Args: size: Number of bytes to read. If None, returns all buffered
gunicorn/asgi/unreader.py:54
↓ 6 callers
Method
readline
Read a line from the body. Args: size: Maximum bytes to read Returns: bytes: A line of data
gunicorn/http2/request.py:51
↓ 6 callers
Method
reload
(self)
gunicorn/arbiter.py:531
↓ 6 callers
Function
request
Make HTTP request and return JSON response.
examples/dirty_example/test_stash_integration.py:26
↓ 6 callers
Method
reset_stream
Reset a stream with RST_STREAM. Args: stream_id: The stream ID to reset error_code: HTTP/2 error code (default: CANCE
gunicorn/http2/connection.py:698
↓ 6 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/async_connection.py:415
↓ 6 callers
Function
send_signal_to_dirty_arbiter
Send a signal to the dirty arbiter.
tests/docker/dirty_ttin_ttou/test_ttin_ttou_docker.py:93
↓ 6 callers
Method
setup
(self, cfg)
gunicorn/glogging.py:195
↓ 6 callers
Function
start_gunicorn
Start a gunicorn server with specified worker class and control socket.
tests/test_control_socket_integration.py:92
↓ 6 callers
Method
stop
Stop all workers.
gunicorn/dirty/arbiter.py:1109
↓ 6 callers
Method
validate
Validate pidfile and make it stale if needed
gunicorn/pidfile.py:64
↓ 6 callers
Method
warning
(self, msg, *args, **kwargs)
gunicorn/glogging.py:283
↓ 6 callers
Method
write
(self, data)
examples/dirty_example/test_worker_integration.py:45
↓ 6 callers
Method
write_message_async
Write one message to an async writer. Args: writer: asyncio StreamWriter data: Message dictionary to send
gunicorn/ctl/protocol.py:159
↓ 5 callers
Function
_build_request_parser
Construct a RequestParser that drains the given bytes.
tests/test_http.py:258
↓ 5 callers
Method
_cfg
(self, mode)
tests/test_http2_h2c.py:276
↓ 5 callers
Method
_create_manager
Create a LifespanManager instance.
tests/test_asgi_lifespan.py:363
↓ 5 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:114
↓ 5 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:196
↓ 5 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:274
↓ 5 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_compliance.py:37
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:103
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:185
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:263
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:26
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:722
↓ 5 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_compliance.py:867
← previous
next →
201–300 of 4,774, ranked by callers