Skip to content

API Reference

Config

stac_timelapse.config.Config dataclass

Single source of truth for a rendering run.

datetime_interval property

Return a STAC datetime interval string.

validate()

Raise a clear error for invalid or incomplete configuration.

run

stac_timelapse.pipeline.run(cfg)

Run the configured render mode and return the generated HLS playlist.

stac

stac_timelapse.stac.get_items(cfg)

Query the STAC API and return items sorted by datetime ascending.

The unauthenticated path tries pystac-client first, then falls back to a raw requests implementation. Authenticated runs use raw requests so the bearer token is passed consistently across pagination links.

render

Register a Raster API search pinned to a single STAC item and return its search id.

Filters by item id so the search works for both point-datetime items and interval items (start_datetime / end_datetime with datetime=null).

stac_timelapse.render.fetch_frame(search_id, cfg)

Fetch a rendered PNG for a registered Raster API search.

render_cmr

stac_timelapse.render_cmr.fetch_cmr_frame(date_str, cfg)

Fetch a rendered PNG from titiler-cmr for a given date.

Uses /xarray/bbox endpoint. Dry/zero pixels are made transparent in post-processing so the basemap shows through.

stac_timelapse.render_cmr.generate_dates(cfg)

Generate timestamps between datetime_start and datetime_end at the configured frequency. Returns ISO-8601 strings.

basemap

stac_timelapse.basemap.fetch_basemap(cfg)

Return a basemap image for cfg.bbox at cfg.width × cfg.height.

overlay

stac_timelapse.overlay.compose_frame(data_png, basemap, datetime_str, cfg)

Composite data, basemap, colorbar, title, and timestamp into a PNG frame.

encode

stac_timelapse.encode.encode_hls(frames_dir, output_dir, cfg)

Encode a PNG frame sequence into HLS and return index.m3u8.