Nice¶
This preset offers nice configuration defaults.
Classes¶
PythonSection¶
Basic nice configuration using Python plugin.
master_process ¶
Master process options group.
project_name ¶
Project name (alias) to be used to differentiate projects. See .replace_placeholders().
subscriptions ¶
Subscription services options group.
as_configuration ¶
bootstrap ¶
-
Data source name, e.g:
Note
Some schemas: fastcgi, http, https, raw, scgi, shared, udp, uwsgi, suwsgi, zeromq
-
Allows using shared sockets to bind to privileged ports. If not provided automatic mode is enabled: shared are allowed if current user is not root.
-
Additional initialization keyword arguments accepted by section type.
Constructs a section object performing its basic (default) configuration.
configure_certbot_https ¶
-
Domain name certificates issued for (the same as in
-doption in the above command). -
Directory to store challenge files to get and renew the certificate (the same as in
-woption in the above command). -
Address to bind socket to.
-
Allows using shared sockets to bind to privileged ports. If not provided automatic mode is enabled: shared are allowed if current user is not root.
-
Redirect HTTP requests to HTTPS if certificates exist.
Enables HTTPS using certificates from Certbot https://certbot.eff.org.
Note
This relies on webroot mechanism of Certbot - https://certbot.eff.org/docs/using.html#webroot
1 | |
configure_logging_json ¶
-
Custom template string for the message.
-
Custom addition context template dictionary. The following macros are available for values: * src - uwsgi.req or uwsgi.out * msg - data from
tpl_msg(if uwsgi.req) or out (if uwsgi.out) * dt_iso - iso datetime, e.g. 2025-06-06T22:47:03+0700 * ts_ms - timestamp, e.g. 1749224823443
Configures uWSGI output to be json-formatted.
configure_maintenance_mode ¶
-
This triggers maintenance mode responses. Should be a path to a file: if file exists, maintenance mode is on.
-
Response to give in maintenance mode.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Supported: 1. File path - this file will be served in response. 2. URLs starting with ``http`` - requests will be redirected there using 302. This is often discouraged, because it may have search ranking implications. 3. Prefix ``app`` will replace your entire app with a maintenance one. Using this also prevents background tasks registration and execution (including scheduler, timers, signals). * If the value is `app` - the default maintenance application bundled with uwsgiconf would be used. * Format ``app::<your-module>:<your-app-function>`` instructs uwsgiconf to load your function as a maintenance app. E.g.: app::my_pack.my_module:my_func
Allows maintenance mode when a certain response is given for every request if a trigger is set.
configure_owner ¶
derive_from ¶
env ¶
-
Whether to unset this variable.
-
If True env variable will be set as soon as possible.
-
Whether we need to set this value for local environment too. This could be useful in embedded mode.
Processes (sets/unsets) environment variable.
If is not given in set mode value will be taken from current env.
get_bundled_static_path ¶
get_log_format_default ¶
Returns default log message format.
Note
Some params may be missing.
get_runtime_dir ¶
include ¶
print_out ¶
print_stamp ¶
Prints out a stamp containing useful information, such as what and when has generated this configuration.
print_variables ¶
Prints out magic variables available in config files alongside with their values and descriptions. May be useful for debugging.
http://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables
replace_placeholders ¶
Replaces placeholders that can be used e.g. in filepaths.
Supported placeholders: * {project_runtime_dir} * {project_name} * {runtime_dir}
set_fallback ¶
set_placeholder ¶
Placeholders are custom magic variables defined during configuration time.
Note
These are accessible, like any uWSGI option, in your application code via
.runtime.platform.uwsgi.config.
set_plugins_params ¶
-
uWSGI plugins to load
-
Directories to search for uWSGI plugins.
-
Try to automatically load plugins when unknown options are found.
-
Load uWSGI plugins and exit on error.
Sets plugin-related parameters.
set_runtime_dir ¶
Sets user-defined runtime directory value.
embedded_plugins_presets ¶
These are plugin presets that can be used as embedded_plugins values.
BASIC¶
Basic set of embedded plugins. This set is used in uWSGI package from PyPI.
vars ¶
The following variables also known as magic variables could be used as option values where appropriate.
Section¶
Basic nice configuration.
master_process ¶
Master process options group.
project_name ¶
Project name (alias) to be used to differentiate projects. See .replace_placeholders().
subscriptions ¶
Subscription services options group.
as_configuration ¶
bootstrap ¶
-
Data source name, e.g:
Note
Some schemas: fastcgi, http, https, raw, scgi, shared, udp, uwsgi, suwsgi, zeromq
-
Allows using shared sockets to bind to privileged ports. If not provided automatic mode is enabled: shared are allowed if current user is not root.
-
Additional initialization keyword arguments accepted by section type.
Constructs a section object performing its basic (default) configuration.
configure_certbot_https¶
-
Domain name certificates issued for (the same as in
-doption in the above command). -
Directory to store challenge files to get and renew the certificate (the same as in
-woption in the above command). -
Address to bind socket to.
-
Allows using shared sockets to bind to privileged ports. If not provided automatic mode is enabled: shared are allowed if current user is not root.
-
Redirect HTTP requests to HTTPS if certificates exist.
Enables HTTPS using certificates from Certbot https://certbot.eff.org.
Note
This relies on webroot mechanism of Certbot - https://certbot.eff.org/docs/using.html#webroot
1 | |
configure_logging_json¶
-
Custom template string for the message.
-
Custom addition context template dictionary. The following macros are available for values: * src - uwsgi.req or uwsgi.out * msg - data from
tpl_msg(if uwsgi.req) or out (if uwsgi.out) * dt_iso - iso datetime, e.g. 2025-06-06T22:47:03+0700 * ts_ms - timestamp, e.g. 1749224823443
Configures uWSGI output to be json-formatted.
configure_maintenance_mode¶
-
This triggers maintenance mode responses. Should be a path to a file: if file exists, maintenance mode is on.
-
Response to give in maintenance mode.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Supported: 1. File path - this file will be served in response. 2. URLs starting with ``http`` - requests will be redirected there using 302. This is often discouraged, because it may have search ranking implications. 3. Prefix ``app`` will replace your entire app with a maintenance one. Using this also prevents background tasks registration and execution (including scheduler, timers, signals). * If the value is `app` - the default maintenance application bundled with uwsgiconf would be used. * Format ``app::<your-module>:<your-app-function>`` instructs uwsgiconf to load your function as a maintenance app. E.g.: app::my_pack.my_module:my_func
Allows maintenance mode when a certain response is given for every request if a trigger is set.
configure_owner¶
derive_from ¶
env ¶
-
Whether to unset this variable.
-
If True env variable will be set as soon as possible.
-
Whether we need to set this value for local environment too. This could be useful in embedded mode.
Processes (sets/unsets) environment variable.
If is not given in set mode value will be taken from current env.
get_bundled_static_path ¶
get_log_format_default¶
Returns default log message format.
Note
Some params may be missing.
get_runtime_dir ¶
include ¶
print_out ¶
print_stamp ¶
Prints out a stamp containing useful information, such as what and when has generated this configuration.
print_variables ¶
Prints out magic variables available in config files alongside with their values and descriptions. May be useful for debugging.
http://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables
replace_placeholders ¶
Replaces placeholders that can be used e.g. in filepaths.
Supported placeholders: * {project_runtime_dir} * {project_name} * {runtime_dir}
set_fallback ¶
set_placeholder ¶
Placeholders are custom magic variables defined during configuration time.
Note
These are accessible, like any uWSGI option, in your application code via
.runtime.platform.uwsgi.config.
set_plugins_params ¶
-
uWSGI plugins to load
-
Directories to search for uWSGI plugins.
-
Try to automatically load plugins when unknown options are found.
-
Load uWSGI plugins and exit on error.
Sets plugin-related parameters.
set_runtime_dir ¶
Sets user-defined runtime directory value.
embedded_plugins_presets ¶
These are plugin presets that can be used as embedded_plugins values.
BASIC¶
Basic set of embedded plugins. This set is used in uWSGI package from PyPI.
vars ¶
The following variables also known as magic variables could be used as option values where appropriate.