Skip to main content

module utils

Global Variables

  • bytes_types
  • integer_types
  • text_types
  • string_types
  • units
  • MIN_WEI
  • MAX_WEI

function is_integer

is_integer(value: Any)bool

function is_bytes

is_bytes(value: Any)bool

function is_text

is_text(value: Any)bool

function is_string

is_string(value: Any)bool

function is_boolean

is_boolean(value: Any)bool

function is_dict

is_dict(obj: Any)bool

function is_list_like

is_list_like(obj: Any)bool

function is_list

is_list(obj: Any)bool

function is_tuple

is_tuple(obj: Any)bool

function is_null

is_null(obj: Any)bool

function is_number

is_number(obj: Any)bool

function from_wei

from_wei(number: int, unit: str) → Union[int, Decimal]

Takes a number of wei and converts it to any other ether unit.


function to_wei

to_wei(number: Union[int, float, str, Decimal], unit: str)int

Takes a number of a unit and converts it to wei.


function to_int

to_int(
primitive: Union[bytes, int, bool] = None,
hexstr: HexStr = None,
text: str = None
)int

Converts value to its integer representation. Values are converted this way: primitive: bytes, bytearrays: big-endian integer bool: True => 1, False => 0 hexstr: interpret hex as integer * text: interpret as string of digits, like '12' => 12


function decode_hex

decode_hex(value: str)bytes

function encode_hex

encode_hex(value: ~AnyStr) → HexStr

function is_0x_prefixed

is_0x_prefixed(value: str)bool

function remove_0x_prefix

remove_0x_prefix(value: HexStr) → HexStr

function add_0x_prefix

add_0x_prefix(value: HexStr) → HexStr

function is_hexstr

is_hexstr(value: Any)bool

function is_hex

is_hex(value: Any)bool

function docker_stream_logs

docker_stream_logs(container, timeout=30.0, from_latest=False)

Streams logs from a running Docker container.

Args:

  • `container` (container): Docker container object.
  • `timeout` (float, optional): Time to wait between log messages. Default to 30.0 seconds.
  • `from_latest` (bool, optional): Only fetch logs since the last log. Default to False.

Yields:

  • `str`: The log messages.

Raises:

  • `DockerException`: If the container is not running.
  • `StopIteration`: If no logs are received within the timeout period.

class denoms


This file was automatically generated via lazydocs.