Titiler-pgstac

Latest version: v1.7.2

Safety actively analyzes 723954 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 9

1.0.0a0

* add `pgstac_dependency` attribute in `MosaicTilerFactory` (defaults to `dependencies.PgSTACParams`)

* add database's `pool` check in startup event

* add *metadata layers* links in mosaic's `/info` response for TileJSON, map and wmts endpoint links

* add `CollectionIdParams` dependency to retrieve a SearchId for a CollectionId

* add `/collections/{collection_id}` virtual mosaic endpoints

* update endpoints Tags (`STAC Search`, `STAC Collection`, `STAC Item`)

Endpoint breaking changes

* move PgSTAC Search Virtual Mosaic's endpoints from `/mosaic` to `/searches`

* in `model.RegisterResponse` (model used in `/register` endpoint) rename `searchid` by `id`

python
before
resp = httpx.post("/mosaic/register", body={"collections": ["my-collection"], "filter-lang": "cql-json"})
assert resp.json()["searchid"]

now
resp = httpx.post("/searches/register", body={"collections": ["my-collection"], "filter-lang": "cql-json"})
assert resp.json()["id"]


API breaking changes

* rename `dependencies.PathParams` to `dependencies.SearchIdParams`

* rename `searchid` path parameter to `search_id` in `SearchIdParams`

* move `check_query_params` methods outside `MosaicTilerFactory` class

* make `path_dependency` a required input to `MosaicTilerFactory` class

python
before
app = FastAPI()
mosaic = MosaicTilerFactory(...)
app.include_router(mosaic.router)

now
app = FastAPI()
mosaic = MosaicTilerFactory(
...,
path_dependency=lambda: "aaaaaaaaaaaaaa"
)
app.include_router(mosaic.router)


* remove `/{search_id}` prefix in `MosaicTilerFactory` routes. Now use parameter injection from global prefix

python
Before
app = FastAPI()
mosaic = MosaicTilerFactory(
...,
router_prefix="/mosaics"
)
app.include_router(mosaic.router, prefix="/mosaics")

Now
app = FastAPI()
mosaic = MosaicTilerFactory(
...
router_prefix="/mosaics/{search_id}"
)
app.include_router(mosaic.router, prefix="/mosaics/{search_id}")


* move `/info` endpoint outside the `MosaicTilerFactory` to its own *extension* (`titiler.pgstac.extension.searchInfoExtension`)

python
Before
app = FastAPI()
mosaic = MosaicTilerFactory(...)
app.include_router(mosaic.router)

Now
app = FastAPI()
mosaic = MosaicTilerFactory(
...
extensions=[
searchInfoExtension(),
]
)
app.include_router(mosaic.router)


* move `/register` and `/list` endpoint creation outside the `MosaicTilerFactory` class

python
before
from titiler.pgstac.factory import MosaicTilerFactory

mosaic = MosaicTilerFactory(
...,
router_prefix="/{search_id}",
)
app.include_router(mosaic.router, prefix="/{search_id}")

Now
from titiler.pgstac.factory import (
MosaicTilerFactory,
add_search_register_route,
add_mosaic_register_route,
)

mosaic = MosaicTilerFactory(
...,
router_prefix="/{search_id}",
)
app.include_router(mosaic.router, prefix="/{search_id}")

add /register endpoint
add_search_register_route(
app,
any dependency we want to validate
when creating the tilejson/map links
tile_dependencies=[
mosaic.layer_dependency,
mosaic.dataset_dependency,
mosaic.pixel_selection_dependency,
mosaic.process_dependency,
mosaic.rescale_dependency,
mosaic.colormap_dependency,
mosaic.render_dependency,
mosaic.pgstac_dependency,
mosaic.reader_dependency,
mosaic.backend_dependency,
],
)
add /list endpoint
add_search_list_route(app)

0.8.3

* enable passing `ConnectionPool` kwargs option in `titiler.pgstac.db.connect_to_db` function (author smohiudd, 155) [backported from 1.2.2]

0.8.2

* update rio-tiler version to `>6.3.0` (defined in `titiler>=0.17`)
* use new `align_bounds_with_dataset=True` rio-tiler option in GeoJSON statistics methods for more precise calculation [backported from 1.2.0]
* use morecantile `TileMatrixSet.cellSize` property instead of deprecated/private TileMatrixSet._resolution method [backported from 1.1.0]

0.8.1

* add `algorithm` options for `/statistics [POST]` endpoints

0.8.0

* update titiler requirement to `>=0.15.0,<0.16`
* remove `max_size` default for mosaic's `/statistics [POST]` endpoint **breaking change**
* add `/bbox` and `/feature [POST]` optional endpoints
* add `img_part_dependency` attribute in `MosaicTilerFactory` (defaults to `titiler.code.dependencies.PartFeatureParams`)

0.7.0

* update requirements to switch to pydantic~=2.0
- pydantic>=2.4,<3.0
- pydantic-settings~=2.0
- geojson-pydantic~=1.0
- cogeo-mosaic>=7.0,<8.0

* update titiler requirement to `>=0.14.0,<0.15`

- replace `-` by `_` in query parameters

* coord-crs -> coord_crs
* dst-crs -> dst_crs

Page 4 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.