Typing Annotations

Zeek Data Types

zlogging.typing.zeek_addr

Zeek addr data type.

alias of TypeVar(‘zeek_addr’)

zlogging.typing.zeek_bool

Zeek bool data type.

alias of TypeVar(‘zeek_bool’)

zlogging.typing.zeek_count

Zeek count data type.

alias of TypeVar(‘zeek_count’)

zlogging.typing.zeek_double

Zeek double data type.

alias of TypeVar(‘zeek_double’)

zlogging.typing.zeek_enum

Zeek enum data type.

alias of TypeVar(‘zeek_enum’)

zlogging.typing.zeek_interval

Zeek interval data type.

alias of TypeVar(‘zeek_interval’)

zlogging.typing.zeek_int

Zeek int data type.

alias of TypeVar(‘zeek_int’)

zlogging.typing.zeek_port

Zeek port data type.

alias of TypeVar(‘zeek_port’)

zlogging.typing.zeek_record = ~record

Zeek record data type.

Note

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.

zlogging.typing.zeek_set = ~set

Zeek set data type.

Note

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())
zlogging.typing.zeek_string

Zeek string data type.

alias of TypeVar(‘zeek_string’)

zlogging.typing.zeek_subnet

Zeek subnet data type.

alias of TypeVar(‘zeek_subnet’)

zlogging.typing.zeek_time

Zeek time data type.

alias of TypeVar(‘zeek_time’)

zlogging.typing.zeek_vector = ~vector

Zeek vector data type.

Note

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())

Bro Data Types

Use of bro is deprecated. Please use zeek instead.

zlogging.typing.bro_addr

Bro addr data type.

alias of TypeVar(‘bro_addr’)

zlogging.typing.bro_bool

Bro bool data type.

alias of TypeVar(‘bro_bool’)

zlogging.typing.bro_count

Bro count data type.

alias of TypeVar(‘bro_count’)

zlogging.typing.bro_double

Bro double data type.

alias of TypeVar(‘bro_double’)

zlogging.typing.bro_enum

Bro enum data type.

alias of TypeVar(‘bro_enum’)

zlogging.typing.bro_interval

Bro interval data type.

alias of TypeVar(‘bro_interval’)

zlogging.typing.bro_int

Bro int data type.

alias of TypeVar(‘bro_int’)

zlogging.typing.bro_port

Bro port data type.

alias of TypeVar(‘bro_port’)

zlogging.typing.bro_record = ~bro_record

Bro record data type.

See also

See zeek_record for more information.

zlogging.typing.bro_set = ~bro_set

Bro set data type.

See also

See zeek_set for more information.

zlogging.typing.bro_string

Bro string data type.

alias of TypeVar(‘bro_string’)

zlogging.typing.bro_subnet

Bro subnet data type.

alias of TypeVar(‘bro_subnet’)

zlogging.typing.bro_time

Bro time data type.

alias of TypeVar(‘bro_time’)

zlogging.typing.bro_vector = ~bro_vector

Bro vector data type.

See also

See zeek_vector for more information.