finds.dev← search

// the find

mitsuhiko/pluginbase

★ 1,138 · Python · NOASSERTION · updated May 2021

A simple but flexible plugin system for Python.

PluginBase is a small Python library from Armin Ronacher (Flask, Jinja2, Click) that isolates plugin namespaces so multiple plugin sources don't collide. It's for application authors who want to let users drop Python files into a directory and have them loaded cleanly without polluting sys.modules.

The namespace isolation is the real idea here — each plugin source gets its own import namespace, so two apps can load plugins named 'utils' without stepping on each other. The API surface is tiny: three steps and you're done, which means there's almost nothing to learn wrong. It's a single .py file, so auditing it is trivial. Comes from a credible author who clearly understands Python's import machinery.

Dead since 2021 — Travis CI config, no pyproject.toml, setup.py only — this is a 2014-era project that never modernized. No plugin lifecycle management: no load order, no dependency declarations between plugins, no unload/reload hooks. If you need anything beyond 'put a .py file in a folder and import it', you're on your own. The Python importlib machinery it wraps has evolved significantly; at this point you could implement the core idea in 30 lines yourself without a dependency.

View on GitHub →

// want more like this?

Every week we dig through GitHub and send you a few repos picked for what you're working on, each with an honest take like this one. Free. See a real issue →

// similar repos

Search the finds →