Coder Social home page Coder Social logo

razcodev / novu-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from novuhq/novu-python

0.0 0.0 0.0 194 KB

Python SDK for Novu - The open-source notification infrastructure for engineers. ๐Ÿš€

Home Page: https://novu-python.readthedocs.io

License: MIT License

JavaScript 0.10% Python 99.47% Makefile 0.43%

novu-python's Introduction

Python Novu SDK

PyPI Tests Status codecov pre-commit Code style: black Checked with mypy PyPI - Python Version PyPI - License semantic-release: angular


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:

  1. 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
  2. Retrieve your API key from the Novu dashboard directly in the settings section: https://web.novu.co/settings
  3. 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

novu-python's People

Contributors

ryshu avatar semantic-release-bot avatar simon-retsch avatar unicodeveloper avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.