Sign inSign up

ajeetraina777/sbx-novu-kits:eu

Manifest digest

sha256:3e344f70380d402ec0684614646a84d16aa883599d17ed60fd1490bd59fe0e08

Last pushed

about 1 month by ajeetraina777

Type

Sandbox Kit

Manifest digest

sha256:3e344f70380d402ec0684614646a84d16aa883599d17ed60fd1490bd59fe0e08

yaml
schemaVersion: "2"
kind: mixin
name: novu
version: 1.0.0
displayName: Novu (Cloud EU)
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 EU API (eu.api.novu.co) for EU data residency. The agent can trigger multi-channel workflows 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 EU)

        The official Novu Python SDK (`novu-py`) is installed and wired to the Novu
        Cloud **EU** API at `https://eu.api.novu.co` (env `NOVU_API_URL`) for EU data
        residency. Your key must belong to an EU-region Novu account - a US key will
        not authenticate here.

        The secret key is **proxy-managed**: `NOVU_SECRET_KEY` holds the literal
        `proxy-managed` sentinel, and the sbx proxy swaps in the real key (as
        `Authorization: ApiKey <key>`) only on requests to `eu.api.novu.co`.

            import os, novu_py
            from novu_py import Novu

            with Novu(
                server_url=os.environ["NOVU_API_URL"],   # https://eu.api.novu.co
                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/` - they read `NOVU_API_URL`, so they
        target EU automatically.
permissions:
    network:
        allow:
            - pypi.org
            - files.pythonhosted.org
            - eu.api.novu.co
credentials:
    - service: novu
      description: Novu secret (API) key from an EU-region Novu account (Settings -> API Keys)
      required: true
      apiKey:
        name: NOVU_SECRET_KEY
        proxyManaged: true
        inject:
            - domain: eu.api.novu.co
              header: Authorization
              format: ApiKey %s
environment:
    variables:
        NO_PROXY: localhost,127.0.0.1,host.docker.internal
        NOVU_API_URL: https://eu.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