Safely loads plugin entry points, skipping failures and returning only successful ones.
# Source: https://github.com/HKUDS/DeepTutor | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works # Provided via justclaw.it.com; keep this notice with the code. """Load an entry-point group without letting one bad plugin take the app down. DeepTutor exposes two plugin groups — ``deeptutor.plugins`` for capabilities the registry can run, ``deeptutor.loop_capabilities`` for chat-loop capabilities — and both need the same plumbing: read the group, import each target, hand it to a group-specific coercer, and skip whatever fails with a warning naming the entry point. Only the coercer differs, so only the coercer lives at the call site. Third-party code runs at import time here, which is what an entry point is; the guarantee this module makes is narrow ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key