MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / _sanitize_plugin_key

Function _sanitize_plugin_key

apps/plugins/api_views.py:77–82  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

75
76
77def _sanitize_plugin_key(value: str) -> str:
78 base = os.path.basename(value or "")
79 base = base.replace(" ", "_").replace("-", "_").lower()
80 base = re.sub(r"[^a-z0-9_]", "_", base)
81 base = base.strip("._ ")
82 return base or "plugin"
83
84
85def _validate_fetch_url(url):

Callers 3

_install_plugin_from_zipFunction · 0.85
getMethod · 0.85
postMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected