Skip to main content

Base package for Remind plugins

Project description

remind-plugin-base

Base package for Remind plugins.

Plugin authors depend on this to create Remind integrations. Provides the BasePlugin ABC and Reminder model.

Usage

from pathlib import Path
from remind_plugin_base import BasePlugin, Reminder


class MyPlugin(BasePlugin):
    name = "my-plugin"
    display_name = "My Plugin"
    version = "0.1.0"

    def setup(self, config_dir: Path) -> None:
        # Interactive setup wizard
        pass

    def teardown(self, config_dir: Path) -> None:
        # Cleanup
        pass

    def is_configured(self, config_dir: Path) -> bool:
        # Check if configured
        return (config_dir / "config.json").exists()

    def status(self, config_dir: Path) -> str:
        # Status for `remind doctor`
        return "✓ Configured" if self.is_configured(config_dir) else "Not configured"

    def on_reminder_due(self, reminder: Reminder, config_dir: Path) -> None:
        # Called when a reminder is due
        print(f"Reminder due: {reminder.text}")

Declare your plugin in your package's pyproject.toml:

[project.entry-points."remind.plugins"]
my-plugin = "my_plugin_package:MyPlugin"

License

MIT

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

remind_plugin_base-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

remind_plugin_base-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file remind_plugin_base-0.1.0.tar.gz.

File metadata

  • Download URL: remind_plugin_base-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for remind_plugin_base-0.1.0.tar.gz
Algorithm Hash digest
SHA256 137cfddc4f919f417cd01e4ccb28b329b0f9e1a678e010a97281554cb60ae29a
MD5 0057991c1b72059a134db61910285ac7
BLAKE2b-256 3ad5fb87d4fb9f094eef128587b86a3539597d61fa592a0b3461b3261cd59038

See more details on using hashes here.

File details

Details for the file remind_plugin_base-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for remind_plugin_base-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 990e9908ccf77ab6aeef599ecf2b2fc70f0b258ffd9ac73ff3b88a1e8fa792d1
MD5 8251bd95e2bcfee79f6f6b9f14872801
BLAKE2b-256 355c6ddd9e2f0e6a8c65f3e422b14a617d2505a0915e8876dafd65c6b26662fd

See more details on using hashes here.

Supported by

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