Babeltrace 1.5 Python bindings¶
Generated on March 03, 2020.
Welcome!¶
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 libbabeltrace
library,
the current public C API of Babeltrace.
Installing¶
The Python bindings may be enabled when configuring Babeltrace’s build:
./configure --enable-python-bindings
On Debian and Ubuntu, the Python bindings are available in the
python3-babeltrace
package.
Note
Currently, the Babeltrace Python bindings only works with Python 3.
Bindings¶
The Babeltrace Python bindings are available as a single Python package,
babeltrace
.
The Babeltrace Python bindings’ API is divided into two parts:
- The reader API is exposed by the
babeltrace.reader
module, 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.writer
module, which makes it possible to write a complete CTF trace from scratch.
Note
For backward compatibility reasons, the reader API is imported in the
package itself. The CTF writer API is imported in the package itself
too, as CTFWriter
. It is, however, strongly
recommended to import and use the three modules
(babeltrace.common
, babeltrace.reader
, and
babeltrace.writer
) explicitly, since there is no long-term
plan to maintain the compatibility layer.
Contents:
- 1. Common constants
- 2. Reader API
- 2.1.
TraceCollection
- 2.2.
TraceHandle
- 2.3.
Event
- 2.4.
FieldError
- 2.5.
EventDeclaration
- 2.6.
FieldDeclaration
- 2.7.
IntegerFieldDeclaration
- 2.8.
FloatFieldDeclaration
- 2.9.
EnumerationFieldDeclaration
- 2.10.
StringFieldDeclaration
- 2.11.
ArrayFieldDeclaration
- 2.12.
SequenceFieldDeclaration
- 2.13.
StructureFieldDeclaration
- 2.14.
VariantFieldDeclaration
- 2.1.
- 3. CTF writer API
- 3.1.
Writer
- 3.2.
StreamClass
- 3.3.
Stream
- 3.4.
Clock
- 3.5.
EventClass
- 3.6.
Event
- 3.7.
FieldDeclaration
- 3.8.
IntegerBase
- 3.9.
IntegerFieldDeclaration
- 3.10.
FloatingPointFieldDeclaration
- 3.11.
EnumerationMapping
- 3.12.
EnumerationFieldDeclaration
- 3.13.
StringFieldDeclaration
- 3.14.
ArrayFieldDeclaration
- 3.15.
SequenceFieldDeclaration
- 3.16.
StructureFieldDeclaration
- 3.17.
VariantFieldDeclaration
- 3.18.
Field
- 3.19.
IntegerField
- 3.20.
FloatingPointField
- 3.21.
EnumerationField
- 3.22.
StringField
- 3.23.
ArrayField
- 3.24.
SequenceField
- 3.25.
StructureField
- 3.26.
VariantField
- 3.1.
- 4. Examples