{"id":21619,"library":"novu","title":"Novu Python SDK","description":"A Python wrapper for the Novu API, enabling notification infrastructure management. Current version 1.14.0, requires Python >=3.8,<4.0. Release cadence is irregular.","status":"active","version":"1.14.0","language":"python","source_language":"en","source_url":"https://github.com/novuhq/novu-python","tags":["notifications","novu","api-wrapper"],"install":[{"cmd":"pip install novu","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false}],"imports":[{"note":"Novu is in novu.api, not novu top-level","wrong":"from novu import Novu","symbol":"Novu","correct":"from novu.api import Novu"},{"note":"EventTrigger is in novu.api","wrong":"from novu import EventTrigger","symbol":"EventTrigger","correct":"from novu.api import EventTrigger"},{"note":"","wrong":null,"symbol":"Subscriber","correct":"from novu.api import Subscriber"}],"quickstart":{"code":"import os\nfrom novu.api import Novu, EventTrigger\n\nnovu = Novu(api_key=os.environ.get('NOVU_API_KEY', ''))\ntrigger = EventTrigger(\n    name='onboarding-welcome',\n    to={'subscriberId': 'subscriber-id', 'email': 'user@example.com'},\n    payload={'name': 'John'}\n)\nresponse = novu.trigger(trigger)\nprint(response.json())","lang":"python","description":"Initialize Novu client and trigger an event."},"warnings":[{"fix":"Use 'from novu.api import Novu' for v1+.","message":"Import path changed in v1.0: Novu moved from novu import Novu to novu.api import Novu.","severity":"breaking","affected_versions":"<1.0 vs >=1.0"},{"fix":"Use keyword argument 'subscriberId' when creating a Subscriber instance.","message":"Subscriber object creation requires 'subscriberId', not 'id'.","severity":"gotcha","affected_versions":"all"},{"fix":"Explicitly pass api_key=os.environ.get('NOVU_API_KEY').","message":"API key must be passed as string, not via environment variable autodiscovery; there is no support for .env files natively.","severity":"gotcha","affected_versions":"all"},{"fix":"Create a Novu instance and call .trigger() on it.","message":"Client-less trigger method is deprecated; always use Novu().trigger() now.","severity":"deprecated","affected_versions":">=1.10"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change to 'from novu.api import Novu'.","cause":"Importing from wrong module (novu vs novu.api).","error":"AttributeError: module 'novu' has no attribute 'Novu'"},{"fix":"Replace 'id' with 'subscriberId' in the Subscriber instantiation.","cause":"Subscriber constructor expects 'subscriberId' not 'id'.","error":"TypeError: __init__() got an unexpected keyword argument 'id'"},{"fix":"Set NOVU_API_KEY environment variable or pass it directly to Novu().","cause":"Invalid or missing API key.","error":"novu.exceptions.UnauthorizedException: 401 - Unauthorized"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}