Introducing django-plugin-system — a modular plugin registry for Django

Hi everyone :waving_hand:
I’ve been working on a small open-source package that brings a Drupal-style plugin architecture (hope you know about it) to Django, and I’d love to share it with the community.

What it does

django-plugin-system lets you:

  • Define an interface (abstract base class)

  • Register multiple plugin implementations

  • Manage them in Django Admin

  • Select or swap them at runtime

  • Optionally let users choose their favorite plugins (e.g., notification channels)

It’s ideal for cases like:

  • Multiple OTP or SMS providers (with automatic fallback)

  • Multi-channel notifications (Email, SMS, Push)

  • Extensible payment or AI backends

  • Any scenario where you want pluggable behavior without hardcoding

Example

Define an interface:

class AbstractNotifier(ABC):
    @abstractmethod
    def send(self, user, message): ...

Register it as a plugin type, then register implementations like EmailNotifier, SmsNotifier, etc.
From your app, simply do:

notifier = get_plugin_instance("notifier", "apps.notifications")
notifier.send(user, "Hello from Django!")

No imports, no conditionals — the active plugin is chosen dynamically from the database.

Advanced features

  • Admin panel to enable/disable and reorder plugins

  • Automatic DB sync via python manage.py pluginsync

  • Caching with auto-invalidation on changes

  • Optional user preferences (UserNotifyPref) — so users can subscribe to multiple plugins (Email + Push)

  • Failover logic for multi-provider systems (e.g., auto-disable an OTP provider when it runs out of credit)

Roadmap

The next milestone adds configurable multi-instance plugins, inspired by Drupal:

A single plugin class will support multiple instances with different configurations (e.g., “Marketing SMS” vs “Transactional SMS”).

This evolution will make per-tenant or per-project configuration much easier.

Links


If you’re working on extensible Django projects — or you’ve missed how flexible Drupal plugins used to be — I’d really love your feedback or collaboration ideas!