Creating a sending service for an Event Pub/Sub using Nameko and Python

I did figure out a way to do what I needed.

from nameko.standalone.events import event_dispatcher

import eventlet

eventlet.monkey_patch()

AMQP_URI = 'pyamqp://guest:guest@broker'

config = {

    'AMQP_URI': AMQP_URI  # e.g. "pyamqp://guest:guest@localhost"

}

def send_current_time(time):

    event_dispatcher(config)('event_dispatch', 'reading_queued', f'The current time is: {time}')

I wish the docs were a little clearer for putting together stand-alone services. Luckily I came across this thread that gave me the answer: https://discourse.nameko.io/t/dependencyprovider-that-directly-publishes-events/497