sha256:699cc78bc5cf497f50adc0b14bc980f5acaf666051ea884d33a0ee37e9b89b2b
Last pushed
about 1 month by ajeetraina777
Type
Sandbox Kit
Manifest digest
sha256:699cc78bc5cf497f50adc0b14bc980f5acaf666051ea884d33a0ee37e9b89b2b
schemaVersion: "2"
kind: mixin
name: novu
version: 1.0.0
displayName: Novu (Cloud US)
description: 'Adds Novu - the open-source notification infrastructure - to any agent: the novu-py SDK plus a proxy-managed secret key wired to the Novu Cloud US API (api.novu.co). The agent can trigger multi-channel workflows (email, SMS, push, chat, in-app) without the key ever entering the sandbox. Store it once with: sbx secret set novu.'
sourceURL: https://github.com/ajeetraina/sbx-kits-novu
licenses:
- Apache-2.0
agentInstructions:
content: |
## Novu - notification infrastructure (Cloud US)
The official Novu Python SDK (`novu-py`) is installed and wired to the Novu
Cloud **US** API at `https://api.novu.co` (env `NOVU_API_URL`). Novu triggers
**workflows** that fan out to channels - email, SMS, push, chat, and in-app.
The secret key is **proxy-managed**: `NOVU_SECRET_KEY` holds the literal
`proxy-managed` sentinel inside the sandbox, and the sbx proxy swaps in the
real key (as `Authorization: ApiKey <key>`) only on requests to `api.novu.co`.
Pass the sentinel straight through to the SDK.
import os, novu_py
from novu_py import Novu
with Novu(
server_url=os.environ["NOVU_API_URL"],
secret_key=os.environ["NOVU_SECRET_KEY"],
) as novu:
novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
workflow_id="welcome-email",
to="subscriber_123",
payload={"name": "Ada"},
))
Runnable demos live under `~/runbooks/` - `notify.py`, `subscribers.py`,
and `healthcheck.py`.
permissions:
network:
allow:
- pypi.org
- files.pythonhosted.org
- api.novu.co
credentials:
- service: novu
description: Novu secret (API) key from Settings -> API Keys in the Novu dashboard
required: true
apiKey:
name: NOVU_SECRET_KEY
proxyManaged: true
inject:
- domain: api.novu.co
header: Authorization
format: ApiKey %s
environment:
variables:
NO_PROXY: localhost,127.0.0.1,host.docker.internal
NOVU_API_URL: https://api.novu.co
no_proxy: localhost,127.0.0.1,host.docker.internal
setup:
install:
- command: pip install --break-system-packages 'novu-py==3.19.0' click
user: "1000"
description: Install the official Novu Python SDK (novu-py) plus click for the runbooks