lemur-plugin-utils 0.1.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: lemur-plugin-utils
3
+ Version: 0.1.0rc1
4
+ Summary: A plugin for Lemur that allows users to import existing CA certificates into the system.
5
+ Author: Philippe Desmarais
6
+ Author-email: Philippe Desmarais <philippe.desmarais4@gmail.com>
7
+ License-Expression: MIT
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Dist: lemur>=1.7.0
11
+ Requires-Dist: flask>=2.3.0
12
+ Requires-Python: >=3.10
13
+ Project-URL: Homepage, https://github.com/desmaraisp/lemur-plugins
14
+ Project-URL: Issues, https://github.com/desmaraisp/lemur-plugins/issues
15
+ Description-Content-Type: text/markdown
16
+
File without changes
@@ -0,0 +1,19 @@
1
+ from flask import current_app
2
+ from lemur.exceptions import InvalidConfiguration
3
+
4
+ def get_plugin_options(options):
5
+ plugin_options = options.get("plugin", {}).get("plugin_options")
6
+ if not plugin_options:
7
+ error = f"Invalid options for ca importer plugin: {options}"
8
+ current_app.logger.error(error)
9
+ raise InvalidConfiguration(error)
10
+ return plugin_options
11
+
12
+ def get_option(plugin_options, option_name) -> str:
13
+ for option in plugin_options:
14
+ if option.get("name") == option_name:
15
+ return option.get("value")
16
+
17
+ error = f"Invalid options for ca importer plugin: {option_name}"
18
+ current_app.logger.error(error)
19
+ raise InvalidConfiguration(error)
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["uv_build>=0.11.16,<0.12"]
3
+ build-backend = "uv_build"
4
+
5
+ [tool.uv.build-backend]
6
+ module-root = ""
7
+
8
+ [project]
9
+ name = "lemur-plugin-utils"
10
+ version = "0.1.0rc1"
11
+ authors = [
12
+ { name = "Philippe Desmarais", email = "philippe.desmarais4@gmail.com" },
13
+ ]
14
+ dependencies = [
15
+ "lemur>=1.7.0",
16
+ "flask>=2.3.0"
17
+ ]
18
+ description = "A plugin for Lemur that allows users to import existing CA certificates into the system."
19
+ readme = "README.md"
20
+ requires-python = ">=3.10"
21
+ classifiers = [
22
+ "Programming Language :: Python :: 3",
23
+ "Operating System :: OS Independent",
24
+ ]
25
+ license = "MIT"
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/desmaraisp/lemur-plugins"
29
+ Issues = "https://github.com/desmaraisp/lemur-plugins/issues"