Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Repository files navigation

MagicBell-Python SDK

⚠️ We no longer maintain this SDK.

magicbell logo purple

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.

CIcodecov code coveragePyPI - LicensePyPI - Python VersionPyPICode style: black


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

Requirements

Python 3.8+

Installation

Poetry

poetry add magicbell

Then import the package:

importmagicbell

Pip

pip install magicbell

Then import the package:

importmagicbell

Getting Started

importmagicbellfrommagicbell.configurationimportConfigurationconfig=Configuration(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)
asyncwithmagicbell.MagicBell(config) asmb:
# Send a notificationawaitmb.realtime.create_notification(
magicbell.WrappedNotification(
notification=magicbell.Notification(
title="My first notification from python!",
recipients=[magicbell.Recipient(email="dan@example.com")],
)
)
)

Authentication

Most API calls require your MagicBell project API Key and API Secret. Some API calls (i.e. projects) require your MagicBell user JWT (enterprise only).

See the MagicBell API documentation for more information.

Configuration

Configuration can be done explicitly using the magicbell.Configuration class, or implicitly by setting environment variables with the MAGICBELL_ prefix.

Explicit Configuration

frommagicbell.configurationimportConfiguration# Create a configuration object with the required parametersconfig=Configuration(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)

Implicit Configuration

export MAGICBELL_API_KEY="YOUR_API_KEY"export MAGICBELL_API_SECRET="YOUR_API_SECRET"
frommagicbell.configurationimportConfigurationconfig=Configuration()

Examples

For more examples see the examples directory.

Contributing

See CONTRIBUTING.md.


Open sourced with ❤️ by Noteable for the community.

Boost Data Collaboration with Notebooks

About

Unofficial Python SDK for MagicBell

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages