Skip to content

input

input

AbstractFilter dataclass

Bases: BaseInterface

Source code in src/qgis_server_light/interface/job/common/input.py
66
67
68
69
70
71
72
@dataclass(repr=False)
class AbstractFilter(BaseInterface):
    definition: str = field(metadata={"type": "Element"})

    @property
    def shortened_fields(self) -> set:
        return {"definition"}

definition: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

shortened_fields: set property

__init__(definition: str) -> None

ExecutionMode

Bases: Enum

If the dispatcher waits for the job (SYNC) or asks for its state later (ASYNC). Only jobs which keep their state (RedisStateProtocol) use it.

Source code in src/qgis_server_light/interface/job/common/input.py
17
18
19
20
21
22
23
class ExecutionMode(Enum):
    """If the dispatcher waits for the job (`SYNC`) or asks for its state later
    (`ASYNC`). Only jobs which keep their state (`RedisStateProtocol`) use it.
    """

    SYNC = "sync"
    ASYNC = "async"

ASYNC = 'async' class-attribute instance-attribute

SYNC = 'sync' class-attribute instance-attribute

OgcFilter110 dataclass

Bases: AbstractFilter

A filter which definition conforms to https://schemas.opengis.net/filter/1.1.0/filter.xsd and which is consumable by qgis.core.QgsOgcUtils.expressionFromOgcFilter.

Source code in src/qgis_server_light/interface/job/common/input.py
75
76
77
78
79
80
81
@dataclass(repr=False)
class OgcFilter110(AbstractFilter):
    """
    A filter which definition conforms to
    https://schemas.opengis.net/filter/1.1.0/filter.xsd
    and which is consumable by `qgis.core.QgsOgcUtils.expressionFromOgcFilter`.
    """

__init__(definition: str) -> None

OgcFilterFES20 dataclass

Bases: AbstractFilter

A filter which definition conforms to https://www.opengis.net/fes/2.0 and which is consumable by qgis.core.QgsOgcUtils.expressionFromOgcFilter.

Source code in src/qgis_server_light/interface/job/common/input.py
84
85
86
87
88
89
@dataclass(repr=False)
class OgcFilterFES20(AbstractFilter):
    """
    A filter which definition conforms to https://www.opengis.net/fes/2.0
    and which is consumable by `qgis.core.QgsOgcUtils.expressionFromOgcFilter`.
    """

__init__(definition: str) -> None

QslJobInfoParameter dataclass

Bases: ABC

The common minimal interface of a job which is shipped around. Each job for QSL has to implement at least this interface.

Attributes:

  • id (str) –

    The unique identifier which is used to recognize the job all over its lifecycle.

  • type (str) –

    A string based identifier of the job, this is used to quickly determine its nature serialized state.

  • job (QslJobParameter) –

    The actual job parameters. This is a domain specific dataclass depending on the nature of the actual job.

  • execution_mode (ExecutionMode) –

    With ExecutionMode.SYNC the worker notifies the waiting dispatcher when the job is finished. Only used by jobs which keep their state.

Source code in src/qgis_server_light/interface/job/common/input.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@dataclass
class QslJobInfoParameter(ABC):  # noqa: B024
    """The common minimal interface of a job which is
    shipped around. Each job for QSL has to implement at least this
    interface.

    Attributes:
        id: The unique identifier which is used to recognize the job
            all over its lifecycle.
        type: A string based identifier of the job, this is used to quickly
            determine its nature serialized state.
        job: The actual job parameters. This is a domain specific dataclass
            depending on the nature of the actual job.
        execution_mode: With `ExecutionMode.SYNC` the worker notifies the waiting
            dispatcher when the job is finished. Only used by jobs which keep their
            state.
    """

    id: str = field(metadata={"type": "Element"})
    type: str = field(metadata={"type": "Element"})
    job: QslJobParameter = field(metadata={"type": "Element"})
    execution_mode: ExecutionMode = field(metadata={"type": "Element"}, default=ExecutionMode.SYNC)

    @property
    def channel_name(self) -> str:
        return f"notification_{self.execution_mode.value}"

channel_name: str property

execution_mode: ExecutionMode = field(metadata={'type': 'Element'}, default=(ExecutionMode.SYNC)) class-attribute instance-attribute

id: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

job: QslJobParameter = field(metadata={'type': 'Element'}) class-attribute instance-attribute

type: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

__init__(id: str, type: str, job: QslJobParameter, execution_mode: ExecutionMode = ExecutionMode.SYNC) -> None

QslJobLayer dataclass

Bases: BaseInterface

Source code in src/qgis_server_light/interface/job/common/input.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
@dataclass(repr=False)
class QslJobLayer(BaseInterface):
    id: str = field(metadata={"type": "Element"})
    name: str = field(metadata={"type": "Element"})
    source: str = field(metadata={"type": "Element"})
    remote: bool = field(metadata={"type": "Element"})
    folder_name: str = field(metadata={"type": "Element"})
    driver: str = field(metadata={"type": "Element"})
    style: Style | None = field(default=None, metadata={"type": "Element"})
    filter: OgcFilter110 | OgcFilterFES20 | None = field(default=None, metadata={"type": "Element"})

    @property
    def redacted_fields(self) -> set:
        return {"source"}

driver: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

filter: OgcFilter110 | OgcFilterFES20 | None = field(default=None, metadata={'type': 'Element'}) class-attribute instance-attribute

folder_name: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

id: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

name: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

redacted_fields: set property

remote: bool = field(metadata={'type': 'Element'}) class-attribute instance-attribute

source: str = field(metadata={'type': 'Element'}) class-attribute instance-attribute

style: Style | None = field(default=None, metadata={'type': 'Element'}) class-attribute instance-attribute

__init__(id: str, name: str, source: str, remote: bool, folder_name: str, driver: str, style: Style | None = None, filter: OgcFilter110 | OgcFilterFES20 | None = None) -> None

QslJobParameter dataclass

Bases: ABC

The minimal interface of a job parameter interface. In the domain specific refinement it holds the relevant information about a job.

Source code in src/qgis_server_light/interface/job/common/input.py
 8
 9
10
11
12
13
14
@dataclass
class QslJobParameter(ABC):  # noqa: B024
    """The minimal interface of a job parameter interface. In the domain
    specific refinement it holds the relevant information about a job.
    """

    pass

__init__() -> None

QslJobParameterMapRelated dataclass

Bases: QslJobParameter

The minimal interface of a job parameter interface for jobs rendering things in the end.

Attributes:

  • svg_paths (list[str]) –

    A list of paths to svg's (folders) which are necessary for the job to render nicely.

Source code in src/qgis_server_light/interface/job/common/input.py
54
55
56
57
58
59
60
61
62
63
@dataclass
class QslJobParameterMapRelated(QslJobParameter):
    """The minimal interface of a job parameter interface for jobs rendering things in the end.

    Attributes:
        svg_paths: A list of paths to svg's (folders) which are necessary for
            the job to render nicely.
    """

    svg_paths: list[str] = field(default_factory=list, metadata={"type": "Element"})

svg_paths: list[str] = field(default_factory=list, metadata={'type': 'Element'}) class-attribute instance-attribute

__init__(svg_paths: list[str] = list()) -> None