gavicore.service API Reference
gavicore.service.Service
Bases: ABC
get_capabilities
abstractmethod
async
get_capabilities(*args, **kwargs) -> Capabilities
The landing page provides links to the
- The OpenAPI-definition (no fixed path),
- The Conformance statements (path /conformance),
- The processes metadata (path /processes),
- The endpoint for job monitoring (path /jobs).
For more information, see OGC API — Processes — Part 1 Section 7.2.
get_conformance
abstractmethod
async
get_conformance(*args, **kwargs) -> ConformanceDeclaration
A list of all conformance classes, specified in a standard, that the server conforms to.
| Conformance class | URI |
|---|---|
| Core | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core |
| OGC Process Description | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/ogc-process-description |
| JSON | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json |
| HTML | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html |
| OpenAPI Specification 3.0 | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30 |
| Job list | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/job-list |
| Callback | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/callback |
| Dismiss | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/dismiss |
For more information, see OGC API — Processes — Part 1 Section 7.4.
get_processes
abstractmethod
async
get_processes(*args, **kwargs) -> ProcessList
The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process.
For more information, see OGC API — Processes — Part 1 Section 7.9.
get_process
abstractmethod
async
get_process(process_id: str, *args, **kwargs) -> ProcessDescription
The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation:
Implementations should consider supporting the OGC process description.
For more information, see OGC API — Processes — Part 1 Section 7.10.
execute_process
abstractmethod
async
execute_process(
process_id: str, process_request: ProcessRequest, *args, **kwargs
) -> JobInfo
Create a new job.
For more information, see OGC API — Processes — Part 1 Section 7.11.
get_jobs
abstractmethod
async
get_jobs(*args, **kwargs) -> JobList
List available jobs.
For more information, see OGC API — Processes — Part 1 Section 11.
get_job
abstractmethod
async
get_job(job_id: str, *args, **kwargs) -> JobInfo
Show the status of a job.
For more information, see OGC API — Processes — Part 1 Section 7.12.
dismiss_job
abstractmethod
async
dismiss_job(job_id: str, *args, **kwargs) -> JobInfo
Cancel a job execution and removes it from the jobs list.
For more information, see OGC API — Processes — Part 1 Section 13.
get_job_results
abstractmethod
async
get_job_results(job_id: str, *args, **kwargs) -> JobResults
List available results of a job. In case of a failure, list errors instead.
For more information, see OGC API — Processes — Part 1 Section 7.13.
gavicore.dru_service.DruService
Bases: Service, ABC
The DruService interface extends the Service interface by providing four endpoints defined per OGC API - Processes — Part 2 (DRU).
deploy_process
abstractmethod
async
deploy_process(
w: str | None = None, *args, **kwargs
) -> Optional[ProcessSummary]
Deploy a new process to a server supporting OGC API - Processes — Part 2 (DRU) by providing a process description in a supported format.
Depending on the service implementation, the server may not return a response body.
For more information, see OGC API - Processes — Part 2 (DRU).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
w
|
str | None
|
Optionally point to the workflow identifier for deploying a CWL containing multiple workflow definitions. |
None
|
replace_process
abstractmethod
async
replace_process(
process_id: str, w: str | None = None, *args, **kwargs
) -> Optional[ProcessSummary]
Replace an exisitng and mutable process by providing a new process description in a supported format.
Depending on the service implementation, the server may not return a response body.
For more information, see OGC API - Processes — Part 2 (DRU).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_id
|
str
|
Unique identifier of registered process that is to be replaced. |
required |
w
|
str | None
|
Optionally point to the workflow identifier for deploying a CWL containing multiple workflow definitions. |
None
|
undeploy_process
abstractmethod
async
undeploy_process(process_id: str, *args, **kwargs) -> None
Remove an exisitng and mutable process by providing its process id.
For more information, see OGC API - Processes — Part 2 (DRU).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_id
|
str
|
Unique identifier of registered process that is to be replaced. |
required |
get_formal_description
abstractmethod
async
get_formal_description(
process_id: str, *args, **kwargs
) -> OgcApplicationPackage
Retrieve a formal description of a previously deployed process via the deploy operation. The returned description relates to the most recent deployment.
For more information, see OGC API - Processes — Part 2 (DRU).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_id
|
str
|
Unique identifier of registered process that is to be replaced. |
required |
get_capabilities
abstractmethod
async
get_capabilities(*args, **kwargs) -> Capabilities
The landing page provides links to the
- The OpenAPI-definition (no fixed path),
- The Conformance statements (path /conformance),
- The processes metadata (path /processes),
- The endpoint for job monitoring (path /jobs).
For more information, see OGC API — Processes — Part 1 Section 7.2.
get_conformance
abstractmethod
async
get_conformance(*args, **kwargs) -> ConformanceDeclaration
A list of all conformance classes, specified in a standard, that the server conforms to.
| Conformance class | URI |
|---|---|
| Core | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core |
| OGC Process Description | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/ogc-process-description |
| JSON | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json |
| HTML | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html |
| OpenAPI Specification 3.0 | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30 |
| Job list | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/job-list |
| Callback | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/callback |
| Dismiss | http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/dismiss |
For more information, see OGC API — Processes — Part 1 Section 7.4.
get_processes
abstractmethod
async
get_processes(*args, **kwargs) -> ProcessList
The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process.
For more information, see OGC API — Processes — Part 1 Section 7.9.
get_process
abstractmethod
async
get_process(process_id: str, *args, **kwargs) -> ProcessDescription
The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation:
Implementations should consider supporting the OGC process description.
For more information, see OGC API — Processes — Part 1 Section 7.10.
execute_process
abstractmethod
async
execute_process(
process_id: str, process_request: ProcessRequest, *args, **kwargs
) -> JobInfo
Create a new job.
For more information, see OGC API — Processes — Part 1 Section 7.11.
get_jobs
abstractmethod
async
get_jobs(*args, **kwargs) -> JobList
List available jobs.
For more information, see OGC API — Processes — Part 1 Section 11.
get_job
abstractmethod
async
get_job(job_id: str, *args, **kwargs) -> JobInfo
Show the status of a job.
For more information, see OGC API — Processes — Part 1 Section 7.12.
dismiss_job
abstractmethod
async
dismiss_job(job_id: str, *args, **kwargs) -> JobInfo
Cancel a job execution and removes it from the jobs list.
For more information, see OGC API — Processes — Part 1 Section 13.
get_job_results
abstractmethod
async
get_job_results(job_id: str, *args, **kwargs) -> JobResults
List available results of a job. In case of a failure, list errors instead.
For more information, see OGC API — Processes — Part 1 Section 7.13.
gavicore.service.errors
ErrorTypeId
module-attribute
ErrorTypeId: TypeAlias = Literal[
"no-such-process",
"no-such-job",
"result-not-ready",
"unsupported-media-type",
"duplicated-process",
"immutable-process",
"workflow-not-found",
"bad-request",
"invalid-parameter",
"invalid-parameter-value",
"missing-parameter",
"invalid-header-value",
"unsupported-media-type",
"unauthorized",
"forbidden",
"conflict",
"payload-too-large",
"rate-limit-exceeded",
"not-implemented",
"internal-server-error",
"internal-server-config-error",
]
Type of an error type identifier.
is_error_type_id
is_error_type_id(value: str) -> TypeGuard[ErrorTypeId]
Check whether a string is a supported API error type identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The string to validate. |
required |
Returns:
| Type | Description |
|---|---|
TypeGuard[ErrorTypeId]
|
|
TypeGuard[ErrorTypeId]
|
|
TypeGuard[ErrorTypeId]
|
otherwise |
get_error_type_uri
get_error_type_uri(type_id: ErrorTypeId) -> str
Resolve an error type identifier to its canonical problem-type URI.
OGC-defined problem types are mapped to their official OGC exception URIs. All remaining Eozilla-specific problem types are mapped to the Eozilla problem base URI with the error type identifier as fragment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_id
|
ErrorTypeId
|
The error type identifier to resolve. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The canonical URI representing the given error type. |
get_error_type_id
get_error_type_id(
status_code: int,
/,
is_job_problem: bool = False,
default: ErrorTypeId | None = None,
) -> ErrorTypeId
Map an HTTP status code to a supported error type identifier.
Known status codes are translated using the module's default mapping.
If is_job_problem is set and the resolved error would be
"no-such-process", the returned type is adjusted to "no-such-job".
Unknown status codes fall back to default or, if no default is given,
to "internal-server-error".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code
|
int
|
The HTTP status code to translate. |
required |
is_job_problem
|
bool
|
Whether a |
False
|
default
|
ErrorTypeId | None
|
The fallback error type identifier for unmapped status codes. |
None
|
Returns:
| Type | Description |
|---|---|
ErrorTypeId
|
The resolved error type identifier. |
create_api_error
create_api_error(
type_id: ErrorTypeId,
/,
exception: BaseException | None = None,
instance: str | None = None,
status: int | None = None,
title: str | None = None,
detail: str | None = None,
traceback: str | list[str] | None = None,
) -> ApiError
Create an ApiError from a problem type identifier and error details.
If exception is provided, the error title defaults to str(exception)
and the traceback defaults to the formatted traceback of that exception.
Explicit title and traceback values take precedence over these
derived defaults.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_id
|
ErrorTypeId
|
The problem type identifier used to resolve the error URI. |
required |
exception
|
BaseException | None
|
The underlying exception that caused the problem. |
None
|
instance
|
str | None
|
An optional URI identifying the specific problem instance. |
None
|
status
|
int | None
|
The related HTTP status code. |
None
|
title
|
str | None
|
A short human-readable problem summary. |
None
|
detail
|
str | None
|
A detailed human-readable problem description. |
None
|
traceback
|
str | list[str] | None
|
An optional server-side traceback string or list of lines. |
None
|
Returns:
| Type | Description |
|---|---|
ApiError
|
The constructed |