This SDK provides convenient access to the MagicBell REST API from applications written in Python. It includes helpers for creating notifications, managing users, managing projects, and executing GraphQL.
This is an unofficial Python SDK for MagicBell open sourced with ❤️ by Noteable, a collaborative notebook platform that enables teams to use and visualize data, together.
Install | Getting Started | Examples | License | Code of Conduct | Contributing
Python 3.8+
poetry add belfry_magicbellThen import the package:
import belfry_magicbellpip install belfry_magicbellThen import the package:
import belfry_magicbellimport belfry_magicbell
from belfry_magicbell.configuration import Configuration
config = Configuration(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)
async with belfry_magicbell.MagicBell(config) as mb:
# Send a notification
await mb.realtime.create_notification(
belfry_magicbell.WrappedNotification(
notification=belfry_magicbell.Notification(
title="My first notification from python!",
recipients=[belfry_magicbell.Recipient(email="dan@example.com")],
)
)
)Most API calls require your belfry_magicbell project API Key and API Secret. Some API calls (i.e. projects) require your belfry_magicbell user JWT (enterprise only).
See the MagicBell API documentation for more information.
Configuration can be done explicitly using the belfry_magicbell.Configuration class,
or implicitly by setting environment variables with the MAGICBELL_ prefix.
from belfry_magicbell.configuration import Configuration
# Create a configuration object with the required parameters
config = Configuration(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)export MAGICBELL_API_KEY="YOUR_API_KEY"
export MAGICBELL_API_SECRET="YOUR_API_SECRET"from belfry_magicbell.configuration import Configuration
config = Configuration()For more examples see the examples directory.
See CONTRIBUTING.md.
Open sourced with ❤️ by Noteable for the community.

