iudx.rs package

Submodules

iudx.rs.ResourceQuery module

Module doc string. Leave empty for now.

ResourceQuery.py

class iudx.rs.ResourceQuery.ResourceQuery[source]

Bases: object

Abstract class for Resource Query. Helps to create a modular interface for the API to construct query in Python.

add_entity(iid: str)T[source]

Method to add ids to the entity list.

Parameters

iid (String) – Resource Id for a resource.

add_filters(filters: Optional[List[str]] = None)T[source]

Method to instantiate query for filter based search.

Parameters

filters (List[str]) – Filters to be applied to query for search.

Method to instantiate query for temporal based search.

Parameters
  • start_time (String) – The starting timestamp for the search.

  • end_time (String) – The ending timestamp for the search.

Method to instantiate query for geo based search.

TODO: Need to validate input params here.

Parameters
  • geoproperty (String) – Which geoproperty to query.

  • geometry (String) – GeoJson geometries.

  • georel (String) – Geo-relationship.

  • max_distance (Integer) – Radius from the center in meters.

  • coordinates (List[Any]) – The Coordinates of the geometry.

get_query()str[source]

Method to build query for geo, temporal, propery and add filter.

Returns

options as a string for the generated query.

Return type

opts (String)

Method to instantiate query for latest resource search

based on the resource entities (Ids).

Returns

query string for latest resource.

Return type

latest_opts (String)

Method to instantiate query for property based search.

Parameters
  • key (String) – Property key to query.

  • value (str/float) – Values for the comparision with the key.

  • operation (String) – Operation to be performed between key and value.

iudx.rs.ResourceResult module

Module doc string. Leave empty for now.

ResourceResult.py

class iudx.rs.ResourceResult.ResourceResult[source]

Bases: object

Abstract class for Resource Result. Helps to create a modular interface for the API response results.

iudx.rs.ResourceServer module

Module doc string. Leave empty for now.

ResourceServer.py

class iudx.rs.ResourceServer.ResourceServer(rs_url: Optional[str] = None, token: Optional[str] = None, headers: Optional[Dict[str, str]] = None)[source]

Bases: object

Abstract class for Resource Server. Helps to create a modular interface for the API to implement queries.

get_data(queries: List[iudx.rs.ResourceQuery.ResourceQuery])List[iudx.rs.ResourceResult.ResourceResult][source]
Method to post the request for geo, temporal, property, add filters

and make complex query.

Parameters
Returns

returns a list of

ResourceResult object.

Return type

rs_results (List[ResourceResult])

get_latest(queries: List[iudx.rs.ResourceQuery.ResourceQuery])List[iudx.rs.ResourceResult.ResourceResult][source]

Method to get the request for latest resource data.

Parameters

query (ResourceQuery) – A query object of ResourceQuery class.

Returns

returns a ResourceResult object.

Return type

rs_result (ResourceResult)

status()bool[source]

Pydoc heading.

Parameters

argument (argument-type) – argument-description

Returns

return-variable-description

Return type

returned-varaible (returned-varaible-type)

Module contents