Module stac_fastapi.extensions.core.pagination¶
Pagination classes as extensions.
Sub-modules¶
- stac_fastapi.extensions.core.pagination.offset_pagination
- stac_fastapi.extensions.core.pagination.pagination
- stac_fastapi.extensions.core.pagination.request
- stac_fastapi.extensions.core.pagination.token_pagination
Classes¶
OffsetPaginationExtension¶
class OffsetPaginationExtension(
conformance_classes: List[str] = NOTHING,
schema_href: Optional[str] = None
)
Offset Pagination.
Though not strictly an extension, the chosen pagination will modify the form of the request object. By making pagination an extension class, we can use create_request_model to dynamically add the correct pagination parameter to the request model for OpenAPI generation.
Ancestors (in MRO)¶
- stac_fastapi.types.extension.ApiExtension
- abc.ABC
Class variables¶
GET
POST
Methods¶
get_request_model¶
def get_request_model(
self,
verb: Optional[str] = 'GET'
) -> Optional[pydantic.main.BaseModel]
Return the request model for the extension.method.
The model can differ based on HTTP verb
register¶
def register(
self,
app: fastapi.applications.FastAPI
) -> None
Register the extension with a FastAPI application.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app | None | target FastAPI application. | None |
Returns:
Type | Description |
---|---|
None | None |
PaginationExtension¶
class PaginationExtension(
conformance_classes: List[str] = NOTHING,
schema_href: Optional[str] = None
)
Token Pagination.
Though not strictly an extension, the chosen pagination will modify the form of the request object. By making pagination an extension class, we can use create_request_model to dynamically add the correct pagination parameter to the request model for OpenAPI generation.
Ancestors (in MRO)¶
- stac_fastapi.types.extension.ApiExtension
- abc.ABC
Class variables¶
GET
POST
Methods¶
get_request_model¶
def get_request_model(
self,
verb: Optional[str] = 'GET'
) -> Optional[pydantic.main.BaseModel]
Return the request model for the extension.method.
The model can differ based on HTTP verb
register¶
def register(
self,
app: fastapi.applications.FastAPI
) -> None
Register the extension with a FastAPI application.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app | None | target FastAPI application. | None |
Returns:
Type | Description |
---|---|
None | None |
TokenPaginationExtension¶
class TokenPaginationExtension(
conformance_classes: List[str] = NOTHING,
schema_href: Optional[str] = None
)
Token Pagination.
Though not strictly an extension, the chosen pagination will modify the form of the request object. By making pagination an extension class, we can use create_request_model to dynamically add the correct pagination parameter to the request model for OpenAPI generation.
Ancestors (in MRO)¶
- stac_fastapi.types.extension.ApiExtension
- abc.ABC
Class variables¶
GET
POST
Methods¶
get_request_model¶
def get_request_model(
self,
verb: Optional[str] = 'GET'
) -> Optional[pydantic.main.BaseModel]
Return the request model for the extension.method.
The model can differ based on HTTP verb
register¶
def register(
self,
app: fastapi.applications.FastAPI
) -> None
Register the extension with a FastAPI application.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app | None | target FastAPI application. | None |
Returns:
Type | Description |
---|---|
None | None |