beat.web.common.utils module

Reusable help functions

beat.web.common.utils.validate_restructuredtext(value)[source]

Validates a piece of restructuredtext for strict conformance

beat.web.common.utils.ensure_html(text)[source]
beat.web.common.utils.ensure_string(data)[source]

Ensure that we have a str object from data which can be either a str in python 2 or a bytes in python 3

beat.web.common.utils.py3_cmp(a, b)[source]

cmp is not available anymore in Python 3. This method is implemetend as recommended in the documentation for this kind of use case. Based on:

beat.web.common.utils.annotate_full_name(query)[source]

Annotate a query with the asset full name so that it can be more easily filtered.