diff --git a/titiler/openeo/factory.py b/titiler/openeo/factory.py index 24eaf25..856fc3c 100644 --- a/titiler/openeo/factory.py +++ b/titiler/openeo/factory.py @@ -10,8 +10,8 @@ from titiler.core.factory import BaseFactory from titiler.openeo import __version__ as titiler_version from titiler.openeo import models -from titiler.openeo.backends import BaseBackend from titiler.openeo.models import OPENEO_VERSION +from titiler.openeo.stac import STACBackend STAC_VERSION = "1.0.0" @@ -20,7 +20,7 @@ class EndpointsFactory(BaseFactory): """OpenEO Endpoints Factory.""" - stac_backend: BaseBackend + stac_backend: STACBackend def register_routes(self): """Register Routes.""" diff --git a/titiler/openeo/main.py b/titiler/openeo/main.py index 8d3dce7..82b5038 100644 --- a/titiler/openeo/main.py +++ b/titiler/openeo/main.py @@ -6,9 +6,9 @@ from titiler.core.middleware import CacheControlMiddleware from titiler.openeo import __version__ as titiler_version -from titiler.openeo.backends import get_stac_backend from titiler.openeo.factory import EndpointsFactory from titiler.openeo.settings import ApiSettings, STACSettings +from titiler.openeo.stac import get_stac_backend STAC_VERSION = "1.0.0" diff --git a/titiler/openeo/backends/__init__.py b/titiler/openeo/stac/__init__.py similarity index 93% rename from titiler/openeo/backends/__init__.py rename to titiler/openeo/stac/__init__.py index fb81738..879b0ed 100644 --- a/titiler/openeo/backends/__init__.py +++ b/titiler/openeo/stac/__init__.py @@ -2,7 +2,7 @@ from urllib.parse import urlparse -from .base import BaseBackend # noqa +from .base import STACBackend # noqa def get_stac_backend(url: str, **kwargs): diff --git a/titiler/openeo/backends/base.py b/titiler/openeo/stac/base.py similarity index 94% rename from titiler/openeo/backends/base.py rename to titiler/openeo/stac/base.py index ad82e6a..a2ddd52 100644 --- a/titiler/openeo/backends/base.py +++ b/titiler/openeo/stac/base.py @@ -7,7 +7,7 @@ @define(kw_only=True) -class BaseBackend(metaclass=abc.ABCMeta): +class STACBackend(metaclass=abc.ABCMeta): """ABC Class defining STAC Backends.""" url: str = field() diff --git a/titiler/openeo/backends/pgstac.py b/titiler/openeo/stac/pgstac.py similarity index 97% rename from titiler/openeo/backends/pgstac.py rename to titiler/openeo/stac/pgstac.py index 4f45da3..535a6db 100644 --- a/titiler/openeo/backends/pgstac.py +++ b/titiler/openeo/stac/pgstac.py @@ -9,11 +9,11 @@ from psycopg_pool import ConnectionPool from ..settings import PgSTACSettings -from .base import BaseBackend +from .base import STACBackend @define -class pgStacBackend(BaseBackend): +class pgStacBackend(STACBackend): """PgSTAC Backend.""" url: str = field() diff --git a/titiler/openeo/backends/stacapi.py b/titiler/openeo/stac/stacapi.py similarity index 95% rename from titiler/openeo/backends/stacapi.py rename to titiler/openeo/stac/stacapi.py index 1b9f6fd..7e596ef 100644 --- a/titiler/openeo/backends/stacapi.py +++ b/titiler/openeo/stac/stacapi.py @@ -10,11 +10,11 @@ from urllib3 import Retry from ..settings import PySTACSettings -from .base import BaseBackend +from .base import STACBackend @define -class stacApiBackend(BaseBackend): +class stacApiBackend(STACBackend): """PySTAC-Client Backend.""" url: str = field()