medical_app.backend.api_helper_functions
Module Contents
Functions
|
Return paginated range of collection. |
Convert camel case var name to underscore python convention var name. |
- medical_app.backend.api_helper_functions.paginate(collection_: Sequence, offset: int = 0, limit: int = 10) Sequence
Return paginated range of collection.
- Parameters:
collection – indexable sequence of objects
offset – return elements starting from offset index position
limit – maximum number of elements to return, actual returned number can be lower if there are less elements in collection after offset.
- Returns:
collection from offset to offest + limit
- medical_app.backend.api_helper_functions.convert_camel_case_to_underscore(camel_case_name: str) str
Convert camel case var name to underscore python convention var name.
- Parameters:
camel_case_name – var in camel case
:return same var name in under score