Introduce a utility function for accessing plugin configuration parameters #7065

Closed
opened 2025-12-29 19:48:29 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (Oct 3, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.4

Feature type

New functionality

Proposed functionality

Introduce a simple utility function that plugin authors can use to reference specific plugin configuration parameters. Such a solution might look like this:

from extras.plugins import get_plugin_config

myvar = get_plugin_config('plugin_name', 'myvar')

Use case

This proposal was prompted by #10346, which seeks to better document the intended method for referencing plugin configuration parameters (which is currently achieved by referencing settings.PLUGINS_CONFIG). This approach is offered as a more convenient mechanism for plugin authors.

Database changes

No response

External dependencies

No response

Originally created by @jeremystretch on GitHub (Oct 3, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.4 ### Feature type New functionality ### Proposed functionality Introduce a simple utility function that plugin authors can use to reference specific plugin configuration parameters. Such a solution might look like this: ```python from extras.plugins import get_plugin_config myvar = get_plugin_config('plugin_name', 'myvar') ``` ### Use case This proposal was prompted by #10346, which seeks to better document the intended method for referencing plugin configuration parameters (which is currently achieved by referencing `settings.PLUGINS_CONFIG`). This approach is offered as a more convenient mechanism for plugin authors. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: featuretopic: plugins labels 2025-12-29 19:48:29 +01:00
adam closed this issue 2025-12-29 19:48:30 +01:00
Author
Owner

@cyberndj commented on GitHub (Oct 3, 2022):

Would this mean we could change plugin entries in plugins.py through the web interface?

@cyberndj commented on GitHub (Oct 3, 2022): Would this mean we could change plugin entries in plugins.py through the web interface?
Author
Owner

@jeremystretch commented on GitHub (Oct 3, 2022):

Would this mean we could change plugin entries in plugins.py through the web interface?

No; it has nothing to do with manipulating installed plugins.

@jeremystretch commented on GitHub (Oct 3, 2022): > Would this mean we could change plugin entries in plugins.py through the web interface? No; it has nothing to do with manipulating installed plugins.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7065