Typing Annotations¶
Zeek Data Types¶
Boolean¶
Numeric Types¶
- zlogging.typing.zeek_double: DoubleType¶
Zeek
count
data type.
Time Types¶
- zlogging.typing.zeek_interval: IntervalType¶
Zeek
interval
data type.
String¶
- zlogging.typing.zeek_string: StringType¶
Zeek
string
data type.
Network Types¶
- zlogging.typing.zeek_subnet: SubnetType¶
Zeek
subnet
data type.
Enumeration¶
Container Types¶
- class zlogging.typing.zeek_set(empty_field=None, unset_field=None, set_separator=None, element_type=None, *args, **kwargs)[source]¶
-
Zeek
set
data type.Notes
As a generic data type, the class supports the typing proxy as introduced PEP 484:
class MyLog(zeek_record): field_one: zeek_set[zeek_str]
which is the same at runtime as following:
class MyLog(zeek_record): field_one = SetType(element_type=StringType())
- Parameters:
empty_field (bytes) – Placeholder for empty field.
unset_field (bytes) – Placeholder for unset field.
set_separator (bytes) – Separator for
set
/vector
fields.element_type (_S) – Data type of container’s elements.
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- class zlogging.typing.zeek_vector(empty_field=None, unset_field=None, set_separator=None, element_type=None, *args, **kwargs)[source]¶
Bases:
VectorType
,Generic
[_S
]Zeek
vector
data type.Notes
As a generic data type, the class supports the typing proxy as introduced PEP 484:
class MyLog(zeek_record): field_one: zeek_vector[zeek_str]
which is the same at runtime as following:
class MyLog(zeek_record): field_one = VectorType(element_type=StringType())
- Parameters:
empty_field (bytes) – Placeholder for empty field.
unset_field (bytes) – Placeholder for unset field.
set_separator (bytes) – Separator for
set
/vector
fields.element_type (_S) – Data type of container’s elements.
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- class zlogging.typing.zeek_record(empty_field=None, unset_field=None, set_separator=None, *args, **element_mapping)[source]¶
Bases:
RecordType
Zeek
record
data type.Notes
As a variadic data type, it supports the typing proxy as
TypedDict
, introduced in PEP 589:class MyLog(zeek_record): field_one: zeek_int field_two: zeek_set[zeek_port]
which is the same at runtime as following:
RecordType(field_one=IntType, field_two=SetType(element_type=PortType))
See also
See
expand_typing()
for more information about the processing of typing proxy.- Parameters:
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- Return type:
Bro Data Types¶
Warning
Use of bro
is deprecated. Please use zeek
instead.
Boolean¶
Numeric Types¶
Time Types¶
- zlogging.typing.bro_interval: IntervalType¶
Bro
interval
data type.
String¶
- zlogging.typing.bro_string: StringType¶
Bro
string
data type.
Network Types¶
- zlogging.typing.bro_subnet: SubnetType¶
Bro
subnet
data type.
Enumeration¶
Container Types¶
- class zlogging.typing.bro_set(*args, **kwargs)[source]¶
-
Bro
set
data type.See also
See
zeek_set
for more information.- Parameters:
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- class zlogging.typing.bro_vector(*args, **kwargs)[source]¶
Bases:
VectorType
,Generic
[_S
]Bro
vector
data type.See also
See
zeek_vector
for more information.- Parameters:
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- class zlogging.typing.bro_record(*args, **kwargs)[source]¶
Bases:
RecordType
Bro
record
data type.See also
See
zeek_record
for more information.- Parameters:
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.