sdkagent

gunicorn API reference

268 public APIs from gunicorn (benoitc/gunicorn) — 92 classes, 50 functions, 126 methods. Signatures extracted by static analysis of the actual source.

Repository: benoitc/gunicorn

KindCount
Classes92
Functions50
Methods126

API list

funcgunicorn.app.pasterapp.serve(app, global_conf, **local_conf)
A Paste Deployment server runner.
classgunicorn.arbiter.Arbiter
Arbiter maintain the workers processes alive.
methodgunicorn.arbiter.Arbiter.halt(reason=None, exit_status=0)
halt arbiter
methodgunicorn.arbiter.Arbiter.handle_hup()
HUP handling.
methodgunicorn.arbiter.Arbiter.handle_int()
SIGINT handling
methodgunicorn.arbiter.Arbiter.handle_quit()
SIGQUIT handling
methodgunicorn.arbiter.Arbiter.handle_term()
SIGTERM handling
methodgunicorn.arbiter.Arbiter.handle_ttin()
SIGTTIN handling.
methodgunicorn.arbiter.Arbiter.handle_ttou()
SIGTTOU handling.
methodgunicorn.arbiter.Arbiter.handle_usr1()
SIGUSR1 handling.
methodgunicorn.arbiter.Arbiter.handle_usr2()
SIGUSR2 handling.
methodgunicorn.arbiter.Arbiter.handle_winch()
SIGWINCH handling
methodgunicorn.arbiter.Arbiter.init_signals()
Initialize master signal handling.
methodgunicorn.arbiter.Arbiter.kill_dirty_arbiter(sig)
Send a signal to the dirty arbiter.
methodgunicorn.arbiter.Arbiter.murder_workers()
Kill unused/idle workers
methodgunicorn.arbiter.Arbiter.reap_workers()
Reap workers to avoid zombie processes
methodgunicorn.arbiter.Arbiter.reexec()
Relaunch the master and workers.
methodgunicorn.arbiter.Arbiter.run()
Main master loop.
methodgunicorn.arbiter.Arbiter.spawn_dirty_arbiter()
Spawn the dirty arbiter process.
methodgunicorn.arbiter.Arbiter.spawn_workers()
Spawn new workers as needed.
methodgunicorn.arbiter.Arbiter.start()
Initialize the arbiter.
methodgunicorn.arbiter.Arbiter.wait_for_signals(timeout=1.0)
Wait for signals with timeout.
methodgunicorn.arbiter.Arbiter.wakeup()
Wake up the arbiter's main loop.
classgunicorn.asgi.lifespan.LifespanManager
Manages ASGI lifespan events (startup/shutdown).
classgunicorn.asgi.parser.CallbackRequest
Request object built from callback parser state.
classgunicorn.asgi.parser.InvalidChunkExtension
Invalid chunk extension per RFC 9112.
classgunicorn.asgi.parser.InvalidChunkSize
Invalid chunk size in chunked transfer encoding.
classgunicorn.asgi.parser.InvalidHTTPVersion
Invalid HTTP version.
classgunicorn.asgi.parser.InvalidHeader
Invalid header value.
classgunicorn.asgi.parser.InvalidHeaderName
Invalid header name.
classgunicorn.asgi.parser.InvalidProxyHeader
Invalid PROXY protocol v2 header.
classgunicorn.asgi.parser.InvalidProxyLine
Invalid PROXY protocol v1 line.
classgunicorn.asgi.parser.InvalidRequestLine
Invalid request line.
classgunicorn.asgi.parser.InvalidRequestMethod
Invalid HTTP method.
classgunicorn.asgi.parser.LimitRequestHeaders
Too many headers or header field too large.
classgunicorn.asgi.parser.LimitRequestLine
Request line exceeds configured limit.
classgunicorn.asgi.parser.PPCommand
PROXY protocol v2 commands.
classgunicorn.asgi.parser.PPFamily
PROXY protocol v2 address families.
classgunicorn.asgi.parser.PPProtocol
PROXY protocol v2 transport protocols.
classgunicorn.asgi.parser.ParseError
Base error raised during HTTP parsing.
classgunicorn.asgi.parser.PythonProtocol
Callback-based HTTP/1.1 parser (pure Python fallback).
methodgunicorn.asgi.parser.PythonProtocol.reset()
Reset for next request (keepalive).
classgunicorn.asgi.parser.UnsupportedTransferCoding
Unsupported Transfer-Encoding value.
classgunicorn.asgi.protocol.ASGIProtocol
HTTP/1.1 protocol handler for ASGI applications.
classgunicorn.asgi.protocol.ASGIResponseInfo
Simple container for ASGI response info for access logging.
classgunicorn.asgi.protocol.BodyReceiver
Body receiver for callback-based parsers.
classgunicorn.asgi.protocol.FlowControl
Manage transport-level write flow control.
methodgunicorn.asgi.protocol.FlowControl.drain()
Wait until transport is writable.
classgunicorn.asgi.unreader.AsyncUnreader
Async socket reader with pushback buffer support.
classgunicorn.asgi.uwsgi.AsyncUWSGIRequest
Async version of UWSGIRequest.
methodgunicorn.asgi.uwsgi.AsyncUWSGIRequest.drain_body()
Drain unread body data.
methodgunicorn.asgi.uwsgi.AsyncUWSGIRequest.read_body(size=8192)
Read body chunk asynchronously.
classgunicorn.asgi.websocket.WebSocketProtocol
WebSocket connection handler for ASGI applications.
methodgunicorn.asgi.websocket.WebSocketProtocol.run()
Run the WebSocket ASGI application.
funcgunicorn.config.validate_http_parser(val)
Validate http_parser setting.
funcgunicorn.config.validate_http_protocols(val)
Validate http_protocols setting.
funcgunicorn.config.validate_proxy_protocol(val)
Validate proxy_protocol setting.
funcgunicorn.ctl.cli.format_all(data:dict) -> str
Format show all output for display.
funcgunicorn.ctl.cli.format_config(data:dict) -> str
Format config output for display.
funcgunicorn.ctl.cli.format_dirty(data:dict) -> str
Format dirty workers output for display.
funcgunicorn.ctl.cli.format_help(data:dict) -> str
Format help output for display.
funcgunicorn.ctl.cli.format_listeners(data:dict) -> str
Format listeners output for display.
funcgunicorn.ctl.cli.format_response(command:str, data:dict) -> str
Format response data based on command.
funcgunicorn.ctl.cli.format_stats(data:dict) -> str
Format stats output for display.
funcgunicorn.ctl.cli.format_workers(data:dict) -> str
Format workers output for display.
funcgunicorn.ctl.cli.main()
Main entry point for gunicornc CLI.
funcgunicorn.ctl.cli.run_command(socket_path:str, command:str, json_output:bool=False) -> int
Execute single command and exit.
funcgunicorn.ctl.cli.run_interactive(socket_path:str, json_output:bool=False) -> int
Run interactive CLI with readline support.
classgunicorn.ctl.client.ControlClient
Client for connecting to gunicorn control socket.
methodgunicorn.ctl.client.ControlClient.close()
Close connection.
methodgunicorn.ctl.client.ControlClient.connect()
Connect to control socket.
methodgunicorn.ctl.client.ControlClient.send_command(command:str, args:list=None) -> dict
Send command and wait for response.
classgunicorn.ctl.client.ControlClientError
Control client error.
funcgunicorn.ctl.client.parse_command(line:str) -> tuple
Parse a command line into command and args.
classgunicorn.ctl.handlers.CommandHandlers
Command handlers with access to arbiter state.
methodgunicorn.ctl.handlers.CommandHandlers.dirty_add(count:int=1) -> dict
Spawn additional dirty workers.
methodgunicorn.ctl.handlers.CommandHandlers.dirty_remove(count:int=1) -> dict
Remove dirty workers.
methodgunicorn.ctl.handlers.CommandHandlers.help() -> dict
Return list of available commands.
methodgunicorn.ctl.handlers.CommandHandlers.reload() -> dict
Trigger graceful reload (equivalent to SIGHUP).
methodgunicorn.ctl.handlers.CommandHandlers.reopen() -> dict
Reopen log files (equivalent to SIGUSR1).
methodgunicorn.ctl.handlers.CommandHandlers.show_config() -> dict
Return current effective configuration.
methodgunicorn.ctl.handlers.CommandHandlers.show_dirty() -> dict
Return dirty workers and apps information.
methodgunicorn.ctl.handlers.CommandHandlers.show_listeners() -> dict
Return bound socket information.
methodgunicorn.ctl.handlers.CommandHandlers.show_stats() -> dict
Return server statistics.
methodgunicorn.ctl.handlers.CommandHandlers.show_workers() -> dict
Return list of HTTP workers.
methodgunicorn.ctl.handlers.CommandHandlers.shutdown(mode:str='graceful') -> dict
Initiate shutdown.
methodgunicorn.ctl.handlers.CommandHandlers.worker_add(count:int=1) -> dict
Increase worker count.
methodgunicorn.ctl.handlers.CommandHandlers.worker_kill(pid:int) -> dict
Gracefully terminate a specific worker.
methodgunicorn.ctl.handlers.CommandHandlers.worker_remove(count:int=1) -> dict
Decrease worker count.
classgunicorn.ctl.protocol.ControlProtocol
Protocol implementation for control socket communication.
methodgunicorn.ctl.protocol.ControlProtocol.decode_message(data:bytes) -> dict
Decode a message from bytes.
methodgunicorn.ctl.protocol.ControlProtocol.encode_message(data:dict) -> bytes
Encode a message for transmission.
methodgunicorn.ctl.protocol.ControlProtocol.read_message(sock) -> dict
Read one message from a socket.
methodgunicorn.ctl.protocol.ControlProtocol.read_message_async(reader) -> dict
Read one message from an async reader.
methodgunicorn.ctl.protocol.ControlProtocol.write_message(sock, data:dict)
Write one message to a socket.
methodgunicorn.ctl.protocol.ControlProtocol.write_message_async(writer, data:dict)
Write one message to an async writer.
classgunicorn.ctl.protocol.ProtocolError
Protocol-level error.
funcgunicorn.ctl.protocol.make_error_response(request_id:int, error:str) -> dict
Create an error response message.
funcgunicorn.ctl.protocol.make_request(request_id:int, command:str, args:list=None) -> dict
Create a request message.
funcgunicorn.ctl.protocol.make_response(request_id:int, data:dict=None) -> dict
Create a success response message.
classgunicorn.ctl.server.ControlSocketServer
Control socket server running in arbiter process.
methodgunicorn.ctl.server.ControlSocketServer.stop()
Stop server and cleanup socket.
funcgunicorn.debug.unspew()
Remove the trace hook installed by spew.
classgunicorn.dirty.app.DirtyApp
Base class for dirty applications.
methodgunicorn.dirty.app.DirtyApp.close()
Cleanup resources.
methodgunicorn.dirty.app.DirtyApp.init()
Initialize the application.
funcgunicorn.dirty.app.parse_dirty_app_spec(spec)
Parse a dirty app specification.
classgunicorn.dirty.arbiter.DirtyArbiter
Dirty arbiter that manages the dirty worker pool.
methodgunicorn.dirty.arbiter.DirtyArbiter.init_signals()
Set up signal handlers.
methodgunicorn.dirty.arbiter.DirtyArbiter.kill_worker(pid, sig)
Kill a worker by PID.
methodgunicorn.dirty.arbiter.DirtyArbiter.murder_workers()
Kill workers that have timed out.
methodgunicorn.dirty.arbiter.DirtyArbiter.reap_workers()
Reap dead worker processes.
methodgunicorn.dirty.arbiter.DirtyArbiter.reload()
Reload workers (SIGHUP handling).
methodgunicorn.dirty.arbiter.DirtyArbiter.run()
Run the dirty arbiter (blocking call).
methodgunicorn.dirty.arbiter.DirtyArbiter.spawn_worker(force_all_apps=False)
Spawn a new dirty worker.
methodgunicorn.dirty.arbiter.DirtyArbiter.stop(graceful=True)
Stop all workers.
classgunicorn.dirty.client.DirtyClient
Client for calling dirty workers from HTTP workers.
methodgunicorn.dirty.client.DirtyClient.close()
Close the sync connection.
methodgunicorn.dirty.client.DirtyClient.close_async()
Close the async connection.
funcgunicorn.dirty.client.get_dirty_client(timeout=30.0) -> DirtyClient
Get or create a thread-local sync client.
funcgunicorn.dirty.client.get_dirty_client_async(timeout=30.0) -> DirtyClient
Get or create a context-local async client.
funcgunicorn.dirty.client.get_dirty_socket_path()
Get the dirty socket path.
classgunicorn.dirty.errors.DirtyAppError
Raised when a dirty app encounters an error during execution.
classgunicorn.dirty.errors.DirtyAppNotFoundError
Raised when a dirty app is not found.
classgunicorn.dirty.errors.DirtyConnectionError
Raised when connection to dirty arbiter fails.
classgunicorn.dirty.errors.DirtyError
Base exception for all dirty arbiter errors.
classgunicorn.dirty.errors.DirtyProtocolError
Raised when there is a protocol-level error.
classgunicorn.dirty.errors.DirtyTimeoutError
Raised when a dirty operation times out.
classgunicorn.dirty.errors.DirtyWorkerError
Raised when a dirty worker encounters an error.
classgunicorn.dirty.protocol.BinaryProtocol
Binary message protocol for dirty worker IPC.
methodgunicorn.dirty.protocol.BinaryProtocol.decode_header(data:bytes) -> tuple
Decode the 16-byte message header.
methodgunicorn.dirty.protocol.BinaryProtocol.decode_message(data:bytes) -> tuple
Decode a complete message (header + payload).
methodgunicorn.dirty.protocol.BinaryProtocol.encode_chunk(request_id:int, data) -> bytes
Encode a chunk message for streaming responses.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_end(request_id:int) -> bytes
Encode an end-of-stream message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_error(request_id:int, error) -> bytes
Encode an error response message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_header(msg_type:int, request_id:int, payload_length:int) -> bytes
Encode the 16-byte message header.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_manage(request_id:int, op:int, count:int=1) -> bytes
Encode a worker management message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_request(request_id:int, app_path:str, action:str, args:tuple=None, kwargs:dict=None) -> bytes
Encode a request message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_response(request_id:int, result) -> bytes
Encode a success response message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_stash(request_id:int, op:int, table:str, key=None, value=None, pattern=None) -> bytes
Encode a stash operation message.
methodgunicorn.dirty.protocol.BinaryProtocol.encode_status(request_id:int) -> bytes
Encode a status query message.
methodgunicorn.dirty.protocol.BinaryProtocol.read_message(sock:socket.socket) -> dict
Read a complete message from socket (sync).
methodgunicorn.dirty.protocol.BinaryProtocol.read_message_async(reader:asyncio.StreamReader) -> dict
Read a complete binary message from async stream.
methodgunicorn.dirty.protocol.BinaryProtocol.write_message(sock:socket.socket, message:dict) -> None
Write a message to socket (sync).
methodgunicorn.dirty.protocol.BinaryProtocol.write_message_async(writer:asyncio.StreamWriter, message:dict) -> None
Write a message to async stream.
funcgunicorn.dirty.protocol.make_chunk_message(request_id, data) -> dict
Build a chunk message dict for streaming responses.
funcgunicorn.dirty.protocol.make_end_message(request_id) -> dict
Build an end-of-stream message dict.
funcgunicorn.dirty.protocol.make_error_response(request_id, error) -> dict
Build an error response message dict.
funcgunicorn.dirty.protocol.make_manage_message(request_id, op:int, count:int=1) -> dict
Build a worker management message dict.
funcgunicorn.dirty.protocol.make_request(request_id, app_path:str, action:str, args:tuple=None, kwargs:dict=None) -> dict
Build a request message dict.
funcgunicorn.dirty.protocol.make_response(request_id, result) -> dict
Build a success response message dict.
funcgunicorn.dirty.protocol.make_stash_message(request_id, op:int, table:str, key=None, value=None, pattern=None) -> dict
Build a stash operation message dict.
classgunicorn.dirty.stash.StashClient
Client for stash operations.
methodgunicorn.dirty.stash.StashClient.clear(table)
Delete all entries in a table.
methodgunicorn.dirty.stash.StashClient.close()
Close the client connection.
methodgunicorn.dirty.stash.StashClient.delete(table, key)
Delete a key from a table.
methodgunicorn.dirty.stash.StashClient.delete_table(table)
Delete an entire table.
methodgunicorn.dirty.stash.StashClient.exists(table, key=None)
Check if a table or key exists.
methodgunicorn.dirty.stash.StashClient.get(table, key, default=None)
Retrieve a value from a table.
methodgunicorn.dirty.stash.StashClient.info(table)
Get information about a table.
methodgunicorn.dirty.stash.StashClient.put(table, key, value)
Store a value in a table.
methodgunicorn.dirty.stash.StashClient.table(name)
Get a dict-like interface to a table.
methodgunicorn.dirty.stash.StashClient.tables()
List all tables.
classgunicorn.dirty.stash.StashError
Base exception for stash operations.
classgunicorn.dirty.stash.StashKeyNotFoundError
Raised when a key does not exist in a table.
classgunicorn.dirty.stash.StashTable
Dict-like interface to a stash table.
methodgunicorn.dirty.stash.StashTable.clear()
Delete all entries.
methodgunicorn.dirty.stash.StashTable.get(key, default=None)
Get value with default.
methodgunicorn.dirty.stash.StashTable.items()
Iterate over (key, value) pairs.
methodgunicorn.dirty.stash.StashTable.name()
Table name.
methodgunicorn.dirty.stash.StashTable.values()
Iterate over values.
classgunicorn.dirty.stash.StashTableNotFoundError
Raised when a table does not exist.
funcgunicorn.dirty.stash.clear(table)
Delete all entries in a table.
funcgunicorn.dirty.stash.delete(table, key)
Delete a key from a table.
funcgunicorn.dirty.stash.delete_table(table)
Delete an entire table.
funcgunicorn.dirty.stash.ensure(table)
Ensure a table exists.
funcgunicorn.dirty.stash.exists(table, key=None)
Check if a table or key exists.
funcgunicorn.dirty.stash.get(table, key, default=None)
Retrieve a value from a table.
funcgunicorn.dirty.stash.get_stash_socket_path()
Get the stash socket path.
funcgunicorn.dirty.stash.info(table)
Get information about a table.
funcgunicorn.dirty.stash.keys(table, pattern=None)
Get all keys in a table.
funcgunicorn.dirty.stash.put(table, key, value)
Store a value in a table.
funcgunicorn.dirty.stash.table(name)
Get a dict-like interface to a table.
funcgunicorn.dirty.stash.tables()
List all tables.
classgunicorn.dirty.tlv.TLVEncoder
TLV binary encoder/decoder.
methodgunicorn.dirty.tlv.TLVEncoder.decode(data:bytes, offset:int=0) -> tuple
Decode a TLV-encoded value from binary data.
methodgunicorn.dirty.tlv.TLVEncoder.encode(value) -> bytes
Encode a Python value to TLV binary format.
methodgunicorn.dirty.worker.DirtyWorker.handle_request(message, writer)
Handle a single request message.
methodgunicorn.dirty.worker.DirtyWorker.init_signals()
Set up signal handlers.
methodgunicorn.dirty.worker.DirtyWorker.load_apps()
Load all configured dirty apps.
methodgunicorn.dirty.worker.DirtyWorker.notify()
Update heartbeat timestamp.
methodgunicorn.dirty.worker.DirtyWorker.run()
Run the main asyncio event loop.
classgunicorn.errors.AppImportError
Exception raised when loading an application
classgunicorn.errors.ConfigError
Exception raised on config error
methodgunicorn.glogging.Logger.access_log_enabled()
Check if access logging is enabled.
methodgunicorn.glogging.Logger.atoms(resp, req, environ, request_time)
Gets atoms for log formatting.
methodgunicorn.glogging.Logger.now()
return date in Apache Common Log Format
funcgunicorn.glogging.loggers()
get list of all loggers
classgunicorn.http.errors.InvalidChunkExtension
Invalid chunk extension per RFC 9112.
classgunicorn.http.message.PPCommand
PROXY protocol v2 commands.
classgunicorn.http.message.PPFamily
PROXY protocol v2 address families.
classgunicorn.http.message.PPProtocol
PROXY protocol v2 transport protocols.
funcgunicorn.http.wsgi.send_early_hints(headers)
Send 103 Early Hints response.
classgunicorn.http2.async_connection.AsyncHTTP2Connection
Async HTTP/2 server-side connection handler for ASGI.
methodgunicorn.http2.async_connection.AsyncHTTP2Connection.is_closed()
Check if connection is closed.
methodgunicorn.http2.async_connection.AsyncHTTP2Connection.send_data(stream_id, data, end_stream=False)
Send data on a stream.
classgunicorn.http2.connection.HTTP2ServerConnection
HTTP/2 server-side connection handler.
methodgunicorn.http2.connection.HTTP2ServerConnection.is_closed()
Check if connection is closed.
methodgunicorn.http2.connection.HTTP2ServerConnection.send_data(stream_id, data, end_stream=False)
Send data on a stream.
classgunicorn.http2.errors.HTTP2Cancel
Stream was cancelled.
classgunicorn.http2.errors.HTTP2CompressionError
Compression state error.
classgunicorn.http2.errors.HTTP2ConfigurationError
Invalid HTTP/2 configuration.
classgunicorn.http2.errors.HTTP2ConnectError
Connection error during CONNECT.
classgunicorn.http2.errors.HTTP2ConnectionError
Error affecting the entire connection.
classgunicorn.http2.errors.HTTP2EnhanceYourCalm
Peer is generating excessive load.
classgunicorn.http2.errors.HTTP2Error
Base exception for HTTP/2 errors.
classgunicorn.http2.errors.HTTP2ErrorCode
HTTP/2 Error Codes (RFC 7540 Section 7).
classgunicorn.http2.errors.HTTP2FlowControlError
Flow control limits exceeded.
classgunicorn.http2.errors.HTTP2FrameSizeError
Frame size is incorrect.
classgunicorn.http2.errors.HTTP2InadequateSecurity
Transport security is inadequate.
classgunicorn.http2.errors.HTTP2InternalError
Internal error occurred.
classgunicorn.http2.errors.HTTP2NotAvailable
HTTP/2 support is not available (h2 library not installed).
classgunicorn.http2.errors.HTTP2ProtocolError
Protocol error detected.
classgunicorn.http2.errors.HTTP2RefusedStream
Stream was refused.
classgunicorn.http2.errors.HTTP2RequiresHTTP11
HTTP/1.1 is required for this request.
classgunicorn.http2.errors.HTTP2SettingsTimeout
Settings acknowledgment timeout.
classgunicorn.http2.errors.HTTP2StreamClosed
Stream was closed.
classgunicorn.http2.errors.HTTP2StreamError
Error specific to a single stream.
funcgunicorn.http2.get_h2_version()
Get the installed h2 library version.
funcgunicorn.http2.is_http2_available()
Check if HTTP/2 support is available.
classgunicorn.http2.request.HTTP2Body
Body wrapper for HTTP/2 request data.
methodgunicorn.http2.request.HTTP2Body.close()
Close the body stream.
methodgunicorn.http2.request.HTTP2Body.read(size=None)
Read data from the body.
methodgunicorn.http2.request.HTTP2Body.readline(size=None)
Read a line from the body.
methodgunicorn.http2.request.HTTP2Body.readlines(hint=None)
Read all lines from the body.
classgunicorn.http2.stream.HTTP2Stream
Represents a single HTTP/2 stream.
methodgunicorn.http2.stream.HTTP2Stream.can_send()
Check if this stream can send data.
methodgunicorn.http2.stream.HTTP2Stream.close()
Close this stream normally.
methodgunicorn.http2.stream.HTTP2Stream.get_request_body()
Get the complete request body.
methodgunicorn.http2.stream.HTTP2Stream.reset(error_code=8)
Reset this stream with RST_STREAM.
methodgunicorn.http2.stream.HTTP2Stream.send_data(data, end_stream=False)
Mark data as sent.
methodgunicorn.http2.stream.HTTP2Stream.send_headers(headers, end_stream=False)
Mark headers as sent.
classgunicorn.http2.stream.StreamState
HTTP/2 stream states as defined in RFC 7540 Section 5.1.
classgunicorn.instrument.statsd.Statsd
statsD-based instrumentation, that passes as a logger
classgunicorn.pidfile.Pidfile
Manage a PID file.
methodgunicorn.pidfile.Pidfile.unlink()
delete pidfile
funcgunicorn.systemd.sd_notify(state, logger, unset_environment=False)
Send a notification to systemd.
funcgunicorn.util.daemonize(enable_stdio_inheritance=False)
Standard daemonization of a process.
funcgunicorn.util.get_username(uid)
get the username for a user id
classgunicorn.uwsgi.errors.ForbiddenUWSGIRequest
Raised when source IP is not in the allow list.
classgunicorn.uwsgi.errors.InvalidUWSGIHeader
Raised when the uWSGI header is malformed.
classgunicorn.uwsgi.errors.UWSGIParseException
Base exception for uWSGI protocol parsing errors.
classgunicorn.uwsgi.errors.UnsupportedModifier
Raised when modifier1 is not 0 (WSGI request).
classgunicorn.uwsgi.message.UWSGIRequest
uWSGI protocol request parser.
classgunicorn.uwsgi.parser.UWSGIParser
Parser for uWSGI protocol requests.
methodgunicorn.workers.base.Worker.run()
This is the mainloop of a worker process.
classgunicorn.workers.gasgi.ASGIWorker
ASGI worker using asyncio event loop.
methodgunicorn.workers.gasgi.ASGIWorker.handle_abort_signal()
Handle SIGABRT - abort.
methodgunicorn.workers.gasgi.ASGIWorker.handle_usr1_signal()
Handle SIGUSR1 - reopen log files.
methodgunicorn.workers.gasgi.ASGIWorker.init_process()
Initialize the worker process.
methodgunicorn.workers.gasgi.ASGIWorker.load_wsgi()
Load the ASGI application.
methodgunicorn.workers.gasgi.ASGIWorker.run()
Main entry point for the worker.
classgunicorn.workers.ggevent.GeventPyWSGIWorker
The Gevent StreamServer based workers.
classgunicorn.workers.gthread.PollableMethodQueue
Thread-safe queue that can wake up a selector.
methodgunicorn.workers.gthread.PollableMethodQueue.close()
Close the pipe file descriptors.
methodgunicorn.workers.gthread.PollableMethodQueue.init()
Initialize the pipe and queue.
methodgunicorn.workers.gthread.PollableMethodQueue.run_callbacks(_fileobj, max_callbacks=50)
Run queued callbacks.
classgunicorn.workers.sync.StopWaiting
exception raised to stop waiting for a connection

About this data

These signatures were extracted from the public source of benoitc/gunicorn using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries