diff --git a/setup.py b/setup.py index 279fafb56..121aed302 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,7 @@ "sqlakeyset", "stac-pydantic>=1.3.5", "pydantic[dotenv]", - "cogeo-mosaic==3.0a10", - "titiler==0.1a2", - "rio-cogeo==2.0a5", + "titiler==0.1.0a12", ] extra_reqs = { diff --git a/stac_api/api/extensions/tiles.py b/stac_api/api/extensions/tiles.py index 1f02c07ea..be4002e55 100644 --- a/stac_api/api/extensions/tiles.py +++ b/stac_api/api/extensions/tiles.py @@ -1,17 +1,14 @@ """tiles extension""" from dataclasses import dataclass -import pkg_resources from fastapi import FastAPI -from starlette.requests import Request -from starlette.responses import HTMLResponse -from starlette.templating import Jinja2Templates - from stac_api.api.extensions.extension import ApiExtension from stac_api.api.models import ItemUri from stac_api.api.routes import create_endpoint_with_depends from stac_api.clients.tiles.ogc import TilesClient from stac_api.models.ogc import TileSetResource +from starlette.requests import Request +from starlette.responses import HTMLResponse @dataclass @@ -23,9 +20,7 @@ class TilesExtension(ApiExtension): def register(self, app: FastAPI) -> None: """register extension with the application""" from titiler.endpoints.stac import STACTiler - - template_dir = pkg_resources.resource_filename("titiler", "templates") - templates = Jinja2Templates(directory=template_dir) + from titiler.templates import templates titiler_router = STACTiler().router