pypn_habref_api.routes

Module Contents

Functions

getSearchInField(field, ilike)

Get the first 20 result of Habref table for a given field with an ilike query

get_hab(cd_hab)

Get one habitat with its correspondances

get_habref_autocomplete()

Get all habref items of a list for autocomplete

get_typo()

Get all typology

get_coresp(cd_hab)

Get all correspondances in other typo from a cd_hab

Attributes

routes

pypn_habref_api.routes.routes[source]
pypn_habref_api.routes.getSearchInField(field, ilike)[source]

Get the first 20 result of Habref table for a given field with an ilike query Use trigram algo to add relevance

Params field:

a Habref column

Paramètres:

ilike – the ilike where expression to filter

:type ilike:str

Renvoie:

Array of dict

pypn_habref_api.routes.get_hab(cd_hab)[source]

Get one habitat with its correspondances

Params cd_hab:

a cd_hab

pypn_habref_api.routes.get_habref_autocomplete()[source]

Get all habref items of a list for autocomplete

Query id_list int:

the id of the habref list

Query search_name str:

the pattern to filter with

Query cd_typo int:

filter by typology

Query limit int:

number of results, default = 20

Renvoie:

Array<AutoCompleteHabitat>

pypn_habref_api.routes.get_typo()[source]

Get all typology

Query int id_list:

return only the typology of a given id_list

Renvoie:

Array<TypoRef>

pypn_habref_api.routes.get_coresp(cd_hab)[source]

Get all correspondances in other typo from a cd_hab

Params cd_hab:

a cd_hab