Skip to main content

A plugin framework

Project description

yantra

yantra is a simple plugin manager/plugin discovery framework.

Usage

Let's assume you have a class called BaseReportPlugin which all report plugins derive from.

from yantra import PluginManager, PluginType
from reports import BaseReportPlugin

# Define the type
report_type = PluginType(name='report',
                         base_class=BaseReportPlugin',
                         path='/plugins/reports/')

# Instantiate the manager
plugin_manager = PluginManager([report_type])

# Fetch plugins
plugin_manager.get_plugins(report_type)

You can register multiple plugin types. An alternate way to register plugin types is as follows:

plugin_manager = PluginManager()
plugin_manager.register_plugin_type(foo_type)

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

yantra-0.7.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

yantra-0.7.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file yantra-0.7.1.tar.gz.

File metadata

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

File hashes

Hashes for yantra-0.7.1.tar.gz
Algorithm Hash digest
SHA256 b80b5b9cb56202c8d74ec3b264c8aa66641bfceb208e5cbf33219d34115a7925
MD5 0862e8ab6d89fe86ad70ebc8a115be57
BLAKE2b-256 8ca7b2b2593147de93cc74ce8867f8eadd0d38f10ae77ac335b50a437e83dcb4

See more details on using hashes here.

File details

Details for the file yantra-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: yantra-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yantra-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2774e3b409b38708f8d4058a532763c53991a288ad6e195f94fe35915da0f6f9
MD5 c61f8aa58dd4f988bc5de48dbd36ceae
BLAKE2b-256 e97d249d9ee4d747dbb2ad68bb7e20f9e23332f27a08749e0e8e45cb88886e1a

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