Fork of the unofficial Python SDK for MagicBell
Project description
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 belfry_magicbell
Then import the package:
import belfry_magicbell
Pip
pip install belfry_magicbell
Then import the package:
import belfry_magicbell
Getting Started
import 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")],
)
)
)
Authentication
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
Configuration can be done explicitly using the belfry_magicbell.Configuration class,
or implicitly by setting environment variables with the MAGICBELL_ prefix.
Explicit Configuration
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",
)
Implicit Configuration
export MAGICBELL_API_KEY="YOUR_API_KEY"
export MAGICBELL_API_SECRET="YOUR_API_SECRET"
from belfry_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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file belfry_magicbell-2.3.4.tar.gz.
File metadata
- Download URL: belfry_magicbell-2.3.4.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.11.0 Linux/5.15.0-1078-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d21a7781fa7be0c84caafa588e8c7f7092ff3a4b9fd2b414221ebe380d01a60a
|
|
| MD5 |
21e64f99150dbdb5b110fd80f45534ea
|
|
| BLAKE2b-256 |
077af87ac751035a2a577988e232f3af5aff959df78630a89fd42b21ead99a69
|
File details
Details for the file belfry_magicbell-2.3.4-py3-none-any.whl.
File metadata
- Download URL: belfry_magicbell-2.3.4-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.11.0 Linux/5.15.0-1078-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ebbedee3025a0836b7b6ef013d462e92d0bc1de73cb7602360af8a7eee34fa3
|
|
| MD5 |
55530a519ba9629f1b307f7255ab93c3
|
|
| BLAKE2b-256 |
e2c4249a4d665f9056a25c2c2e75d3995f1460b04adf44a9c52400c5eb6fd15b
|