orionis 0.431.0__py3-none-any.whl → 0.434.0__py3-none-any.whl

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.
Files changed (82) hide show
  1. orionis/app.py +17 -0
  2. orionis/console/commands/version.py +2 -2
  3. orionis/console/core/reactor.py +1 -1
  4. orionis/foundation/config/roots/paths.py +2 -2
  5. orionis/metadata/framework.py +38 -65
  6. orionis/metadata/package.py +280 -54
  7. orionis/support/entities/base.py +18 -37
  8. orionis/support/facades/console.py +3 -9
  9. orionis/support/facades/dumper.py +3 -9
  10. orionis/support/facades/logger.py +3 -9
  11. orionis/support/facades/path_resolver.py +3 -10
  12. orionis/support/facades/progress_bar.py +3 -10
  13. orionis/support/facades/testing.py +4 -10
  14. orionis/support/facades/workers.py +4 -9
  15. orionis/support/formatter/exceptions/contracts/parser.py +10 -7
  16. orionis/support/formatter/exceptions/parser.py +28 -26
  17. orionis/support/formatter/serializer.py +12 -5
  18. orionis/support/patterns/singleton/meta.py +17 -21
  19. orionis/support/standard/contracts/std.py +25 -24
  20. orionis/support/standard/exceptions/value.py +2 -2
  21. orionis/support/standard/std.py +26 -24
  22. orionis/support/wrapper/dot_dict.py +16 -51
  23. orionis/test/cases/asynchronous.py +17 -81
  24. orionis/test/cases/synchronous.py +17 -73
  25. orionis/test/contracts/dumper.py +17 -21
  26. orionis/test/contracts/kernel.py +5 -12
  27. orionis/test/contracts/logs.py +16 -21
  28. orionis/test/contracts/printer.py +70 -8
  29. orionis/test/contracts/render.py +7 -13
  30. orionis/test/contracts/test_result.py +58 -27
  31. orionis/test/contracts/unit_test.py +18 -18
  32. orionis/test/core/unit_test.py +162 -519
  33. orionis/test/entities/result.py +49 -21
  34. orionis/test/enums/status.py +11 -17
  35. orionis/test/exceptions/config.py +4 -8
  36. orionis/test/exceptions/failure.py +2 -18
  37. orionis/test/exceptions/persistence.py +4 -8
  38. orionis/test/exceptions/runtime.py +4 -8
  39. orionis/test/exceptions/value.py +5 -13
  40. orionis/test/kernel.py +14 -42
  41. orionis/test/output/dumper.py +21 -43
  42. orionis/test/output/printer.py +6 -146
  43. orionis/test/records/logs.py +57 -121
  44. orionis/test/validators/base_path.py +8 -6
  45. orionis/test/validators/execution_mode.py +2 -3
  46. orionis/test/validators/fail_fast.py +4 -8
  47. orionis/test/validators/folder_path.py +5 -7
  48. orionis/test/validators/module_name.py +3 -3
  49. orionis/test/validators/name_pattern.py +4 -9
  50. orionis/test/validators/pattern.py +4 -9
  51. orionis/test/validators/persistent.py +4 -14
  52. orionis/test/validators/persistent_driver.py +7 -12
  53. orionis/test/validators/print_result.py +4 -9
  54. orionis/test/validators/tags.py +6 -7
  55. orionis/test/validators/throw_exception.py +7 -14
  56. orionis/test/validators/verbosity.py +15 -5
  57. orionis/test/validators/web_report.py +6 -10
  58. orionis/test/validators/workers.py +9 -4
  59. orionis/test/view/render.py +9 -26
  60. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/METADATA +1 -1
  61. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/RECORD +82 -81
  62. tests/metadata/test_metadata_framework.py +64 -90
  63. tests/metadata/test_metadata_package.py +31 -31
  64. tests/support/entities/mock_dataclass.py +16 -10
  65. tests/support/entities/test_base.py +6 -14
  66. tests/support/patterns/singleton/test_patterns_singleton.py +7 -8
  67. tests/support/standard/test_services_std.py +113 -37
  68. tests/support/wrapper/test_services_wrapper_docdict.py +25 -40
  69. tests/testing/cases/test_testing_asynchronous.py +14 -14
  70. tests/testing/cases/test_testing_synchronous.py +12 -14
  71. tests/testing/entities/test_testing_result.py +12 -51
  72. tests/testing/enums/test_testing_status.py +8 -13
  73. tests/testing/output/test_testing_dumper.py +3 -6
  74. tests/testing/output/test_testing_printer.py +5 -5
  75. tests/testing/records/test_testing_records.py +16 -26
  76. tests/testing/test_testing_unit.py +8 -94
  77. tests/testing/validators/test_testing_validators.py +55 -112
  78. tests/testing/view/test_render.py +4 -5
  79. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/WHEEL +0 -0
  80. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/licenses/LICENCE +0 -0
  81. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/top_level.txt +0 -0
  82. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/zip-safe +0 -0
