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.
- orionis/app.py +17 -0
- orionis/console/commands/version.py +2 -2
- orionis/console/core/reactor.py +1 -1
- orionis/foundation/config/roots/paths.py +2 -2
- orionis/metadata/framework.py +38 -65
- orionis/metadata/package.py +280 -54
- orionis/support/entities/base.py +18 -37
- orionis/support/facades/console.py +3 -9
- orionis/support/facades/dumper.py +3 -9
- orionis/support/facades/logger.py +3 -9
- orionis/support/facades/path_resolver.py +3 -10
- orionis/support/facades/progress_bar.py +3 -10
- orionis/support/facades/testing.py +4 -10
- orionis/support/facades/workers.py +4 -9
- orionis/support/formatter/exceptions/contracts/parser.py +10 -7
- orionis/support/formatter/exceptions/parser.py +28 -26
- orionis/support/formatter/serializer.py +12 -5
- orionis/support/patterns/singleton/meta.py +17 -21
- orionis/support/standard/contracts/std.py +25 -24
- orionis/support/standard/exceptions/value.py +2 -2
- orionis/support/standard/std.py +26 -24
- orionis/support/wrapper/dot_dict.py +16 -51
- orionis/test/cases/asynchronous.py +17 -81
- orionis/test/cases/synchronous.py +17 -73
- orionis/test/contracts/dumper.py +17 -21
- orionis/test/contracts/kernel.py +5 -12
- orionis/test/contracts/logs.py +16 -21
- orionis/test/contracts/printer.py +70 -8
- orionis/test/contracts/render.py +7 -13
- orionis/test/contracts/test_result.py +58 -27
- orionis/test/contracts/unit_test.py +18 -18
- orionis/test/core/unit_test.py +162 -519
- orionis/test/entities/result.py +49 -21
- orionis/test/enums/status.py +11 -17
- orionis/test/exceptions/config.py +4 -8
- orionis/test/exceptions/failure.py +2 -18
- orionis/test/exceptions/persistence.py +4 -8
- orionis/test/exceptions/runtime.py +4 -8
- orionis/test/exceptions/value.py +5 -13
- orionis/test/kernel.py +14 -42
- orionis/test/output/dumper.py +21 -43
- orionis/test/output/printer.py +6 -146
- orionis/test/records/logs.py +57 -121
- orionis/test/validators/base_path.py +8 -6
- orionis/test/validators/execution_mode.py +2 -3
- orionis/test/validators/fail_fast.py +4 -8
- orionis/test/validators/folder_path.py +5 -7
- orionis/test/validators/module_name.py +3 -3
- orionis/test/validators/name_pattern.py +4 -9
- orionis/test/validators/pattern.py +4 -9
- orionis/test/validators/persistent.py +4 -14
- orionis/test/validators/persistent_driver.py +7 -12
- orionis/test/validators/print_result.py +4 -9
- orionis/test/validators/tags.py +6 -7
- orionis/test/validators/throw_exception.py +7 -14
- orionis/test/validators/verbosity.py +15 -5
- orionis/test/validators/web_report.py +6 -10
- orionis/test/validators/workers.py +9 -4
- orionis/test/view/render.py +9 -26
- {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/METADATA +1 -1
- {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/RECORD +82 -81
- tests/metadata/test_metadata_framework.py +64 -90
- tests/metadata/test_metadata_package.py +31 -31
- tests/support/entities/mock_dataclass.py +16 -10
- tests/support/entities/test_base.py +6 -14
- tests/support/patterns/singleton/test_patterns_singleton.py +7 -8
- tests/support/standard/test_services_std.py +113 -37
- tests/support/wrapper/test_services_wrapper_docdict.py +25 -40
- tests/testing/cases/test_testing_asynchronous.py +14 -14
- tests/testing/cases/test_testing_synchronous.py +12 -14
- tests/testing/entities/test_testing_result.py +12 -51
- tests/testing/enums/test_testing_status.py +8 -13
- tests/testing/output/test_testing_dumper.py +3 -6
- tests/testing/output/test_testing_printer.py +5 -5
- tests/testing/records/test_testing_records.py +16 -26
- tests/testing/test_testing_unit.py +8 -94
- tests/testing/validators/test_testing_validators.py +55 -112
- tests/testing/view/test_render.py +4 -5
- {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/WHEEL +0 -0
- {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/top_level.txt +0 -0
- {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
|
"""
|
orionis/console/core/reactor.py
CHANGED
|
@@ -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' / '
|
|
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' / '
|
|
13
|
+
'default': lambda: str((Path.cwd() / 'app' / 'console' / 'scheduler.py').resolve())
|
|
14
14
|
}
|
|
15
15
|
)
|
|
16
16
|
|
orionis/metadata/framework.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
NAME = "orionis"
|
|
6
6
|
|
|
7
7
|
# Current version of the framework
|
|
8
|
-
VERSION = "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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
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
|
|
95
|
+
Returns the SVG code for the project's icon image.
|
|
106
96
|
|
|
107
|
-
|
|
97
|
+
Reads the 'icon.svg' file from the current directory and returns its content.
|
|
108
98
|
|
|
109
99
|
Returns:
|
|
110
|
-
|
|
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
|
-
|
|
102
|
+
import os
|
|
120
103
|
|
|
121
|
-
|
|
104
|
+
path = os.path.join(os.path.dirname(__file__), 'icon.svg')
|
|
122
105
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
orionis/metadata/package.py
CHANGED
|
@@ -1,158 +1,384 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
from orionis.metadata.framework import API
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class PypiOrionisPackage:
|
|
5
5
|
"""
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
54
|
+
Fetch and update package metadata from the PyPI API.
|
|
24
55
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
+
Retrieve the package name from the internal metadata dictionary.
|
|
53
118
|
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
139
|
+
Retrieve the version information of the Orionis framework from the internal metadata dictionary.
|
|
62
140
|
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
161
|
+
Retrieve the author's name from the internal metadata dictionary.
|
|
71
162
|
|
|
72
|
-
|
|
73
|
-
|
|
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
|
|
182
|
+
Retrieve the author's email address from the internal metadata dictionary.
|
|
80
183
|
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
296
|
+
Retrieve the license type specified in the framework metadata.
|
|
125
297
|
|
|
126
|
-
|
|
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
|
-
|
|
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
|
-
|
|
319
|
+
Retrieve the list of classifiers associated with the Orionis framework package.
|
|
136
320
|
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
342
|
+
Retrieve the required Python version specification from the package metadata.
|
|
145
343
|
|
|
146
|
-
|
|
147
|
-
|
|
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
|
|
365
|
+
Retrieve the list of keywords associated with the Orionis framework package.
|
|
154
366
|
|
|
155
|
-
|
|
156
|
-
|
|
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']
|