Skip to content

Data models

The Pydantic models the SDK returns, under bhoonidhi_downloader.schemas. A QuerySchema comes back from client.query.create, .show, .fork, and .refresh; the others describe the values it carries.

QuerySchema pydantic-model

Bases: pydantic.main.BaseModel

Show JSON schema:
{
  "$defs": {
    "AOISchema": {
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of the area of interest",
          "title": "Name"
        },
        "mode": {
          "default": "bbox",
          "description": "How this AOI is defined",
          "enum": [
            "bbox",
            "location"
          ],
          "title": "Mode",
          "type": "string"
        },
        "min_lon": {
          "default": 0.0,
          "description": "Minimum longitude",
          "title": "Min Lon",
          "type": "number"
        },
        "min_lat": {
          "default": 0.0,
          "description": "Minimum latitude",
          "title": "Min Lat",
          "type": "number"
        },
        "max_lon": {
          "default": 0.0,
          "description": "Maximum longitude",
          "title": "Max Lon",
          "type": "number"
        },
        "max_lat": {
          "default": 0.0,
          "description": "Maximum latitude",
          "title": "Max Lat",
          "type": "number"
        },
        "lat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Point latitude",
          "title": "Lat"
        },
        "lon": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Point longitude",
          "title": "Lon"
        },
        "radius_km": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Search radius around the point, in km (1-100)",
          "title": "Radius Km"
        }
      },
      "title": "AOISchema",
      "type": "object"
    },
    "Selection": {
      "description": "One satellite[/sensor[/product]] target within a search.",
      "properties": {
        "satellite": {
          "description": "Satellite name, e.g. ResourceSat-2A",
          "title": "Satellite",
          "type": "string"
        },
        "sensor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sensor name, e.g. LISS3",
          "title": "Sensor"
        },
        "product": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Product token \u2014 the dispName suffix, e.g. L2C-Chlorophyll",
          "title": "Product"
        }
      },
      "required": [
        "satellite"
      ],
      "title": "Selection",
      "type": "object"
    }
  },
  "properties": {
    "slug": {
      "description": "Unique slug identifier (adjective-noun)",
      "title": "Slug",
      "type": "string"
    },
    "name": {
      "description": "Human-readable name (auto-generated, user-overridable)",
      "title": "Name",
      "type": "string"
    },
    "description": {
      "description": "Human-readable description (auto-generated, user-overridable)",
      "title": "Description",
      "type": "string"
    },
    "created_at": {
      "description": "When this query was first created",
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "selections": {
      "description": "Satellite/sensor/product targets this query searches",
      "items": {
        "$ref": "#/$defs/Selection"
      },
      "title": "Selections",
      "type": "array"
    },
    "aoi": {
      "$ref": "#/$defs/AOISchema",
      "description": "Area of interest \u2014 fixed for the lifetime of the query"
    },
    "start_date": {
      "description": "Fixed start of the search window",
      "format": "date-time",
      "title": "Start Date",
      "type": "string"
    },
    "end_date": {
      "description": "Data confirmed current through this date; advances on refresh",
      "format": "date-time",
      "title": "End Date",
      "type": "string"
    },
    "scenes": {
      "description": "Cached scene results",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Scenes",
      "type": "array"
    }
  },
  "required": [
    "slug",
    "name",
    "description",
    "created_at",
    "selections",
    "aoi",
    "start_date",
    "end_date"
  ],
  "title": "QuerySchema",
  "type": "object"
}

model_config class-attribute

model_config = {}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

SearchSchema pydantic-model

Bases: pydantic.main.BaseModel

