Your first event

Connect the SDK and see a live event reach your handler.

By the end of this page you’ll have a running Python process connected to Nevo, an event hitting your handler, and — if the event is an email — a reply going back.

What you’ll have

A working handle(event) function that runs once per inbound event your project receives, whatever the source.

Install the SDK

pip install nevo-sdk

Requires Python 3.10+.

Write the handler

import asyncio, os
from nevo import Nevo

async def main():
    async with Nevo(token=os.environ["NEVO_API_KEY"]) as client:
        @client.on_event()
        async def handle(event):
            print(f"[{event.type}] {event.id}")
            if event.email:
                print("from:", event.email.from_, "|", event.email.subject)
            elif event.webhook:
                print(event.webhook.method, event.webhook.path)

        await client.run()

asyncio.run(main())

client.run() opens a connection to Nevo, streams events in, and reconnects silently on network blips. Your handler runs once per event.

Run it

export NEVO_API_KEY=nvo_live_...
python handler.py

You’ll see:

connected to nevo (project=11111111-…, conn=44444444-…)

Trigger an event

Two easy options:

  1. Send a test webhook. From the dashboard, open your webhook channel and click Send test event — a synthetic webhook.received lands in your process within a second.
  2. Forward a real email. Forward any message to <channel-id>@in.nevo.sh and an email.received event appears.

Either way, your handler prints the event id, the type, and the details of whatever arrived. Every event also shows up in the dashboard under Projects → your project → Events, where you can inspect the raw payload, delivery history, and any replies.

Reply (email only, for now)

@client.on_event()
async def handle(event):
    if event.type == "email.received":
        await event.reply(
            text=f"Got your message: '{event.email.subject}'. We're on it."
        )

The reply lands in the original sender’s inbox, threaded into the same conversation. See Python SDK: replies for what event.reply() can take.

From here, handle() is where the real work happens — call your existing service, enqueue a job, route to an LLM, whatever. The inbound side is done.

Next