pds.dynamic_index

pds.dynamic_index

Dynamic index management

These are the codes for web-scraped PDS archive pages to discover the most recent volume delivery with a new index file and its URL.

Classes

Name Description
DynamicRemoteHandler Manages dynamic index URLs and their discovery/caching.

DynamicRemoteHandler

pds.dynamic_index.DynamicRemoteHandler(index_key)

Manages dynamic index URLs and their discovery/caching.

It uses the AccessLog to track TWO URLs: 1. current_url: The URL of the locally cached index 2. available_url: The URL of a newly discovered update (if any)

This separation ensures we always know which URL corresponds to our cached data.

Parameters

Name Type Description Default
index_key str The dotted index key (e.g. “mro.ctx.edr”). required

Attributes

Name Description
handler_class Get handler class.
should_check Determine if we should check for updates based on last check time.
update_available Check if an update is available.
url Get the URL to use for downloading.

Methods

Name Description
discover_latest_url Discover the latest index URL from the remote source.
discover_latest_url
pds.dynamic_index.DynamicRemoteHandler.discover_latest_url()

Discover the latest index URL from the remote source.

This method only discovers and returns the URL - it does NOT update any logs. Logging is handled by the caller based on what they want to do with the URL.