Reference

Reference: runtime type python

tenants[].applications[].routes[].runtime<python>.app

Syntaxapp: <string>
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

module:callable, e.g. app:app or mysite.wsgi:application.

tenants[].applications[].routes[].runtime<python>.command

Syntaxcommand: [<string>, ...]
Default[]
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Explicit argv. Bind arguments are appended for uvicorn/hypercorn/gunicorn unless the argv already contains {socket} or {port}.

tenants[].applications[].routes[].runtime<python>.env

Syntaxenv: {<key>: <string>, ...}
Defaultempty
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Environment variables for the processes.

tenants[].applications[].routes[].runtime<python>.health_path

Syntaxhealth_path: <string>
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Path requested to decide that a worker is ready and healthy.

tenants[].applications[].routes[].runtime<python>.listen

Syntaxlisten: unix | tcp
Defaultunix
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

unix: a socket under runtime_dir; tcp: a free loopback port.

tenants[].applications[].routes[].runtime<python>.mode

Syntaxmode: asgi | wsgi
Defaultrequired
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

asgi (uvicorn) or wsgi (gunicorn).

tenants[].applications[].routes[].runtime<python>.process_pool

Syntaxprocess_pool: true | false
Defaultfalse
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

scalws runs workers.min..max single-worker server processes itself instead of one server with --workers, so the pool can be scaled and restarted live (ADR-0014). Trades the server’s copy-on-write sharing for scaling.

tenants[].applications[].routes[].runtime<python>.response_timeout

Syntaxresponse_timeout: <duration> (e.g. 30s)
Default60s
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Time to wait for the response headers of the application.

tenants[].applications[].routes[].runtime<python>.server

Syntaxserver: uvicorn | hypercorn | gunicorn
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Default: uvicorn for ASGI, gunicorn for WSGI.

tenants[].applications[].routes[].runtime<python>.startup_timeout

Syntaxstartup_timeout: <duration> (e.g. 30s)
Default30s
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Time the processes get to become ready.

tenants[].applications[].routes[].runtime<python>.stop_timeout

Syntaxstop_timeout: <duration> (e.g. 30s)
Default10s
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Time the processes get to exit after SIGTERM before they are killed.

tenants[].applications[].routes[].runtime<python>.upstream

Syntaxupstream: <string>
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Proxy to a Python server managed elsewhere instead of starting one.

tenants[].applications[].routes[].runtime<python>.virtualenv

Syntaxvirtualenv: <string>
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Virtual environment whose server binary and packages are used.

tenants[].applications[].routes[].runtime<python>.workers

Syntaxworkers: {...}
Defaultnone
Contexttenants[].applications[].routes[].runtime (type: python)
Reloadapplies on reload

Worker processes of the application server (min).

tenants[].applications[].routes[].runtime<python>.workers.autoscale

Syntaxautoscale: off | auto | recommend
Defaultrecommend
Contexttenants[].applications[].routes[].runtime<python>.workers
Reloadapplies on reload

off, recommend (default) or auto (ADR-0014).

tenants[].applications[].routes[].runtime<python>.workers.max

Syntaxmax: <integer>
Defaultrequired
Contexttenants[].applications[].routes[].runtime<python>.workers
Reloadapplies on reload

Upper bound when the pool is scaled.

tenants[].applications[].routes[].runtime<python>.workers.min

Syntaxmin: <integer>
Defaultrequired
Contexttenants[].applications[].routes[].runtime<python>.workers
Reloadapplies on reload

Processes started at the beginning and kept at least.

tenants[].applications[].routes[].runtime<python>.workers.target_concurrency

Syntaxtarget_concurrency: <integer>
Defaultnone
Contexttenants[].applications[].routes[].runtime<python>.workers
Reloadapplies on reload

Concurrent requests one worker is expected to handle well (utilisation basis).

tenants[].applications[].runtime<python>.app

Syntaxapp: <string>
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

module:callable, e.g. app:app or mysite.wsgi:application.

tenants[].applications[].runtime<python>.command

Syntaxcommand: [<string>, ...]
Default[]
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Explicit argv. Bind arguments are appended for uvicorn/hypercorn/gunicorn unless the argv already contains {socket} or {port}.

tenants[].applications[].runtime<python>.env

Syntaxenv: {<key>: <string>, ...}
Defaultempty
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Environment variables for the processes.

tenants[].applications[].runtime<python>.health_path

Syntaxhealth_path: <string>
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Path requested to decide that a worker is ready and healthy.

tenants[].applications[].runtime<python>.listen

Syntaxlisten: unix | tcp
Defaultunix
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

unix: a socket under runtime_dir; tcp: a free loopback port.

tenants[].applications[].runtime<python>.mode

Syntaxmode: asgi | wsgi
Defaultrequired
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

asgi (uvicorn) or wsgi (gunicorn).

tenants[].applications[].runtime<python>.process_pool

Syntaxprocess_pool: true | false
Defaultfalse
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

scalws runs workers.min..max single-worker server processes itself instead of one server with --workers, so the pool can be scaled and restarted live (ADR-0014). Trades the server’s copy-on-write sharing for scaling.

tenants[].applications[].runtime<python>.response_timeout

Syntaxresponse_timeout: <duration> (e.g. 30s)
Default60s
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Time to wait for the response headers of the application.

tenants[].applications[].runtime<python>.server

Syntaxserver: uvicorn | hypercorn | gunicorn
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Default: uvicorn for ASGI, gunicorn for WSGI.

tenants[].applications[].runtime<python>.startup_timeout

Syntaxstartup_timeout: <duration> (e.g. 30s)
Default30s
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Time the processes get to become ready.

tenants[].applications[].runtime<python>.stop_timeout

Syntaxstop_timeout: <duration> (e.g. 30s)
Default10s
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Time the processes get to exit after SIGTERM before they are killed.

tenants[].applications[].runtime<python>.upstream

Syntaxupstream: <string>
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Proxy to a Python server managed elsewhere instead of starting one.

tenants[].applications[].runtime<python>.virtualenv

Syntaxvirtualenv: <string>
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Virtual environment whose server binary and packages are used.

tenants[].applications[].runtime<python>.workers

Syntaxworkers: {...}
Defaultnone
Contexttenants[].applications[].runtime (type: python)
Reloadapplies on reload

Worker processes of the application server (min).

tenants[].applications[].runtime<python>.workers.autoscale

Syntaxautoscale: off | auto | recommend
Defaultrecommend
Contexttenants[].applications[].runtime<python>.workers
Reloadapplies on reload

off, recommend (default) or auto (ADR-0014).

tenants[].applications[].runtime<python>.workers.max

Syntaxmax: <integer>
Defaultrequired
Contexttenants[].applications[].runtime<python>.workers
Reloadapplies on reload

Upper bound when the pool is scaled.

tenants[].applications[].runtime<python>.workers.min

Syntaxmin: <integer>
Defaultrequired
Contexttenants[].applications[].runtime<python>.workers
Reloadapplies on reload

Processes started at the beginning and kept at least.

tenants[].applications[].runtime<python>.workers.target_concurrency

Syntaxtarget_concurrency: <integer>
Defaultnone
Contexttenants[].applications[].runtime<python>.workers
Reloadapplies on reload

Concurrent requests one worker is expected to handle well (utilisation basis).