Skip to content

Client.algorithm_jobs¤

by_input_image ¤

by_input_image(
    pk: str,
) -> Iterator[gcapi.models.HyperlinkedJob]

Get algorithm jobs filtered by input image.

Parameters:

  • pk (str) –

    Primary key of the input image to filter jobs by.

Yields:

  • HyperlinkedJob

    Algorithm job instances that use the specified input image.

create ¤

create(**kwargs: Any) -> gcapi.models.JobPost

Create a new resource via the API.

Parameters:

  • **kwargs (Any, default: {} ) –

    Field values for the new resource.

Returns:

  • JobPost

    The created resource instance.

delete ¤

delete(pk: str) -> Any

Delete a resource from the API.

Parameters:

  • pk (str) –

    Primary key of the resource to delete.

Returns:

  • Any

    Response from the delete operation.

detail ¤

detail(
    pk: Optional[str] = None,
    api_url: Optional[str] = None,
    **params: Any
) -> gcapi.models.HyperlinkedJob

Retrieve a specific resource by primary key, URL, or search parameters.

Parameters:

  • pk (Optional[str], default: None ) –

    Primary key of the resource to retrieve.

  • api_url (Optional[str], default: None ) –

    Direct API URL of the resource to retrieve.

  • **params (Any, default: {} ) –

    Search parameters to find a unique resource, such as slug="your-slug".

Returns:

Raises:

  • ValueError

    If more than one or none of pk, api_url, or params are specified.

  • ObjectNotFound

    If no resource is found matching the criteria.

  • MultipleObjectsReturned

    If multiple resources match the search parameters.

iterate_all ¤

iterate_all(
    params: Optional[dict[str, Any]] = None,
) -> Iterator[gcapi.models.HyperlinkedJob]

Iterate through all resources from the API endpoint across all pages.

This method automatically handles pagination and yields individual resources from all pages until all resources have been retrieved.

Parameters:

  • params (Optional[dict[str, Any]], default: None ) –

    Query parameters to include in the API requests.

Yields:

list ¤

list(
    params: Optional[dict[str, Any]] = None,
) -> list[gcapi.models.HyperlinkedJob]

Retrieve a raw list of resources from the API endpoint.

Parameters:

  • params (Optional[dict[str, Any]], default: None ) –

    Query parameters to include in the API request.

Returns:

  • list[HyperlinkedJob]

    Raw JSON response from the API containing the list of resources.

page ¤

page(
    offset: int = 0,
    limit: int = 100,
    params: Optional[dict[str, Any]] = None,
) -> PageResult[gcapi.models.HyperlinkedJob]

Retrieve a paginated set of resources from the API endpoint.

Parameters:

  • offset (int, default: 0 ) –

    The starting index for pagination (zero-based).

  • limit (int, default: 100 ) –

    The maximum number of results to return in this page.

  • params (Optional[dict[str, Any]], default: None ) –

    Additional query parameters to include in the API request.

Returns:

partial_update ¤

partial_update(
    pk: str, **kwargs: Any
) -> gcapi.models.JobPost

Partially update an existing resource with only specified fields.

Parameters:

  • pk (str) –

    Primary key of the resource to update.

  • **kwargs (Any, default: {} ) –

    Partial field values for the resource update.

Returns:

  • JobPost

    The updated resource instance.

update ¤

update(pk: str, **kwargs: Any) -> gcapi.models.JobPost

Update an existing resource with a complete replacement.

Parameters:

  • pk (str) –

    Primary key of the resource to update.

  • **kwargs (Any, default: {} ) –

    Complete field values for the resource update.

Returns:

  • JobPost

    The updated resource instance.