Skip to main content
pyscovery is a Python plugin loader that will search for classes based from a
list of modules and optionally use the file system to recurse into packages.

This is different from pkg_resources and friends since it doesn't require you
to add every module that might have packages, it will discover it for you.

I wrote this because none of the existing solutions fit my need of being able
to logically group similar plugins in the filesystem.

Say you have the following structure in your project:

module/
__init__.py
plugin.py
plugins/
__init__.py
plugin1/
__init__.py
plugin2/
__init__.py
plugin3.py

With pyscovery, the following code will find plugins 1, 2, and 3 for you:

import pyscovery

from plugin import Plugin

pyscovery.add_module('plugins')
for plugin in pyscovery.find(Plugin, True, False):
print plugin

Recursion in the filesystem is off by default, since that's the way people are
used to. If there is enough demand, I will make it the default.

If you want to create instances of all the classes found instead of just
getting the class it self, you can use the following:

for plugin in pyscovery.find(Plugin, True, True):
print plugin

Metadata

Release files for pyscovery 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyscovery 1.2
File Size Uploaded Provenance Actions
pyscovery-1.2.tar.gz 3.5 kB Without provenance Details for pyscovery-1.2.tar.gz

Release files / pyscovery-1.2.tar.gz

Download URL pyscovery-1.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
14362aa054b51e6af87436418f13dd5acb4e077b89e1b11630c984682cfcd312
BLAKE2b-256 checksum
How to use checksums
99e4188c9394482466d7efb4de71897b6f00a3d52813e3be94ff4b8ddddcb8bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyscovery 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page