connections¶
ecoscope.platform.connections ¶
Attributes¶
DataConnectionType
module-attribute
¶
EarthEngineClient
module-attribute
¶
EarthEngineClient = Annotated[EarthEngineClientProtocol, BeforeValidator(client_from_named_connection), WithJsonSchema({'type': 'string', 'description': 'A named Google EarthEngine connection.'})]
EarthRangerClient
module-attribute
¶
EarthRangerClient = Annotated[EarthRangerClientProtocol, BeforeValidator(client_from_named_connection), WithJsonSchema({'type': 'string', 'description': 'A named EarthRanger connection.'})]
SmartClient
module-attribute
¶
SmartClient = Annotated[SmartClientProtocol, BeforeValidator(client_from_named_connection), WithJsonSchema({'type': 'string', 'description': 'A named SMART connection.'})]
Classes¶
DataConnection ¶
Bases: ABC, _DataConnection, Generic[ClientProtocolType]
Methods:¶
client_from_named_connection
classmethod
¶
client_from_named_connection(name: str) -> ClientProtocolType
get_client
abstractmethod
¶
get_client() -> ClientProtocolType
EarthEngineClientProtocol ¶
Bases: Protocol
EarthEngineConnection ¶
Bases: DataConnection[EarthEngineClientProtocol]
Attributes¶
ee_project
class-attribute
instance-attribute
¶
private_key
class-attribute
instance-attribute
¶
private_key: Annotated[SecretStr, Field(description="Your service account's private key")] = SecretStr('')
private_key_file
class-attribute
instance-attribute
¶
service_account
class-attribute
instance-attribute
¶
Methods:¶
get_client ¶
Source code in ecoscope/platform/connections.py
EarthRangerClientProtocol ¶
Bases: Protocol
Attributes¶
Methods:¶
get_choices_from_v2_event_type ¶
Source code in ecoscope/platform/connections.py
get_event_type_display_names_from_events ¶
get_event_type_display_names_from_events(events_gdf, append_category_names) -> AnyGeoDataFrame
get_events ¶
get_events(since, until, event_type, drop_null_geometry, include_details: bool, include_updates: bool, include_related_events: bool, force_point_geometry: bool) -> AnyGeoDataFrame
get_fields_from_event_type_schema ¶
Source code in ecoscope/platform/connections.py
get_patrol_events ¶
get_patrol_events(since, until, patrol_type_value, event_type, status, drop_null_geometry, sub_page_size, patrols_overlap_daterange) -> AnyGeoDataFrame
get_patrol_observations ¶
get_patrol_observations(patrols_df, include_patrol_details, sub_page_size) -> AnyGeoDataFrame
get_patrol_observations_with_patrol_filter ¶
get_patrol_observations_with_patrol_filter(since, until, patrol_type_value, status, include_patrol_details, sub_page_size, patrols_overlap_daterange) -> AnyGeoDataFrame
get_patrols ¶
get_patrols(since, until, patrol_type_value, status, sub_page_size, patrols_overlap_daterange) -> AnyDataFrame
get_spatial_features_group ¶
get_spatial_features_group(spatial_features_group_name, spatial_features_group_id, with_group_data) -> dict[str, str | int | AnyGeoDataFrame]
get_subjectgroup_observations ¶
get_subjectgroup_observations(subject_group_name: str, include_subject_details: bool, include_inactive: bool, include_details: bool, include_subjectsource_details: bool, since, until, filter) -> AnyGeoDataFrame
Source code in ecoscope/platform/connections.py
EarthRangerConnection ¶
Bases: DataConnection[EarthRangerClientProtocol]
Attributes¶
password
class-attribute
instance-attribute
¶
sub_page_size
class-attribute
instance-attribute
¶
tcp_limit
class-attribute
instance-attribute
¶
token
class-attribute
instance-attribute
¶
username
class-attribute
instance-attribute
¶
Methods:¶
get_client ¶
get_client() -> EarthRangerClientProtocol
Source code in ecoscope/platform/connections.py
token_or_password ¶
Source code in ecoscope/platform/connections.py
SmartClientProtocol ¶
Bases: Protocol
Methods:¶
get_events ¶
get_events(ca_uuid: str, language_uuid: str, start: str, end: str) -> AnyGeoDataFrame
Source code in ecoscope/platform/connections.py
get_patrol_observations ¶
SmartConnection ¶
Bases: DataConnection[SmartClientProtocol]
Attributes¶
password
class-attribute
instance-attribute
¶
token
class-attribute
instance-attribute
¶
username
class-attribute
instance-attribute
¶
Methods:¶
token_or_password ¶
Source code in ecoscope/platform/connections.py
Functions:¶
connection_from_client ¶
connection_from_client(obj) -> DataConnection