List bundles. :param limit: the maximum number of bundles to return. :param offset: the offset of bundles to return. :return: a list of bundles.
(
limit: int,
offset: Optional[int],
)
| 100 | |
| 101 | |
| 102 | def list_bundles( |
| 103 | limit: int, |
| 104 | offset: Optional[int], |
| 105 | ): |
| 106 | """ |
| 107 | List bundles. |
| 108 | :param limit: the maximum number of bundles to return. |
| 109 | :param offset: the offset of bundles to return. |
| 110 | :return: a list of bundles. |
| 111 | """ |
| 112 | |
| 113 | # Paginate |
| 114 | end_index = offset + limit |
| 115 | page = _bundles[offset:end_index] or [] |
| 116 | |
| 117 | # Check if there's more |
| 118 | has_more = end_index < len(_bundles) |
| 119 | |
| 120 | return page, len(_bundles), has_more |
| 121 | |
| 122 | |
| 123 | def list_plugins( |