iudx.cat package¶
Submodules¶
iudx.cat.Catalogue module¶
Module doc string. Leave empty for now.
Catalogue.py
-
class
iudx.cat.Catalogue.Catalogue(cat_url: Optional[str] = None, token: Optional[str] = None, headers: Optional[Dict[str, str]] = None)[source]¶ Bases:
objectAbstract class for Catalogue. Helps to create a modular interface for the API to implement queries.
-
count_entity(query: iudx.cat.CatalogueQuery.CatalogueQuery) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Method to get the count response for entities, based on a query.
- Parameters
query (CatalogueQuery) – A query object of CatalogueQuery class.
- Returns
returns a CatalogueResult object.
- Return type
cat_result (CatalogueResult)
-
create(item: Dict[str, Any]) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-
delete(iid: str) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-
get_item(iid: str) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
- Method to get the relationship response for entities,
based on their id and relation.
- Parameters
iid (String) – Id of the entity.
rel (String) – Relationship attribute of the entity whose id is provided.
- Returns
returns a CatalogueResult object.
- Return type
cat_result (CatalogueResult)
-
list_entity(entity_type: str) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Method to get the list response for entities, based on an entity type.
- Parameters
entity_type (String) – type must be either resource, resourceGroup, resourceServer.
- Returns
returns a CatalogueResult object.
- Return type
cat_result (CatalogueResult)
-
rel_search(query: iudx.cat.CatalogueQuery.CatalogueQuery) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Pydoc heading. TODO: Implement the query for relationship search in CatalogueQuery before this function defination.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-
search_entity(query: iudx.cat.CatalogueQuery.CatalogueQuery) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Method to get the search response for entities, based on a query.
- Parameters
query (CatalogueQuery) – A query object of CatalogueQuery class.
- Returns
returns a CatalogueResult object.
- Return type
cat_result (CatalogueResult)
-
status() → bool[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-
update(item: Dict[str, Any]) → iudx.cat.CatalogueResult.CatalogueResult[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-
iudx.cat.CatalogueQuery module¶
Module doc string. Leave empty for now.
CatalogueQuery.py
-
class
iudx.cat.CatalogueQuery.CatalogueQuery[source]¶ Bases:
objectAbstract class for Catalogue Query. Helps to create a modular interface for the API to construct query in Python.
-
add_filters(filters: Optional[List[str]] = None) → T[source]¶ Method to instantiate query for filter based search.
- Parameters
filters (List[str]) – Filters to be filtered.
-
geo_search(geoproperty: Optional[str] = None, geometry: Optional[str] = None, georel: Optional[str] = None, max_distance: Optional[int] = None, coordinates: Optional[List[Any]] = None) → T[source]¶ - 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, text, propery and filter.
- Returns
options as a string for the generated query.
- Return type
opts (String)
-
iudx.cat.CatalogueResult module¶
Module doc string. Leave empty for now.
CatalogueResult.py
-
class
iudx.cat.CatalogueResult.CatalogueResult[source]¶ Bases:
objectAbstract class for Resource Result. Helps to create a modular interface for the API response results.
-
all_pages() → T[source]¶ Pydoc heading.
- Parameters
argument (argument-type) – argument-description
- Returns
return-variable-description
- Return type
returned-varaible (returned-varaible-type)
-