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

**URL:** <https://discourse.nameko.io/t/creating-a-sending-service-for-an-event-pub-sub-using-nameko-and-python/673>\
**Category:** googlegroup\
**Created:** [February 17, 2021, 10:03pm UTC](https://discourse.nameko.io/t/creating-a-sending-service-for-an-event-pub-sub-using-nameko-and-python/673 "2021-02-17T22:03:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![georgeoffley](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.nameko.io/georgeoffley/32/137_2.png) [@georgeoffley](https://discourse.nameko.io/u/georgeoffley)\
**Post date:** [February 22, 2021, 6:21pm UTC](https://discourse.nameko.io/t/creating-a-sending-service-for-an-event-pub-sub-using-nameko-and-python/673/2 "2021-02-22T18:21:46Z")

</div>

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](https://discourse.nameko.io/t/dependencyprovider-that-directly-publishes-events/497)

---

_[View the full topic](https://discourse.nameko.io/t/creating-a-sending-service-for-an-event-pub-sub-using-nameko-and-python/673)._
