parameter-toolkit 0.1.0__tar.gz → 0.1.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: parameter-toolkit
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A python library to interact with inspects Parameters objects.
5
5
  Requires-Python: >=3.14
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "parameter-toolkit"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "A python library to interact with inspects Parameters objects."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
@@ -76,7 +76,8 @@ class ParameterConvertor:
76
76
 
77
77
  class ParameterExtractor:
78
78
  """ Provides Generator to get Parameters of a Function or Parameters Literal"""
79
-
79
+
80
+ @staticmethod
80
81
  def extractPara(func:Callable) -> Generator[Parameter,None,int]:
81
82
  """Iter thorugh signature and yield its parameters.
82
83
  **yields:** `<inspect.Parameter>`
@@ -87,15 +88,18 @@ class ParameterExtractor:
87
88
  yield parameter
88
89
  return paraLen
89
90
 
91
+ @staticmethod
90
92
  def getPMList(func:function) -> list[Parameter]:
91
93
  """Returns a `list` of `Parameter` objects. """
92
94
  return [pm for pm in signature(func).parameters.values()]
93
95
 
96
+ @staticmethod
94
97
  def getPMDict(func:function) -> dict[str,Parameter]:
95
98
  return signature(func).parameters
96
99
 
97
100
  class ParameterMapper:
98
101
  """Provides Mapping shortcut for partial(postionals, keywordsargs)."""
99
102
 
103
+ @staticmethod
100
104
  def mapFunc(func, positinals:Iterable, keywords:dict) ->partial:
101
105
  return partial(func, *positinals, **keywords)