Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benoitc/gunicorn
/ functions
Functions
5,599 in github.com/benoitc/gunicorn
⨍
Functions
5,599
◇
Types & classes
1,147
↳
Endpoints
142
↓ 9 callers
Function
_spin
(n=40)
tests/test_asgi_keepalive_background.py:120
↓ 9 callers
Function
asgi_upgrade_config
(parser="fast", mode="upgrade")
tests/test_http2_h2c.py:832
↓ 9 callers
Method
close
Cleanup on shutdown.
examples/dirty_example/dirty_app.py:112
↓ 9 callers
Function
create_arbiter
Create a test arbiter with mocked components.
tests/dirty/test_arbiter_streaming.py:85
↓ 9 callers
Function
create_client_with_mock_socket
Create a client with a mock socket returning the given messages.
tests/dirty/test_client_streaming.py:55
↓ 9 callers
Function
drain_body
Drain the request body.
tests/docker/asgi_compliance/apps/streaming_app.py:471
↓ 9 callers
Method
get_request_body
Join whatever body data is currently held, without taking it. Returns: bytes: The request body data received so far
gunicorn/http2/stream.py:337
↓ 9 callers
Method
seek
(self, offset, whence=0)
tests/t.py:65
↓ 9 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:615
↓ 9 callers
Method
signal
Signal handler - NO LOGGING, just queue the signal.
gunicorn/arbiter.py:237
↓ 9 callers
Method
signal_disconnect
Signal that the client transport has gone away.
gunicorn/asgi/protocol.py:406
↓ 8 callers
Method
__init__
(self, message, details=None)
gunicorn/dirty/errors.py:15
↓ 8 callers
Method
__new__
(cls, name, bases, attrs)
gunicorn/config.py:288
↓ 8 callers
Method
_build_websocket_scope
Build ASGI WebSocket scope from parsed request.
gunicorn/asgi/protocol.py:2057
↓ 8 callers
Method
_cleanup_worker
Clean up after a worker exits. Saves the dead worker's app list to pending respawns so the replacement worker gets the same
gunicorn/dirty/arbiter.py:1018
↓ 8 callers
Function
_close
(protocol)
tests/test_asgi_keepalive_background.py:125
↓ 8 callers
Method
_create_mock_request
Create a mock HTTP request.
tests/test_asgi_http_scope.py:665
↓ 8 callers
Method
_create_protocol
Create an ASGIProtocol instance for testing.
tests/test_asgi_http_scope.py:654
↓ 8 callers
Method
_create_protocol
Create a WebSocketProtocol instance for testing.
tests/test_asgi_websocket_protocol.py:748
↓ 8 callers
Method
_get_apps_for_new_worker
Determine which apps a new worker should load. Returns a list of import paths for apps that need more workers. Apps with wor
gunicorn/dirty/arbiter.py:173
↓ 8 callers
Method
_get_available_worker
Get an available worker PID using round-robin selection. If app_path is provided, only returns workers that have loaded that
gunicorn/dirty/arbiter.py:590
↓ 8 callers
Method
_get_minimum_workers
Calculate minimum number of workers required by app specs. Returns the maximum worker_count across all apps that have limits.
gunicorn/dirty/arbiter.py:156
↓ 8 callers
Method
_open
(self)
tests/test_http2_connection.py:1681
↓ 8 callers
Method
_request
(self, headers, peer, cfg=None)
tests/test_http2_request.py:760
↓ 8 callers
Function
_response_status
(events, stream_id=1)
tests/test_http2_live.py:153
↓ 8 callers
Method
_send_error_response
Send an error response. The status line carries the standard reason phrase; ``message``, which can quote the request, only goes in th
gunicorn/asgi/protocol.py:2278
↓ 8 callers
Method
cleanup_stream
Remove a stream after processing is complete. A response the application never finished is cut off with RST_STREAM(INTERNAL_ERROR); a
gunicorn/http2/async_connection.py:951
↓ 8 callers
Method
close
Close the sync connection.
gunicorn/dirty/client.py:188
↓ 8 callers
Method
close
Cleanup resources. Called when the dirty worker is shutting down. Use this to release resources like database connections, u
gunicorn/dirty/app.py:131
↓ 8 callers
Method
close
Close the connection gracefully with GOAWAY.
gunicorn/http2/async_connection.py:846
↓ 8 callers
Method
close
(self)
tests/test_asgi_worker.py:56
↓ 8 callers
Method
connect
Connect to control socket. Raises: ControlClientError: If connection fails
gunicorn/ctl/client.py:47
↓ 8 callers
Method
copy
(self)
gunicorn/config.py:357
↓ 8 callers
Function
create_async_client_with_mocks
Create a client with mock async reader/writer.
tests/dirty/test_client_streaming_async.py:60
↓ 8 callers
Method
create_worker
Create a worker instance for testing.
tests/test_gthread.py:236
↓ 8 callers
Method
create_worker
Create a worker for testing.
tests/test_gthread.py:416
↓ 8 callers
Method
execute
Execute an action on a dirty app (sync/blocking). Args: app_path: Import path of the dirty app (e.g., 'myapp.ml:MLApp')
gunicorn/dirty/client.py:80
↓ 8 callers
Method
http_get
Make HTTP GET request to the container.
tests/docker/per_app_allocation/test_per_app_e2e.py:186
↓ 8 callers
Method
info
(self, msg, *args, **kwargs)
gunicorn/instrument/statsd.py:64
↓ 8 callers
Method
last_update
(self)
gunicorn/workers/workertmp.py:46
↓ 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:72
↓ 8 callers
Method
read_into
Read data from unreader and append to bytearray buffer.
gunicorn/http/message.py:699
↓ 8 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:110
↓ 8 callers
Method
run
(self)
benchmarks/asgi/run.py:152
↓ 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:392
↓ 8 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:610
↓ 8 callers
Method
stream_chunks
Stream response chunks from URL.
tests/docker/asgi_compliance/conftest.py:337
↓ 8 callers
Method
unread
(self, data)
gunicorn/http/unreader.py:76
↓ 8 callers
Function
upgrade_request
An Upgrade: h2c request, optionally carrying a payload.
tests/test_http2_h2c.py:816
↓ 8 callers
Method
wsgi
(self)
gunicorn/app/base.py:65
↓ 7 callers
Method
_abort_all_streams
The connection is gone: wake every stream still waiting on it.
gunicorn/http2/async_connection.py:505
↓ 7 callers
Method
_base
(self, **extra)
tests/test_http2_request.py:766
↓ 7 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:837
↓ 7 callers
Function
_client_frame
A masked client frame; ``declared_len`` overrides the length field.
tests/test_asgi_websocket_enhanced.py:553
↓ 7 callers
Method
_close_worker_connection
Close connection to a worker.
gunicorn/dirty/arbiter.py:653
↓ 7 callers
Function
_connection
(http_parser, app, transport_class=_FakeTransport, **settings)
tests/test_asgi_request_base.py:31
↓ 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
Function
_done
(protocol)
tests/test_asgi_request_base.py:47
↓ 7 callers
Function
_finish
(protocol)
tests/test_asgi_expect_continue.py:57
↓ 7 callers
Method
_lock
(self)
gunicorn/http2/async_connection.py:871
↓ 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:54
↓ 7 callers
Method
_omits
(self, method, status)
tests/test_asgi_streaming.py:354
↓ 7 callers
Method
_open
(self)
tests/test_http2_connection.py:1546
↓ 7 callers
Method
_post
(self, client, stream_id=1)
tests/test_http2_connection.py:1692
↓ 7 callers
Method
_protocol
(self, cfg, peername=TRUSTED_ADDR)
tests/test_http2_h2c.py:858
↓ 7 callers
Method
_req
(self, settings="AAMAAABkAAQCAAAAAAIAAAAA", connection="Upgrade, HTTP2-Settings", version=(1, 1),
tests/test_http2_h2c.py:2320
↓ 7 callers
Function
_settle
()
tests/test_asgi_request_base.py:42
↓ 7 callers
Method
_signal_handler
Handle signals.
gunicorn/dirty/arbiter.py:283
↓ 7 callers
Method
_signal_window
Wake response tasks waiting for send credit.
gunicorn/http2/async_connection.py:652
↓ 7 callers
Function
_start
(app, http_parser, head)
tests/test_asgi_expect_continue.py:48
↓ 7 callers
Method
_unmask
Unmask WebSocket payload data.
gunicorn/asgi/websocket.py:533
↓ 7 callers
Function
_wait_for
(predicate, timeout=2.0)
tests/test_asgi_expect_continue.py:39
↓ 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
create_worker
Create a worker for testing.
tests/test_gthread.py:1040
↓ 7 callers
Method
error
(self, msg, *args, **kwargs)
gunicorn/glogging.py:282
↓ 7 callers
Function
find_free_port
Find a free port to bind to.
tests/test_control_socket_integration.py:41
↓ 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:674
↓ 7 callers
Method
increment
(self, name, value, sampling_rate=1.0)
gunicorn/instrument/statsd.py:119
↓ 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
reopen_files
(self)
gunicorn/glogging.py:399
↓ 7 callers
Method
sendall
(self, data)
tests/test_http2_connection.py:61
↓ 7 callers
Function
set_dirty_socket_path
Set the global dirty socket path (called during initialization).
gunicorn/dirty/client.py:650
↓ 7 callers
Method
setup
(self, cfg)
gunicorn/glogging.py:195
↓ 7 callers
Method
should_close
(self)
tests/test_early_hints.py:71
↓ 7 callers
Method
spawn_worker
(self)
gunicorn/arbiter.py:726
↓ 7 callers
Method
wait_closed
(self)
tests/test_dirty_worker.py:87
↓ 7 callers
Function
wait_for_server
Wait until server is accepting connections.
tests/test_control_socket_integration.py:48
↓ 6 callers
Method
_abort_all_streams
The connection is gone: wake every stream still waiting on it.
gunicorn/http2/connection.py:569
↓ 6 callers
Function
_background_app
Answers, then keeps running on /slow until ``release`` is set.
tests/test_asgi_keepalive_background.py:140
← previous
next →
201–300 of 5,599, ranked by callers