Show JSON schema:
{
  "$defs": {
    "AOISchema": {
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of the area of interest",
          "title": "Name"
        },
        "mode": {
          "default": "bbox",
          "description": "How this AOI is defined",
          "enum": [
            "bbox",
            "location"
          ],
          "title": "Mode",
          "type": "string"
        },
        "min_lon": {
          "default": 0.0,
          "description": "Minimum longitude",
          "title": "Min Lon",
          "type": "number"
        },
        "min_lat": {
          "default": 0.0,
          "description": "Minimum latitude",
          "title": "Min Lat",
          "type": "number"
        },
        "max_lon": {
          "default": 0.0,
          "description": "Maximum longitude",
          "title": "Max Lon",
          "type": "number"
        },
        "max_lat": {
          "default": 0.0,
          "description": "Maximum latitude",
          "title": "Max Lat",
          "type": "number"
        },
        "lat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Point latitude",
          "title": "Lat"
        },
        "lon": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Point longitude",
          "title": "Lon"
        },
        "radius_km": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Search radius around the point, in km (1-100)",
          "title": "Radius Km"
        }
      },
      "title": "AOISchema",
      "type": "object"
    },
    "Selection": {
      "description": "One satellite[/sensor[/product]] target within a search.",
      "properties": {
        "satellite": {
          "description": "Satellite name, e.g. ResourceSat-2A",
          "title": "Satellite",
          "type": "string"
        },
        "sensor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sensor name, e.g. LISS3",
          "title": "Sensor"
        },
        "product": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Product token \u2014 the dispName suffix, e.g. L2C-Chlorophyll",
          "title": "Product"
        }
      },
      "required": [
        "satellite"
      ],
      "title": "Selection",
      "type": "object"
    }
  },
  "properties": {
    "aoi": {
      "$ref": "#/$defs/AOISchema",
      "description": "Area of Interest"
    },
    "selections": {
      "description": "One or more satellite/sensor/product targets to search",
      "items": {
        "$ref": "#/$defs/Selection"
      },
      "title": "Selections",
      "type": "array"
    },
    "start_date": {
      "default": "2026-08-02T13:40:12.657170Z",
      "description": "Start date (YYYY-MM-DD)",
      "format": "date-time",
      "title": "Start Date",
      "type": "string"
    },
    "end_date": {
      "default": "2026-09-01T13:40:12.657195Z",
      "description": "End date (YYYY-MM-DD)",
      "format": "date-time",
      "title": "End Date",
      "type": "string"
    }
  },
  "title": "SearchSchema",
  "type": "object"
}

model_config class-attribute

model_config = {}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

validate_aoi_bounds

validate_aoi_bounds() -> SearchSchema

Validate the AOI is well-formed for whichever mode it's in.

validate_date_range

validate_date_range() -> SearchSchema

Validate that start_date is not after end_date.

require_at_least_one_selection

require_at_least_one_selection() -> SearchSchema

A search needs something to search for.

Per-selection existence and date-window checks are the resolver's job (core.search.utils.resolve_selections), where an invalid selection is warned about and skipped instead of failing the whole search. This only guards the empty case.

AOISchema pydantic-model

Bases: pydantic.main.BaseModel

Show JSON schema:
{
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Name of the area of interest",
      "title": "Name"
    },
    "mode": {
      "default": "bbox",
      "description": "How this AOI is defined",
      "enum": [
        "bbox",
        "location"
      ],
      "title": "Mode",
      "type": "string"
    },
    "min_lon": {
      "default": 0.0,
      "description": "Minimum longitude",
      "title": "Min Lon",
      "type": "number"
    },
    "min_lat": {
      "default": 0.0,
      "description": "Minimum latitude",
      "title": "Min Lat",
      "type": "number"
    },
    "max_lon": {
      "default": 0.0,
      "description": "Maximum longitude",
      "title": "Max Lon",
      "type": "number"
    },
    "max_lat": {
      "default": 0.0,
      "description": "Maximum latitude",
      "title": "Max Lat",
      "type": "number"
    },
    "lat": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Point latitude",
      "title": "Lat"
    },
    "lon": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Point longitude",
      "title": "Lon"
    },
    "radius_km": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Search radius around the point, in km (1-100)",
      "title": "Radius Km"
    }
  },
  "title": "AOISchema",
  "type": "object"
}

model_config class-attribute

model_config = {}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

SessionSchema pydantic-model

Bases: pydantic.main.BaseModel

Show JSON schema:
{
  "properties": {
    "jwt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Bhoonidhi session JWT",
      "title": "Jwt"
    },
    "userId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Bhoonidhi user ID",
      "title": "Userid"
    },
    "user_email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Account email",
      "title": "User Email"
    },
    "username": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Bhoonidhi username",
      "title": "Username"
    },
    "password": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Bhoonidhi password",
      "title": "Password"
    },
    "sid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Session ID",
      "title": "Sid"
    },
    "scenes": {
      "description": "Scenes attached to this session",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Scenes",
      "type": "array"
    }
  },
  "title": "SessionSchema",
  "type": "object"
}

model_config class-attribute

model_config = {}

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)