---
sidebar:
  label: roboto.formats.mcap
  order: 1
title: roboto.formats.mcap
---
Fetching and decoding topic data stored in MCAP files.

Covers chunk-index-driven prefetching over HTTP range requests and decoding of JSON-, ROS1-, and ROS2-encoded messages with field-path projection.

## Submodules

- [roboto.formats.mcap.accessor](/docs/reference/python-sdk/roboto/formats/mcap/accessor)
- [roboto.formats.mcap.decoded_message](/docs/reference/python-sdk/roboto/formats/mcap/decoded_message)
- [roboto.formats.mcap.fetch](/docs/reference/python-sdk/roboto/formats/mcap/fetch)
- [roboto.formats.mcap.json_decoder_factory](/docs/reference/python-sdk/roboto/formats/mcap/json_decoder_factory)
- [roboto.formats.mcap.msgpack_decoder_factory](/docs/reference/python-sdk/roboto/formats/mcap/msgpack_decoder_factory)
- [roboto.formats.mcap.reader](/docs/reference/python-sdk/roboto/formats/mcap/reader)
- [roboto.formats.mcap.ros_cdr_decoder_factory](/docs/reference/python-sdk/roboto/formats/mcap/ros_cdr_decoder_factory)

## Package Contents

- [Accessor](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.Accessor) (data): Reads one path's value out of a decoded message and writes it into an [`Accumulator`](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.Accumulator).

- [END_OF_STREAM](/reference/python-sdk/roboto/formats/mcap/reader#roboto.formats.mcap.reader.END_OF_STREAM) (data): Sentinel returned by [`McapReader.next_decoded()`](/reference/python-sdk/roboto/formats/mcap/reader#roboto.formats.mcap.reader.McapReader.next_decoded) when the stream is exhausted.

- [McapReader](/reference/python-sdk/roboto/formats/mcap/reader#roboto.formats.mcap.reader.McapReader) (class): Reader for processing MCAP files with field projection.

- [Resolution](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.Resolution) (data): A resolved accessor path: a no-op, a simple attribute chain, or a per-element sequence crossing.

- [build_accessor()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.build_accessor) (function): Compile a resolution into an [`Accessor`](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.Accessor) that reads its path into an accumulator.

- [compile_accessors()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.compile_accessors) (function): Compile one accessor per field. Does not cache; callers manage caching.

- [getter_for()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.getter_for) (function): The shared attribute getter for a decoded message.

- [none_resolution()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.none_resolution) (function): A resolution whose accessor is a no-op (the path is absent on a message).

- [open_for_window()](/reference/python-sdk/roboto/formats/mcap/fetch#roboto.formats.mcap.fetch.open_for_window) (function): Open a remote MCAP file for reading, prefetching only the chunks in a log-time window and of one topic.

- [remap_time_fields()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.remap_time_fields) (function): Substitute the decoder's runtime time-field name into `resolution`, observed against `sample`.

- [sequence_resolution()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.sequence_resolution) (function): A resolution that crosses the sequence at `pre_path`, applying `sub` per element.

- [simple_resolution()](/reference/python-sdk/roboto/formats/mcap/accessor#roboto.formats.mcap.accessor.simple_resolution) (function): A resolution for a straight attribute chain (no sequence crossing).
