gfwapiclient.resources.bulk_downloads.base.models.response

Global Fishing Watch (GFW) API Python Client - Bulk Download API Base Response Models.

This module defines base Pydantic response models, parameters and enumerations for various Bulk Download API endpoints.

Module Contents

Classes

BulkReportStatus

Bulk report current generation process status.

BulkReportGeography

Bulk report geography.

BulkReportItem

Bulk report entry.

Data

API

gfwapiclient.resources.bulk_downloads.base.models.response.__all__ = ['BulkReportItem']
class gfwapiclient.resources.bulk_downloads.base.models.response.BulkReportStatus

Bases: str, enum.Enum

Bulk report current generation process status.

For more details on the Bulk Download API supported report statuses, please refer to the official Global Fishing Watch API documentation:

See: https://globalfishingwatch.org/our-apis/documentation#bulk-report-response

See: https://globalfishingwatch.org/our-apis/documentation#bulk-reports-get-http-response

Attributes:
PENDING (str):

Bulk report has been created but processing has not yet started.

PROCESSING (str):

Bulk report generation is currently in progress.

DONE (str):

Bulk report has been successfully generated and is ready for use.

FAILED (str):

Bulk report generation encountered an error or was unable to complete.

Initialization

Initialize self. See help(type(self)) for accurate signature.

PENDING = 'pending'
PROCESSING = 'processing'
DONE = 'done'
FAILED = 'failed'
class gfwapiclient.resources.bulk_downloads.base.models.response.BulkReportGeography(/, **data: typing.Any)

Bases: gfwapiclient.base.models.BaseModel

Bulk report geography.

For more details on the Bulk Download API supported geographies, please refer to the official Global Fishing Watch API documentation:

See: https://globalfishingwatch.org/our-apis/documentation#bulk-report-response

See: https://globalfishingwatch.org/our-apis/documentation#bulk-reports-get-http-response

Attributes:
type (Optional[str]):

Type of geometry input (e.g. “dataset” or “custom”).

dataset (Optional[str]):

Dataset associated with the bulk report region of interest, if using reference geometry (e.g. “public-eez-areas”).

id (Optional[Union[str, int]]):

Identifier (ID) of the geometry used to define the bulk report region of interest (e.g. 8466).

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: Optional[str] = 'Field(...)'
dataset: Optional[str] = 'Field(...)'
id: Optional[Union[str, int]] = 'Field(...)'
class gfwapiclient.resources.bulk_downloads.base.models.response.BulkReportItem(/, **data: typing.Any)

Bases: gfwapiclient.http.models.ResultItem

Bulk report entry.

Represents a single entry in the bulk report result. Each entry captures metadata and status of the previously created bulk report.

For more details on the Bulk Download API supported response bodies, please refer to the official Global Fishing Watch API documentation:

See: https://globalfishingwatch.org/our-apis/documentation#bulk-report-response

See: https://globalfishingwatch.org/our-apis/documentation#bulk-reports-get-http-response

Attributes:
id (Optional[str]):

Unique identifier (ID) of the bulk report (e.g., “adbb9b62-5c08-4142-82e0-b2b575f3e058”).

name (Optional[str]):

Human-readable name of the bulk report (e.g., “sar-fixed-infrastructure-data-202409”).

file_path (Optional[str]):

Name of the output file generated by the bulk report (e.g., “sar_fixed_infrastructure_data_202409.json” or “sar_fixed_infrastructure_data_202409.csv”).

format (Optional[BulkReportFormat]):

Format of the generated bulk report file (e.g., “JSON” or “CSV”).

filters (Optional[List[str]]):

List of applied filters used when generating the bulk report (e.g., [“label = ‘oil’”]).

geom (Optional[BulkReportGeography]):

Geography used when generating the bulk report (e.g., {“type”: “dataset”, “dataset”: “public-eez-areas”, “id”: 8466}).

status (Optional[BulkReportStatus]):

Current status of the bulk report generation process (e.g., “done”).

owner_id (Optional[Union[str, int]]):

Identifier (ID) of the entity that created the bulk report (e.g., 509).

owner_type (Optional[str]):

Type of entity that created the bulk report (e.g., “user-application”).

created_at (Optional[datetime.datetime]):

Timestamp when the bulk report was created in ISO-8601 format (e.g., “2025-06-24T14:21:27.517Z”).

updated_at (Optional[datetime.datetime]):

Timestamp when the bulk report was last updated in ISO-8601 format (e.g., “2025-06-24T14:21:27.517Z”).

file_size (Optional[float]):

Size of the bulk report output file in bytes (e.g., 1207).

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

id: Optional[str] = 'Field(...)'
name: Optional[str] = 'Field(...)'
file_path: Optional[str] = 'Field(...)'
format: Optional[gfwapiclient.resources.bulk_downloads.base.models.request.BulkReportFormat] = 'Field(...)'
filters: Optional[List[str]] = 'Field(...)'
geom: Optional[gfwapiclient.resources.bulk_downloads.base.models.response.BulkReportGeography] = 'Field(...)'
status: Optional[gfwapiclient.resources.bulk_downloads.base.models.response.BulkReportStatus] = 'Field(...)'
owner_id: Optional[Union[str, int]] = 'Field(...)'
owner_type: Optional[str] = 'Field(...)'
created_at: Optional[datetime.datetime] = 'Field(...)'
updated_at: Optional[datetime.datetime] = 'Field(...)'
file_size: Optional[float] = 'Field(...)'
classmethod empty_datetime_str_to_none(value: Any) Optional[Any]

Convert any empty datetime string to None.

Args:
value (Any):

The value to validate.

Returns:
Optional[Any]:

The validated datetime object or None if input is empty.