Skip to main content

magicbell-python-sdk

magicbell logo purple

An unofficial Python SDK for MagicBell.

Install | Getting Started | Examples | License | Code of Conduct | Contributing

  • API Version: 1.0
  • Package Version: 1.0.0

Requirements

Python 3.8+

Installation & Usage

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.

boost data collaboration with notebooks

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magicbell-1.0.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magicbell-1.0.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file magicbell-1.0.0.tar.gz.

File metadata

  • Download URL: magicbell-1.0.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1031-azure

File hashes

Hashes for magicbell-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f6695fd3357fa65a23d81000705796af4c33ebff265d4f3c7cdc6c71f71c7927
MD5 2985e093abf7dbbb2d8c342fb7bed984
BLAKE2b-256 19f2f826094b365eadc40ebb5b7c96f291b8466122a446b0503c7a34032e54d8

See more details on using hashes here.

File details

Details for the file magicbell-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: magicbell-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1031-azure

File hashes

Hashes for magicbell-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34c156e0e99d2211355b1c5d3aca7e8ed921143267ca956d23e6aba335673942
MD5 9818c94149945cc870082e44cc0b6acb
BLAKE2b-256 906c12db3da2c2840e021709a5f62c051846298f20c191abb3b59074bf874874

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.1

2 files

1.1.0

2 files

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page