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:
- Send a test webhook. From the dashboard, open your webhook channel and click Send test event — a synthetic
webhook.receivedlands in your process within a second. - Forward a real email. Forward any message to
<channel-id>@in.nevo.shand anemail.receivedevent 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
- Events — the
Eventshape in full. - Python SDK: events — all the accessors and typed data blocks.
- Python SDK: replies — sending responses.