Skip to content

An API wrapper for Oppe written in Python

License

Notifications You must be signed in to change notification settings

kilobyteno/oppe-for-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9845a67 ยท May 16, 2024
May 16, 2024
May 16, 2024
May 16, 2024
Sep 16, 2023
Sep 8, 2023
Aug 26, 2023
May 16, 2024
Aug 26, 2023
Sep 16, 2023
May 16, 2024
Sep 16, 2023
May 16, 2024
Sep 17, 2023
May 16, 2024

Repository files navigation

oppe-for-python

codecov PyPI version Downloads License

An API wrapper for Oppe written in Python.

Installation

pip install oppe

Usage

Sending an event

from oppe import Oppe
from oppe.exceptions import EventRequestError

oppe = Oppe(api_token='insert-api-token-here', project_id="uuid-of-project")

try:
    oppe.event(
        channel_id="uuid-of-channel",
        title="user-registered",
        description="A new user has registered.",
        emoji="๐Ÿ‘‹",
        data={
            "user_id": 123,
        },
    )
except EventRequestError as e:
    # Handle error
    print(e)