Table of Contents
openeo_fastapi.client.processes
Class and model to define the framework and partial application logic for interacting with Process and Process Graphs.
Classes: - ProcessRegister: Framework for defining and extending the logic for working with Processes and Process Graphs.
UserDefinedProcessGraph Objects
class UserDefinedProcessGraph(BaseModel)
Pydantic model representing an OpenEO User Defined Process Graph.
Config Objects
class Config()
Pydantic model class config.
get_orm
@classmethod
def get_orm(cls)
Get the ORM model for this pydantic model.
ProcessRegister Objects
class ProcessRegister(EndpointRegister)
The ProcessRegister to regulate the application logic for the API behaviour.
__init__
def __init__(links) -> None
Initialize the ProcessRegister.
Arguments:
links
Links - The Links to be used in some function responses.
get_available_processes
@functools.cache
def get_available_processes()
Returns the pre-defined process from the process registry.
Returns:
list[Process]
- A list of Processes.
list_processes
def list_processes() -> Union[ProcessesGetResponse, None]
Returns Supported predefined processes defined by openeo-processes-dask.
Returns:
ProcessesGetResponse
- A list of available processes.
list_user_process_graphs
def list_user_process_graphs(
limit: Optional[int] = 10,
user: User = Depends(Authenticator.validate)
) -> Union[ProcessGraphsGetResponse, None]
Lists all of a user's user-defined process graphs from the back-end.
Arguments:
limit
int - The limit to apply to the length of the list.user
User - The User returned from the Authenticator.
Returns:
ProcessGraphsGetResponse
- A list of the user's UserDefinedProcessGraph as a ProcessGraphWithMetadata.
get_user_process_graph
def get_user_process_graph(
process_graph_id: str, user: User = Depends(Authenticator.validate)
) -> Union[ProcessGraphWithMetadata, None]
Lists all information about a user-defined process, including its process graph.
Arguments:
process_graph_id
str - The process graph id.user
User - The User returned from the Authenticator.
Raises:
HTTPException
- Raises an exception with relevant status code and descriptive message of failure.
Returns:
ProcessGraphWithMetadata
- Retruns the UserDefinedProcessGraph as a ProcessGraphWithMetadata.
put_user_process_graph
def put_user_process_graph(process_graph_id: str,
body: ProcessGraphWithMetadata,
user: User = Depends(Authenticator.validate))
Stores a provided user-defined process with process graph that can be reused in other processes.
Arguments:
process_graph_id
str - The process graph id.body
ProcessGraphWithMetadata - The ProcessGraphWithMetadata should be used to create the new BatchJob.user
User - The User returned from the Authenticator.
Raises:
HTTPException
- Raises an exception with relevant status code and descriptive message of failure.
Returns:
Response
- A general FastApi response to signify resource was created as expected.
delete_user_process_graph
def delete_user_process_graph(process_graph_id: str,
user: User = Depends(Authenticator.validate))
Deletes the data related to this user-defined process, including its process graph.
Arguments:
process_graph_id
str - The process graph id.user
User - The User returned from the Authenticator.
Raises:
HTTPException
- Raises an exception with relevant status code and descriptive message of failure.
Returns:
Response
- A general FastApi response to signify resource was created as expected.
validate_user_process_graph
def validate_user_process_graph(
body: ProcessGraphWithMetadata,
user: User = Depends(Authenticator.validate)
) -> ValidationPostResponse
Validates the ProcessGraphWithMetadata that is provided by the user.
Arguments:
process_graph_id
str - The process graph id.body
ProcessGraphWithMetadata - The ProcessGraphWithMetadata should be used to validate the new BatchJob.user
User - The User returned from the Authenticator.
Raises:
HTTPException
- Raises an exception with relevant status code and descriptive message of failure.
Returns:
ValidationPostResponse
- A response to list an errors that where encountered when .