MagicBell-Python SDK
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
Requirements
Python 3.8+
Installation
Poetry
poetry add magicbell
Then import the package:
import magicbell
Pip
pip install magicbell
Then import the package:
import magicbell
Getting Started
import magicbell
from magicbell.configuration import Configuration
config = Configuration(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)
async with magicbell.MagicBell(config) as mb:
# Send a notification
await mb.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
from magicbell.configuration import Configuration
# Create a configuration object with the required parameters
config = 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"
from magicbell.configuration import Configuration
config = Configuration()
Examples
For more examples see the examples directory.
Contributing
See CONTRIBUTING.md.
Open sourced with ❤️ by Noteable for the community.
Metadata
Release files for magicbell 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magicbell-1.1.1.tar.gz | 12.4 kB | Without provenance | Details for magicbell-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magicbell-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for magicbell-1.1.1-py3-none-any.whl |
Total release size: 28.9 kB
Release files / magicbell-1.1.1.tar.gz
| Download URL | magicbell-1.1.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
994078ecba9a0aadc826e35c2d571966a940c784350c80fd9bb84f279e384a0f
|
|
BLAKE2b-256 checksum How to use checksums |
0f8c846f5822b79afa952fdb5d9f3a3a30b1334251d4ddc7ecabb294997f40bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.2 Linux/5.15.0-1014-azure
|
Release files / magicbell-1.1.1-py3-none-any.whl
| Download URL | magicbell-1.1.1-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42cc73329b939830e8f0053cd2b4b8de082ec8df1a67b2b7501ee2d51cc2c696
|
|
BLAKE2b-256 checksum How to use checksums |
febff103fad848a8b897b3d335db9c02c842e6d01ae8ddc379866672fc8681d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.2 Linux/5.15.0-1014-azure
|
Security for magicbell 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.