orionis/app.py ADDED
@@ -0,0 +1,17 @@
1
+ from orionis.foundation.application import Application, IApplication
2
+
3
+ def Orionis() -> IApplication:
4
+ """
5
+ Initialize and return the main Orionis application instance.
6
+
7
+ Initializes the core application object that implements the `IApplication` interface.
8
+ This function acts as the entry point for creating and accessing the main application instance.
9
+
10
+ Returns
11
+ -------
12
+ IApplication
13
+ The initialized application instance implementing the `IApplication` interface.
14
+ """
15
+
16
+ # Instantiate and return the main application object
17
+ return Application()
@@ -9,9 +9,9 @@ class VersionCommand(BaseCommand):
9
9
  This command prints the version number of the framework in use.
10
10
  """
11
11
 
12
- signature = "version"
12
+ signature: str = "version"
13
13
 
14
- description = "Prints the version of the framework in use."
14
+ description: str = "Prints the version of the framework in use."
15
15
 
16
16
  def handle(self) -> None:
17
17
  """
@@ -1,4 +1,4 @@
1
1
  class Reactor:
2
2
 
3
3
  def __init__(self):
4
- self._reactors = {}
4
+ self.__reactors = {}
@@ -7,10 +7,10 @@ from orionis.support.entities.base import BaseEntity
7
7
  class Paths(BaseEntity):
8
8
 
9
9
  console_scheduler: str = field(
10
- default_factory = lambda: str((Path.cwd() / 'app' / 'console' / 'kernel.py').resolve()),
10
+ default_factory = lambda: str((Path.cwd() / 'app' / 'console' / 'scheduler.py').resolve()),
11
11
  metadata = {
12
12
  'description': 'Path to the console scheduler (Kernel) file.',
13
- 'default': lambda: str((Path.cwd() / 'app' / 'console' / 'kernel.py').resolve())
13
+ 'default': lambda: str((Path.cwd() / 'app' / 'console' / 'scheduler.py').resolve())
14
14
  }
15
15
  )
16
16
 
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.431.0"
8
+ VERSION = "0.434.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -42,38 +42,24 @@ PYTHON_REQUIRES = ">=3.12"
42
42
  #---------------------------------------------------------------------------
43
43
  # List of classifiers that provide metadata about the project for PyPI and other tools.
44
44
  CLASSIFIERS = [
45
- ("Development Status", "3 - Alpha"),
46
- ("Environment", "Web Environment"),
47
- ("Intended Audience", "Developers"),
48
- ("License", "OSI Approved", "MIT License"),
49
- ("Operating System", "OS Independent"),
50
- ("Programming Language", "Python"),
51
- ("Programming Language", "Python", "3"),
52
- ("Programming Language", "Python", "3", "Only"),
53
- ("Programming Language", "Python", "3.12"),
54
- ("Programming Language", "Python", "3.13"),
55
- ("Typing", "Typed"),
56
- ("Topic", "Internet", "WWW/HTTP"),
57
- ("Topic", "Internet", "WWW/HTTP", "Dynamic Content"),
58
- ("Topic", "Internet", "WWW/HTTP", "WSGI"),
59
- ("Topic", "Software Development", "Libraries", "Application Frameworks"),
60
- ("Topic", "Software Development", "Libraries", "Python Modules"),
45
+ 'Development Status :: 3 - Alpha',
46
+ 'Environment :: Web Environment',
47
+ 'Intended Audience :: Developers',
48
+ 'License :: OSI Approved :: MIT License',
49
+ 'Operating System :: OS Independent',
50
+ 'Programming Language :: Python',
51
+ 'Programming Language :: Python :: 3',
52
+ 'Programming Language :: Python :: 3 :: Only',
53
+ 'Programming Language :: Python :: 3.12',
54
+ 'Programming Language :: Python :: 3.13',
55
+ 'Typing :: Typed',
56
+ 'Topic :: Internet :: WWW/HTTP',
57
+ 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
58
+ 'Topic :: Internet :: WWW/HTTP :: WSGI',
59
+ 'Topic :: Software Development :: Libraries :: Application Frameworks',
60
+ 'Topic :: Software Development :: Libraries :: Python Modules'
61
61
  ]
