This project aims to provide a wrapper for the Novu API.
Project description
Python Novu SDK
The Python Novu SDK and package provides a fluent and expressive interface for interacting with Novu's API and managing notifications.
Install
To install this package
# Via pip
pip install novu
# Via poetry
poetry add novu
Quick start
This package is a wrapper of all the resources offered by Novu, we will just start by triggering an event on Novu.
To do this, you will need to:
- Create your first notification template and keep in mind the identifier to trigger the template: https://docs.novu.co/overview/quick-start#create-a-notification-template
- Retrieve your API key from the Novu dashboard directly in the settings section: https://web.novu.co/settings
- Write code to trigger your first event:
from novu.api import EventApi
event_api = EventApi("https://api.novu.co/api/", "<NOVU_API_TOKEN>")
event_api.trigger(
name="<YOUR_TEMPLATE_NAME>",
recipients="<YOUR_SUBSCRIBER_ID>",
payload={}, # Your Novu payload goes here
)
This will trigger a notification to the subscribers.
Development
# install deps
poetry install
# pre-commit
poetry run pre-commit install --install-hook
poetry run pre-commit install --install-hooks --hook-type commit-msg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
novu-1.3.0.tar.gz
(26.2 kB
view details)
Built Distribution
novu-1.3.0-py3-none-any.whl
(43.4 kB
view details)
File details
Details for the file novu-1.3.0.tar.gz
.
File metadata
- Download URL: novu-1.3.0.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.16 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
41602ea7bcb97a31cdbf57dba741d91ae276af7478bc2259f03c4d94153f8253
|
|
MD5 |
6740d896381337faabbe1f01bfd2a364
|
|
BLAKE2b-256 |
99e78bebd527cf0520564bf3cd37c8fcba1d0b89f8008b7a2d4e542070512c5c
|
File details
Details for the file novu-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: novu-1.3.0-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.16 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
573a997edd3ccb878cf61406b70650506f0c78ab4013011c136a0a6efee50f17
|
|
MD5 |
3a8a757da68eac27a9f25e3c45450132
|
|
BLAKE2b-256 |
ab854eff1384420048185ee19673818007961ba8d69d49bc5597d82a0149f723
|