Babeltrace 1.5 Python bindings¶
Generated on March 03, 2020.
Welcome to Babeltrace’s Python bindings’ documentation!
Babeltrace is a trace format converter. It is able to read and write different trace formats, such as the Common Trace Format (CTF). Babeltrace also acts as the CTF reference implementation.
The Babeltrace Python bindings rely on the
the current public C API of Babeltrace.
The Python bindings may be enabled when configuring Babeltrace’s build:
On Debian and Ubuntu, the Python bindings are available in the
Currently, the Babeltrace Python bindings only works with Python 3.
The Babeltrace Python bindings are available as a single Python package,
The Babeltrace Python bindings’ API is divided into two parts:
- The reader API is exposed by the
babeltrace.readermodule, a set of classes used to open a collection of different traces and iterate on their events.
- The CTF writer API is exposed by the
babeltrace.writermodule, which makes it possible to write a complete CTF trace from scratch.
For backward compatibility reasons, the reader API is imported in the
package itself. The CTF writer API is imported in the package itself
CTFWriter. It is, however, strongly
recommended to import and use the three modules
babeltrace.writer) explicitly, since there is no long-term
plan to maintain the compatibility layer.
- 1. Common constants
- 2. Reader API
- 3. CTF writer API
- 4. Examples
- 4.1. Reader API examples
- 4.2. CTF writer API examples