medcat.plugins.downloadable
Protocol definitions for plugin installation backends.
Classes:
-
CredentialProvider–Protocol for providing credentials for private repositories.
-
PluginInstallSpec–Specification for installing a plugin.
-
PluginInstaller–Protocol for plugin installation backends.
-
PluginSourceSpec–Where and how to obtain a plugin.
CredentialProvider
Bases: Protocol
Protocol for providing credentials for private repositories.
Methods:
-
get_credentials–Get credentials for a given source.
get_credentials
Get credentials for a given source.
Parameters:
-
(sourcestr) –The source URL or identifier
Returns:
Source code in medcat-v2/medcat/plugins/downloadable.py
119 120 121 122 123 124 125 126 127 128 129 | |
PluginInstallSpec
Bases: BaseModel
Specification for installing a plugin.
Methods:
-
to_pip_spec–Convert to pip-installable spec.
Attributes:
-
name(str) – -
source_spec(PluginSourceSpec) – -
version_spec(str) –
to_pip_spec
to_pip_spec() -> str
Convert to pip-installable spec.
Source code in medcat-v2/medcat/plugins/downloadable.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
PluginInstaller
Bases: Protocol
Protocol for plugin installation backends.
Methods:
-
get_name–Get the name of this installer (e.g., 'pip', 'uv').
-
install–Install a plugin.
-
is_available–Check if this installer is available in the environment.
get_name
get_name() -> str
Get the name of this installer (e.g., 'pip', 'uv').
Source code in medcat-v2/medcat/plugins/downloadable.py
111 112 113 | |
install
install(spec: PluginInstallSpec, dry_run: bool = False) -> bool
Install a plugin.
Parameters:
-
(specPluginInstallSpec) –Plugin installation specification
-
(dry_runbool, default:False) –If True, only check what would be installed
Returns:
-
bool–True if successful, False otherwise
Source code in medcat-v2/medcat/plugins/downloadable.py
94 95 96 97 98 99 100 101 102 103 104 105 | |
is_available
is_available() -> bool
Check if this installer is available in the environment.
Source code in medcat-v2/medcat/plugins/downloadable.py
107 108 109 | |