Skip to content

client

stac_fastapi.extensions.core.collection_search.client

collection-search extensions clients.

AsyncBaseCollectionSearchClient

Bases: ABC

Defines a pattern for implementing the STAC collection-search POST extension.

Source code in stac_fastapi/extensions/core/collection_search/client.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@attr.s
class AsyncBaseCollectionSearchClient(abc.ABC):
    """Defines a pattern for implementing the STAC collection-search POST extension."""

    @abc.abstractmethod
    async def post_all_collections(
        self,
        search_request: BaseCollectionSearchPostRequest,
        **kwargs,
    ) -> stac.ItemCollection:
        """Get all available collections.

        Called with `POST /collections`.

        Returns:
            A list of collections.

        """
        ...

post_all_collections abstractmethod async

post_all_collections(search_request: BaseCollectionSearchPostRequest, **kwargs) -> ItemCollection

Get all available collections.

Called with POST /collections.

Returns:

Source code in stac_fastapi/extensions/core/collection_search/client.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@abc.abstractmethod
async def post_all_collections(
    self,
    search_request: BaseCollectionSearchPostRequest,
    **kwargs,
) -> stac.ItemCollection:
    """Get all available collections.

    Called with `POST /collections`.

    Returns:
        A list of collections.

    """
    ...

BaseCollectionSearchClient

Bases: ABC

Defines a pattern for implementing the STAC collection-search POST extension.

Source code in stac_fastapi/extensions/core/collection_search/client.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@attr.s
class BaseCollectionSearchClient(abc.ABC):
    """Defines a pattern for implementing the STAC collection-search POST extension."""

    @abc.abstractmethod
    def post_all_collections(
        self, search_request: BaseCollectionSearchPostRequest, **kwargs
    ) -> stac.ItemCollection:
        """Get all available collections.

        Called with `POST /collections`.

        Returns:
            A list of collections.

        """
        ...

post_all_collections abstractmethod

post_all_collections(search_request: BaseCollectionSearchPostRequest, **kwargs) -> ItemCollection

Get all available collections.

Called with POST /collections.

Returns:

Source code in stac_fastapi/extensions/core/collection_search/client.py
37
38
39
40
41
42
43
44
45
46
47
48
49
@abc.abstractmethod
def post_all_collections(
    self, search_request: BaseCollectionSearchPostRequest, **kwargs
) -> stac.ItemCollection:
    """Get all available collections.

    Called with `POST /collections`.

    Returns:
        A list of collections.

    """
    ...