Metadata-Version: 2.3
Name: gunicorn-env-cfg
Version: 1.0.0
Summary: Configure gunicorn from environment variables
Author: joshiggins
Author-email: joshiggins <5124298+joshiggins@users.noreply.github.com>
License: Apache-2.0
Requires-Dist: gunicorn===25.1.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# gunicorn-env-cfg

Configure [gunicorn](https://gunicorn.org/) from `GUNICORN_*` environment variables.

## Usage

Load the module as your gunicorn config:

```sh
gunicorn -c python:gunicorn_env_cfg app:app
```

or

``` sh
GUNICORN_CMD_ARGS="-c python:gunicorn_env_cfg" gunicorn
```

Each `GUNICORN_<NAME>` environment variable sets the config option `<name>`
(lowercased). For example:

```sh
export GUNICORN_WORKERS=4
export GUNICORN_BIND=0.0.0.0:8000
export GUNICORN_WSGI_APP=app:app
export GUNICORN_CMD_ARGS="-c python:gunicorn_env_cfg"
gunicorn
```

See the [gunicorn settings](https://docs.gunicorn.org/en/stable/settings.html) for the
full list of available options.

## Behaviour

- `GUNICORN_CMD_ARGS` is left untouched for gunicorn's own handling.
- Variables without the `GUNICORN_` prefix are ignored.
- An unknown option raises a `ValueError` at startup, so typos fail fast rather
  than being silently ignored.
