pypn_habref_api.routes
Module Contents
Functions
|
Get the first 20 result of Habref table for a given field with an ilike query |
|
Get one habitat with its correspondances |
Get all habref items of a list for autocomplete |
|
|
Get all typology |
|
Get all correspondances in other typo from a cd_hab |
Attributes
- 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>