Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@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")}'
@sub(topic="some-fancy-topic")
def sub_fancy_stub(data, **kwargs):
return data["id"]
@sub(topic="some-cool-topic", prefix="rele")
def sub_stub(data, **kwargs):
return data["id"]
@sub(topic="published-time-type")
def sub_published_time_type(data, **kwargs):
return f'{type(kwargs["published_at"])}'