betty.extension.nginx.config module - Betty 0.4.0a1 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.extension.nginx.config module

Integrate Betty with nginx.

class betty.extension.nginx.config.NginxConfiguration

  Bases: `Configuration`

  Provide configuration for the `betty.extension.nginx.Nginx` extension.

  Parameters:

    - www_directory_path (`str` | `None`)

    - https (`bool` | `None`)

  __init__(*, www_directory_path: str | None = None, https: bool | None = None)
    Parameters:

      - www_directory_path (`str` | `None`)

      - https (`bool` | `None`)

  dump() → bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | type[betty.serde.dump.Void]

    Dump this instance to a portable format.

    Return type:

      `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `type`[`betty.serde.dump.Void`]]

  property https: bool | None

    Whether the nginx server should use HTTPS.

    Returns:

      `True` to use HTTPS (and HTTP/2), `False` to use HTTP (and HTTP 1), `None` to let this behavior depend on whether the project’s base URL uses HTTPS or not.

  load(dump: bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]) → None

    Load dumped configuration.

    Parameters:

      dump (`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]])

    Return type:

      `None`

  update(other: Self) → None

    Update this configuration with the values from `other`.

    Parameters:

      other (`typing.Self`)

    Return type:

      `None`

  property www_directory_path: str | None

    The nginx server’s public web root directory path.