betty.extension.nginx package - Betty 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 package

## Submodules

- betty.extension.nginx.artifact module
  - `generate_configuration_file()`
  - `generate_dockerfile_file()`
- betty.extension.nginx.cli module
- betty.extension.nginx.config module
  - `NginxConfiguration`
    - `NginxConfiguration.__init__()`
    - `NginxConfiguration.dump()`
    - `NginxConfiguration.https`
    - `NginxConfiguration.load()`
    - `NginxConfiguration.update()`
    - `NginxConfiguration.www_directory_path`
- betty.extension.nginx.docker module
  - `Container`
    - `Container.__init__()`
    - `Container.ip`
    - `Container.start()`
    - `Container.stop()`
- betty.extension.nginx.gui module
- betty.extension.nginx.serve module
  - `DockerizedNginxServer`
    - `DockerizedNginxServer.__init__()`
    - `DockerizedNginxServer.is_available()`
    - `DockerizedNginxServer.public_url`
    - `DockerizedNginxServer.start()`
    - `DockerizedNginxServer.stop()`

## Module contents

Integrate Betty with nginx.

class betty.extension.nginx.Nginx

  Bases: `ConfigurableExtension`[`NginxConfiguration`], `UserFacingExtension`, `Generator`, `ServerProvider`, `GuiBuilder`, `CommandProvider`

  Integrate Betty with nginx (and Docker).

  Parameters:

    - args (`typing.Any`)

    - configuration (`typing.Optional`[`typing.TypeVar`(`ConfigurationT`, bound= `betty.config.Configuration`)])

    - kwargs (`typing.Any`)

  classmethod assets_directory_path() → pathlib.Path | None

    Return the path on disk where the extension’s assets are located.

    This may be anywhere in your Python package.

    Return type:

      `pathlib.Path` | `None`

  property commands: dict[str, Command]

    The commands to provide.

  classmethod default_configuration() → betty.extension.nginx.config.NginxConfiguration

    Get this extension’s default configuration.

    Return type:

      `betty.extension.nginx.config.NginxConfiguration`

  classmethod description() → betty.locale.Str

    Get the human-readable extension description.

    Return type:

      `betty.locale.Str`

  async generate(job_context: betty.generate.GenerationContext) → None

    Generate (part of) a project’s site.

    Parameters:

      job_context (`betty.generate.GenerationContext`)

    Return type:

      `None`

  gui_build() → betty.extension.nginx.gui._NginxGuiWidget

    Build this extension’s Graphical User Interface component.

    Return type:

      `betty.extension.nginx.gui._NginxGuiWidget`

  property https: bool

    Whether the nginx server should use HTTPS.

  classmethod label() → betty.locale.Str

    Get the human-readable extension label.

    Return type:

      `betty.locale.Str`

  property servers: Sequence[Server]

    Provide one or more web servers.

  property www_directory_path: str

    The nginx server’s public web root directory path.