pretalx_client.adapters.schedule

Schedule slot parsing and datetime normalization for Pretalx API data.

Handles the differences between the legacy Pretalx schedule format (string room/code/title) and the paginated /slots/ endpoint format (integer room IDs, submission key instead of code, no title).

Functions

normalize_slot(data, *[, rooms])

Normalize a raw Pretalx slot dict into a consistent field set.

parse_datetime(value)

Parse an ISO 8601 datetime string, returning None on failure.

pretalx_client.adapters.schedule.parse_datetime(value)[source]

Parse an ISO 8601 datetime string, returning None on failure.

Parameters:

value (str) – An ISO 8601 formatted datetime string.

Return type:

datetime | None

Returns:

A datetime instance, or None if the string is empty or cannot be parsed.

pretalx_client.adapters.schedule.normalize_slot(data, *, rooms=None)[source]

Normalize a raw Pretalx slot dict into a consistent field set.

Handles both the legacy format (string room, code, title keys) and the real paginated /slots/ format (integer room ID, submission key instead of code, no title).

Parameters:
  • data (dict[str, Any]) – A single slot object from the Pretalx schedule endpoint.

  • rooms (dict[int, str] | None) – Optional {id: name} mapping for resolving integer room IDs.

Returns:

room, start, end, code, title, start_dt, end_dt.

Return type:

A dict with normalized keys