How to use the rele.subscription.sub function in rele

To help you get started, we’ve selected a few rele examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mercadona / rele / tests / commands / test_showsubscriptions.py View on Github external
@sub(topic="photo-updated", filter_by=landscape_filter)
def sub_process_landscape_photos(data, **kwargs):
    return f'Received a photo of type {kwargs.get("type")}'
github mercadona / rele / tests / commands / test_showsubscriptions.py View on Github external
@sub(topic="some-fancy-topic")
def sub_fancy_stub(data, **kwargs):
    return data["id"]
github mercadona / rele / tests / commands / test_showsubscriptions.py View on Github external
@sub(topic="some-cool-topic", prefix="rele")
def sub_stub(data, **kwargs):
    return data["id"]
github mercadona / rele / tests / commands / test_showsubscriptions.py View on Github external
@sub(topic="published-time-type")
def sub_published_time_type(data, **kwargs):
    return f'{type(kwargs["published_at"])}'