gunicorn_environmentconfig
Configure gunicorn completely via environment variables.
gunicorn itself provides environment variable access to only some of its settings. This package closes the gap, and allows configuring all settings via the environment.
Usage
Put this into your config file (usually gunicorn.conf.py):
import gunicorn_environmentconfig
gunicorn_environmentconfig.apply(globals())
Set environment variables with the naming scheme gunicorn.{setting},
where setting is the name you'd use in the config file, for example:
env gunicorn.preload_app=true python -m gunicorn myapp
If you append __literal__ to the variable name, they are evaluated as Python literals,
for example to make gunicorn use the already existing logging configuration
(which might e.g. use a JSON formatter)
and not set up its own formatters, use this:
gunicorn.logconfig_dict__literal__={'root': {}, 'loggers': {'gunicorn.error': {'propagate': True}}, 'handlers': {}, 'formatters': {}}
Special case: ini file
To help with transitioning, settings read from a paste.ini configuration file can be added to the environment (environment takes priority).
To use this, set the GUNICORN_INI_CONFIG environment variable to the filename and section name.
[app:main]
use = egg:myapp#main
my_app_setting = value1
gunicorn.preload_app = true
env GUNICORN_INI_CONFIG=paste.ini#app:main python -m gunicorn myapp
gunicorn_environmentconfig Changes
1.0.1 (2023-05-19)
- ini: Export ini file settings into environment (ini)
1.0.0 (2023-05-17)
- Initial release (initial)
Metadata
Release files for gunicorn_environmentconfig 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gunicorn_environmentconfig-1.0.1.tar.gz | 3.4 kB | Without provenance | Details for gunicorn_environmentconfig-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gunicorn_environmentconfig-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for gunicorn_environmentconfig-1.0.1-py3-none-any.whl |
Total release size: 7.7 kB
Release files / gunicorn_environmentconfig-1.0.1.tar.gz
| Download URL | gunicorn_environmentconfig-1.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1955fefdf0f9300f4b3fcade57cea095fd584015eb3255d701cbce9d24381824
|
|
BLAKE2b-256 checksum How to use checksums |
8991f3d71a84a51db68c11e597f42bb120748862aaa2f0e6a6cb62f6a2517d9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.0
|
Release files / gunicorn_environmentconfig-1.0.1-py3-none-any.whl
| Download URL | gunicorn_environmentconfig-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
421e83f373e0b4fe633fc02e080ada75df69adae17d417c8ed6a92d8eec59224
|
|
BLAKE2b-256 checksum How to use checksums |
9752c71f2dcc4751c38911b6c1251be1db173c4ae935d0f0d35a1d8fd4d35b61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.0
|
Security for gunicorn_environmentconfig 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.