62
62
 
63
- def get_classifiers():
64
- """
65
- Returns the list of classifiers as strings, formatted for use in setup.py or pyproject.toml.
66
-
67
- Each classifier tuple is joined with ' :: ' as required by Python packaging standards.
68
-
69
- Returns:
70
- list of str: Classifier strings, e.g., 'Programming Language :: Python :: 3.12'
71
- """
72
- return [
73
- " :: ".join(classtuple)
74
- for classtuple in CLASSIFIERS
75
- ]
76
-
77
63
  #---------------------------------------------------------------------------
78
64
  # Project Keywords
79
65
  #---------------------------------------------------------------------------
@@ -92,46 +78,33 @@ KEYWORDS = [
92
78
  #---------------------------------------------------------------------------
93
79
  # List of required packages and their minimum versions.
94
80
  REQUIRES = [
95
- ("apscheduler", "3.11.0"),
96
- ("python-dotenv", "1.0.1"),
97
- ("requests", "2.32.3"),
98
- ("rich", "13.9.4"),
99
- ("psutil", "7.0.0"),
100
- ("cryptography", "44.0.3"),
81
+ 'apscheduler>=3.11.0',
82
+ 'python-dotenv>=1.0.1',
83
+ 'requests>=2.32.3',
84
+ 'rich>=13.9.4',
85
+ 'psutil>=7.0.0',
86
+ 'cryptography>=44.0.3'
101
87
  ]
102
88
 
103
- def get_requires():
89
+ #---------------------------------------------------------------------------
90
+ # Function to retrieve the icon SVG code
91
+ #---------------------------------------------------------------------------
92
+ # This function reads the 'icon.svg' file from the current directory and returns its content.
93
+ def icon():
104
94
  """
105
- Returns the list of required dependencies as strings, formatted for use in requirements files.
95
+ Returns the SVG code for the project's icon image.
106
96
 
107
- Each dependency tuple is joined with '>=' to specify the minimum required version.
97
+ Reads the 'icon.svg' file from the current directory and returns its content.
108
98
 
109
99
  Returns:
110
- list of str: Requirement strings, e.g., 'requests>=2.32.3'
111
- """
112
- return [
113
- ">=".join(requirement)
114
- for requirement in REQUIRES
115
- ]
116
-
117
- def get_svg_assets():
100
+ str: SVG code as a string, or None if the file is not found.
118
101
  """
119
- Returns the SVG code for the project's icon and text images.
102
+ import os
120
103
 
121
- Reads the SVG files and returns their contents as strings.
104
+ path = os.path.join(os.path.dirname(__file__), 'icon.svg')
122
105
 
123
- Returns:
124
- dict: Dictionary with 'icon' and 'text' keys containing SVG code as strings.
125
- """
126
- import os
127
- current_dir = os.path.dirname(__file__)
128
- icon_path = os.path.join(current_dir, "static", "svg", "logo.svg")
129
- text_path = os.path.join(current_dir, "static", "svg", "text.svg")
130
- with open(icon_path, 'r', encoding='utf-8') as icon_file:
131
- icon_svg = icon_file.read()
132
- with open(text_path, 'r', encoding='utf-8') as text_file:
133
- text_svg = text_file.read()
134
- return {
135
- 'icon': icon_svg,
136
- 'text': text_svg,
137
- }
106
+ try:
107
+ with open(path, 'r', encoding='utf-8') as f:
108
+ return f.read()
109
+ except FileNotFoundError:
110
+ return None
@@ -1,158 +1,384 @@
1
1
  import requests
2
2
  from orionis.metadata.framework import API
3
3
 
4
- class PypiPackageApi:
4
+ class PypiOrionisPackage:
5
5
  """
6
- PypiPackageApi provides an interface to fetch and access metadata about the Orionis package from PyPI.
7
- This class initializes by retrieving package information from the PyPI JSON API for the 'orionis' package.
8
- It exposes various methods to access metadata such as the package name, version, author, description, license,
9
- classifiers, required Python version, keywords, and project URLs.
6
+ Provides an interface for retrieving and accessing metadata about the Orionis package from PyPI.
7
+
8
+ This class automatically fetches metadata from the PyPI JSON API for the Orionis package upon initialization.
9
+ The metadata includes information such as package name, version, author, description, license, classifiers,
10
+ required Python version, keywords, and project URLs. The metadata is stored internally and can be accessed
11
+ through dedicated methods.
12
+
13
+ Attributes
14
+ ----------
15
+ _baseUrl : str
16
+ The base URL for the PyPI API endpoint used to fetch package metadata.
17
+ _info : dict
18
+ A dictionary containing the metadata retrieved from the PyPI API.
19
+
20
+ Notes
21
+ -----
22
+ The metadata is retrieved using the PyPI JSON API and stored in the `_info` attribute.
23
+ If the request fails or the response structure is invalid, an exception will be raised during initialization.
10
24
  """
11
25
 
12
26
  def __init__(self) -> None:
13
27
  """
14
- Initializes the class by setting the base URL for the Orionis PyPI package,
15
- initializing the information dictionary, and retrieving all package data.
28
+ Initialize the PypiOrionisPackage instance.
29
+
30
+ This constructor sets up the base URL for the Orionis PyPI package, initializes the internal
31
+ information dictionary, and immediately fetches all available package metadata from PyPI.
32
+
33
+ Parameters
34
+ ----------
35
+ None
36
+
37
+ Returns
38
+ -------
39
+ None
40
+ This method does not return any value. It initializes instance attributes and populates
41
+ the `_info` dictionary with package metadata.
42
+
43
+ Notes
44
+ -----
45
+ The metadata is retrieved using the PyPI JSON API and stored in the `_info` attribute.
46
+ If the request fails, an exception will be raised during initialization.
16
47
  """
17
- self._baseUrl = API
18
- self._info = {}
19
- self.getAllData()
48
+ self._baseUrl = API # Set the base URL for the PyPI API endpoint
49
+ self._info = {} # Initialize the dictionary to store package metadata
50
+ self.getAllData() # Fetch and populate metadata from PyPI
20
51
 
21
52
  def getAllData(self) -> dict:
22
53
  """
23
- Fetches all data from the base URL and updates the internal info attribute.
54
+ Fetch and update package metadata from the PyPI API.
24
55
 
25
- Sends a GET request to the specified base URL. If the request is successful (status code 200),
26
- parses the JSON response and updates the `_info` attribute with the value associated with the "info" key.
27
- Raises an exception if the request fails.
56
+ This method sends a GET request to the PyPI JSON API endpoint specified by `self._baseUrl`.
57
+ If the request is successful (HTTP status code 200), it parses the JSON response and updates
58
+ the internal `_info` attribute with the value associated with the "info" key. If the "info"
59
+ key is missing or the request fails, an exception is raised.
28
60
 
29
- Raises:
30
- Exception: If the request to the base URL fails or returns a non-200 status code.
61
+ Parameters
62
+ ----------
63
+ None
64
+
65
+ Returns
66
+ -------
67
+ dict
68
+ A dictionary containing the package metadata retrieved from PyPI. This dictionary is also
69
+ stored in the instance's `_info` attribute.
70
+
71
+ Raises
72
+ ------
73
+ Exception
74
+ If the request to the PyPI API fails, returns a non-200 status code, or the response
75
+ structure is invalid (missing the "info" key).
76
+
77
+ Notes
78
+ -----
79
+ The method uses a timeout of 10 seconds for the HTTP request to avoid hanging indefinitely.
31
80
  """
32
81
  try:
82
+ # Send a GET request to the PyPI API endpoint
33
83
  response = requests.get(self._baseUrl, timeout=10)
84
+
85
+ # Raise an error for non-200 status codes
34
86
  response.raise_for_status()
35
- data:dict = response.json()
87
+
88
+ # Parse the JSON response
89
+ data: dict = response.json()
90
+
91
+ # Extract the 'info' section containing package metadata
36
92
  self._info = data.get("info", {})
93
+
94
+ # Raise an error if 'info' key is missing or empty
37
95
  if not self._info:
38
96
  raise ValueError("No 'info' key found in PyPI response.")
97
+
98
+ # Return the package metadata dictionary
39
99
  return self._info
100
+
40
101
  except requests.RequestException as e:
102
+
103
+ # Handle network or HTTP errors
41
104
  raise Exception(
42
105
  f"Error fetching data from PyPI: {e}. "
43
106
  "Please check your internet connection or try again later."
44
107
  )
45
108
  except ValueError as ve:
109
+
110
+ # Handle invalid response structure
46
111
  raise Exception(
47
112
  f"Invalid response structure from PyPI: {ve}"
48
113
  )
49
114
 
50
115
  def getName(self) -> str:
51
116
  """
52
- Returns the package name from the value of the 'name' key in the _info dictionary.
117
+ Retrieve the package name from the internal metadata dictionary.
53
118
 
54
- Returns:
55
- str: The package name.
119
+ This method accesses the '_info' attribute, which contains metadata fetched from the PyPI API,
120
+ and returns the value associated with the 'name' key. The package name uniquely identifies the
121
+ Python package as registered on PyPI.
122
+
123
+ Returns
124
+ -------
125
+ str
126
+ The name of the package as specified in the PyPI metadata.
127
+
128
+ Notes
129
+ -----
130
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
131
+ If the 'name' key is missing, a KeyError will be raised.
56
132
  """
133
+
134
+ # Return the package name from the metadata dictionary
57
135
  return self._info['name']
58
136
 
59
137
  def getVersion(self) -> str:
60
138
  """
61
- Returns the version information of the framework.
139
+ Retrieve the version information of the Orionis framework from the internal metadata dictionary.
62
140
 
63
- Returns:
64
- str: The version string from the framework's information dictionary.
141
+ This method accesses the '_info' attribute, which contains metadata fetched from the PyPI API,
142
+ and returns the value associated with the 'version' key. The version string uniquely identifies
143
+ the current release of the package as registered on PyPI.
144
+
145
+ Returns
146
+ -------
147
+ str
148
+ The version string of the Orionis framework as specified in the PyPI metadata.
149
+
150
+ Notes
151
+ -----
152
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
153
+ If the 'version' key is missing, a KeyError will be raised.
65
154
  """
155
+
156
+ # Return the version string from the metadata dictionary
66
157
  return self._info['version']
67
158
 
68
159
  def getAuthor(self) -> str:
69
160
  """
70
- Returns the author of the framework.
161
+ Retrieve the author's name from the internal metadata dictionary.
71
162
 
72
- Returns:
73
- str: The author's name as specified in the framework information.
163
+ This method accesses the '_info' attribute, which contains metadata fetched from the PyPI API,
164
+ and returns the value associated with the 'author' key. The author's name identifies the individual
165
+ or organization responsible for maintaining the Orionis framework package.
166
+
167
+ Returns
168
+ -------
169
+ str
170
+ The author's name as specified in the PyPI metadata. If the 'author' key is missing, a KeyError will be raised.
171
+
172
+ Notes
173
+ -----
174
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
74
175
  """
176
+
177
+ # Return the author's name from the metadata dictionary
75
178
  return self._info['author']
76
179
 
77
180
  def getAuthorEmail(self) -> str:
78
181
  """
79
- Retrieve the author's email address from the internal information dictionary.
182
+ Retrieve the author's email address from the internal metadata dictionary.
80
183
 
81
- Returns:
82
- str: The email address of the author.
184
+ This method accesses the '_info' attribute, which contains metadata fetched from the PyPI API,
185
+ and returns the value associated with the 'author_email' key. The author's email address is useful
186
+ for contacting the maintainer of the Orionis framework package.
187
+
188
+ Returns
189
+ -------
190
+ str
191
+ The email address of the author as specified in the PyPI metadata. If the 'author_email' key
192
+ is missing, a KeyError will be raised.
193
+
194
+ Notes
195
+ -----
196
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
83
197
  """
198
+
199
+ # Return the author's email address from the metadata dictionary
84
200
  return self._info['author_email']
85
201
 
86
202
  def getDescription(self) -> str:
87
203
  """
88
- Returns the summary description from the internal information dictionary.
204
+ Retrieve the summary description of the Orionis framework package.
205
+
206
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
207
+ and returns the value associated with the 'summary' key. The summary provides a brief description of the
208
+ package as registered on PyPI.
89
209
 
90
- Returns:
91
- str: The summary description stored in the '_info' dictionary under the 'summary' key.
210
+ Returns
211
+ -------
212
+ str
213
+ The summary description of the Orionis framework package, as stored in the '_info' dictionary under the 'summary' key.
214
+
215
+ Notes
216
+ -----
217
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
218
+ If the 'summary' key is missing, a KeyError will be raised.
92
219
  """
220
+
221
+ # Return the summary description from the metadata dictionary
93
222
  return self._info['summary']
94
223
 
95
224
  def getUrl(self) -> str:
96
225
  """
97
- Retrieves the homepage URL from the project's information.
226
+ Retrieve the homepage URL of the Orionis framework package from PyPI metadata.
227
+
228
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
229
+ and extracts the homepage URL from the 'project_urls' sub-dictionary under the 'Homepage' key. The homepage
230
+ URL typically points to the main website or documentation for the Orionis framework.
98
231
 
99
- Returns:
100
- str: The homepage URL specified in the project's 'project_urls' under 'Homepage'.
232
+ Returns
233
+ -------
234
+ str
235
+ The homepage URL of the Orionis framework package as specified in the PyPI metadata under
236
+ `_info['project_urls']['Homepage']`.
237
+
238
+ Notes
239
+ -----
240
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
241
+ If the 'Homepage' key is missing in the 'project_urls' dictionary, a KeyError will be raised.
101
242
  """
243
+
244
+ # Access the 'project_urls' dictionary and return the 'Homepage' URL
102
245
  return self._info['project_urls']['Homepage']
103
246
 
104
247
  def getLongDescription(self) -> str:
105
248
  """
106
- Returns the long description of the framework.
249
+ Retrieve the long description of the Orionis framework package.
250
+
251
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
252
+ and returns the value associated with the 'description' key. The long description typically provides
253
+ a detailed overview of the package, including features, usage, and other relevant information as
254
+ registered on PyPI.
107
255
 
108
- Returns:
109
- str: The description text from the framework's information dictionary.
256
+ Returns
257
+ -------
258
+ str
259
+ The long description text of the Orionis framework package, as stored in the '_info' dictionary
260
+ under the 'description' key.
261
+
262
+ Notes
263
+ -----
264
+ The '_info' dictionary must be populated before calling this method, typically during initialization.
265
+ If the 'description' key is missing, a KeyError will be raised.
110
266
  """
267
+
268
+ # Return the long description from the metadata dictionary
111
269
  return self._info['description']
112
270
 
113
271
  def getDescriptionContentType(self) -> str:
114
272
  """
115
- Returns the content type of the description from the internal information dictionary.
273
+ Retrieve the content type of the package description from the internal metadata dictionary.
274
+
275
+ This method accesses the `_info` attribute, which contains metadata fetched from the PyPI API,
276
+ and returns the value associated with the 'description_content_type' key. The content type
277
+ indicates the format of the package's long description, such as 'text/markdown' or 'text/plain'.
116
278
 
117
- Returns:
118
- str: The content type of the description (e.g., 'text/markdown', 'text/plain').
279
+ Returns
280
+ -------
281
+ str
282
+ The content type of the package description (e.g., 'text/markdown', 'text/plain') as specified
283
+ in the PyPI metadata under the 'description_content_type' key.
284
+
285
+ Notes
286
+ -----
287
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
288
+ If the 'description_content_type' key is missing, a KeyError will be raised.
119
289
  """
290
+
291
+ # Return the content type of the description from the metadata dictionary
120
292
  return self._info['description_content_type']
121
293
 
122
294
  def getLicense(self) -> str:
123
295
  """
124
- Returns the license type specified in the framework information.
296
+ Retrieve the license type specified in the framework metadata.
125
297
 
126
- If the license information is not set, defaults to "MIT".
298
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
299
+ and returns the value associated with the 'license' key. If the license information is not set or is an
300
+ empty string, the method defaults to returning "MIT".
127
301
 
128
- Returns:
129
- str: The license type.
302
+ Returns
303
+ -------
304
+ str
305
+ The license type as specified in the PyPI metadata under the 'license' key. If the license is not set,
306
+ returns "MIT".
307
+
308
+ Notes
309
+ -----
310
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
311
+ If the 'license' key is missing, a KeyError will be raised.
130
312
  """
313
+
314
+ # Return the license type from the metadata dictionary, defaulting to "MIT" if not set
131
315
  return self._info['license'] or "MIT"
132
316
 
133
317
  def getClassifiers(self) -> list:
134
318
  """
135
- Returns the list of classifiers from the internal _info dictionary.
319
+ Retrieve the list of classifiers associated with the Orionis framework package.
136
320
 
137
- Returns:
138
- list: A list of classifier strings.
321
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
322
+ and returns the value associated with the 'classifiers' key. Classifiers are standardized strings used
323
+ by PyPI to categorize the package (e.g., supported Python versions, intended audience, license, etc.).
324
+
325
+ Returns
326
+ -------
327
+ list of str
328
+ A list of classifier strings as specified in the PyPI metadata under the 'classifiers' key.
329
+ Each string describes a category or property of the package.
330
+
331
+ Notes
332
+ -----
333
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
334
+ If the 'classifiers' key is missing, a KeyError will be raised.
139
335
  """
336
+
337
+ # Return the list of classifiers from the metadata dictionary
140
338
  return self._info['classifiers']
141
339
 
142
340
  def getPythonVersion(self) -> str:
143
341
  """
144
- Retrieves the required Python version for the framework.
342
+ Retrieve the required Python version specification from the package metadata.
145
343
 
146
- Returns:
147
- str: The Python version specification required by the framework, as defined in the '_info' dictionary.
344
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
345
+ and returns the value associated with the 'requires_python' key. The returned string specifies the Python
346
+ version(s) required to use the Orionis framework package, as defined in its PyPI metadata.
347
+
348
+ Returns
349
+ -------
350
+ str
351
+ The Python version specification required by the framework, as defined in the '_info' dictionary
352
+ under the 'requires_python' key. For example, it may return a string like '>=3.7'.
353
+
354
+ Notes
355
+ -----
356
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
357
+ If the 'requires_python' key is missing, a KeyError will be raised.
148
358
  """
359
+
360
+ # Return the required Python version specification from the metadata dictionary
149
361
  return self._info['requires_python']
150
362
 
151
363
  def getKeywords(self) -> list:
152
364
  """
153
- Retrieve the list of keywords associated with the current object.
365
+ Retrieve the list of keywords associated with the Orionis framework package.
154
366
 
155
- Returns:
156
- list: A list of keywords from the object's information dictionary.
367
+ This method accesses the internal `_info` dictionary, which contains metadata fetched from the PyPI API,
368
+ and returns the value associated with the 'keywords' key. Keywords are typically used to describe the
369
+ package's functionality, domain, or relevant search terms on PyPI.
370
+
371
+ Returns
372
+ -------
373
+ list of str
374
+ A list of keywords describing the Orionis framework package, as specified in the PyPI metadata
375
+ under the 'keywords' key.
376
+
377
+ Notes
378
+ -----
379
+ The `_info` dictionary must be populated before calling this method, typically during initialization.
380
+ If the 'keywords' key is missing, a KeyError will be raised.
157
381
  """
382
+
383
+ # Return the list of keywords from the metadata dictionary
158
384
  return self._info['keywords']