Skip to main content

A simple Mopidy extension that sends webhook notifications to a remote URL.

Project description

Latest PyPI version Number of PyPI downloads Github Actions CI build status

Mopidy-Webhooks is a frontend extension for Mopidy that sends webhook requests (regular JSON over HTTP POST requests) to a remote server. Mopidy-Webhooks sends a webhook any time Mopidy core triggers an event, and also periodically sends player status updates to the remote server.

Installation

Install by running:

pip install Mopidy-Webhooks

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Webhooks to your Mopidy configuration file:

[webhooks]
webhook_url = http://localhost:8080/api/webhooks/ ; required
api_key = my-api-key                              ; optional
api_key_header_name = X-MOPIDY-WEBHOOKS-API-KEY   ; optional
status_update_interval = 1000                     ; optional

webhook_url should be a URL (accessible to the Mopidy server). The provided URL must accept HTTP POST requests, the body of which will contain JSON data. Requests will contain either periodic status updates (currently active track, playback state and time position) or JSON serialised event data emitted by Mopidy core.

api_key and api_key_header_name must both be specified together for the header to be sent.

status_update_interval controls the interval between the sending of status update webhooks (in milliseconds). Set to 0 to disable the sending of periodic status updates. If you want continuous status updates, just use a very very small value.

Project resources

Project details


Download files

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

Source Distribution

Mopidy-Webhooks-1.0.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

Mopidy_Webhooks-1.0.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file Mopidy-Webhooks-1.0.1.tar.gz.

File metadata

  • Download URL: Mopidy-Webhooks-1.0.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for Mopidy-Webhooks-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d79d7bf628ba0bb7f3d3c5c0f4277e234084e2c8015813e006a9e236369a06d7
MD5 ec1a8abd1588ab6947798202e2e6e586
BLAKE2b-256 bbd78fe73d5f84789b015910019e6f4ae9c2939fec96ab98889b9a81b7938655

See more details on using hashes here.

File details

Details for the file Mopidy_Webhooks-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: Mopidy_Webhooks-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for Mopidy_Webhooks-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33ca115583a7933fb7b76a05daf6e3a0559f5a8ca966ba5fd8b033c575888e1c
MD5 c48059eb9b4fd69a96ac76fff0c757fd
BLAKE2b-256 426452afdaab9bac2266db7df62789c304110eb754b7d67322e7e92469c37c23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page