orionis 0.177.0__py3-none-any.whl → 0.179.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/framework.py +4 -1
- orionis/installer/output/output.py +31 -0
- orionis/installer/version.py +27 -0
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/METADATA +2 -1
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/RECORD +9 -8
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/LICENCE +0 -0
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/WHEEL +0 -0
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.177.0.dist-info → orionis-0.179.0.dist-info}/top_level.txt +0 -0
orionis/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.179.0"
|
9
9
|
|
10
10
|
# Full name of the author or maintainer of the project
|
11
11
|
AUTHOR = "Raul Mauricio Uñate Castro"
|
@@ -28,6 +28,9 @@ FRAMEWORK = "https://github.com/orionis-framework/framework"
|
|
28
28
|
# URL to the project's documentation
|
29
29
|
DOCS = "https://github.com/orionis-framework/docs"
|
30
30
|
|
31
|
+
# API URL to the project's JSON data
|
32
|
+
API = "https://pypi.org/pypi/orionis/json"
|
33
|
+
|
31
34
|
#--------------------------------------------------------------------------
|
32
35
|
# Python Requirements
|
33
36
|
#--------------------------------------------------------------------------
|
@@ -4,6 +4,7 @@ import datetime
|
|
4
4
|
import traceback
|
5
5
|
from orionis.framework import NAME, VERSION, DOCS
|
6
6
|
from orionis.installer.contracts.installer_output import IInstallerOutput
|
7
|
+
from orionis.installer.version import check_version
|
7
8
|
|
8
9
|
class InstallerOutput(IInstallerOutput):
|
9
10
|
"""
|
@@ -47,6 +48,21 @@ class InstallerOutput(IInstallerOutput):
|
|
47
48
|
# Print the formatted message with the specified color and label
|
48
49
|
print(f'\u001b[{color_code}m\u001b[97m {label} \u001b[0m {timestamp} [Orionis Framework] - {message}\u001b[0m')
|
49
50
|
|
51
|
+
@staticmethod
|
52
|
+
def checkVersion():
|
53
|
+
"""
|
54
|
+
Checks the current API version and compares it with the installed version.
|
55
|
+
|
56
|
+
Returns
|
57
|
+
-------
|
58
|
+
str
|
59
|
+
The latest available version from the API.
|
60
|
+
"""
|
61
|
+
version = check_version()
|
62
|
+
if version:
|
63
|
+
if version != VERSION:
|
64
|
+
print(f"\u001b[32mA new version ({version}) is available. Please consider upgrading from the current version ({VERSION}).\u001b[0m")
|
65
|
+
|
50
66
|
@staticmethod
|
51
67
|
def asciiIco():
|
52
68
|
"""
|
@@ -73,12 +89,18 @@ class InstallerOutput(IInstallerOutput):
|
|
73
89
|
.replace('{{message}}', message)
|
74
90
|
print(output)
|
75
91
|
|
92
|
+
# Check the current version
|
93
|
+
InstallerOutput.checkVersion()
|
94
|
+
|
76
95
|
except FileNotFoundError:
|
77
96
|
# Fallback if ASCII art file is not found
|
78
97
|
print(str(NAME).upper())
|
79
98
|
print(f"Version: {VERSION}")
|
80
99
|
print(f"Docs: {DOCS}")
|
81
100
|
|
101
|
+
# Check the current version
|
102
|
+
InstallerOutput.checkVersion()
|
103
|
+
|
82
104
|
@staticmethod
|
83
105
|
def asciiInfo():
|
84
106
|
"""
|
@@ -114,12 +136,18 @@ class InstallerOutput(IInstallerOutput):
|
|
114
136
|
.replace('{{commands}}', str("\n").join(commands_array))
|
115
137
|
print(output)
|
116
138
|
|
139
|
+
# Check the current version
|
140
|
+
InstallerOutput.checkVersion()
|
141
|
+
|
117
142
|
except FileNotFoundError:
|
118
143
|
# Fallback if ASCII art file is not found
|
119
144
|
print(str(NAME).upper())
|
120
145
|
print(f"Version: {VERSION}")
|
121
146
|
print(f"Docs: {DOCS}")
|
122
147
|
|
148
|
+
# Check the current version
|
149
|
+
InstallerOutput.checkVersion()
|
150
|
+
|
123
151
|
@staticmethod
|
124
152
|
def startInstallation():
|
125
153
|
"""
|
@@ -129,6 +157,9 @@ class InstallerOutput(IInstallerOutput):
|
|
129
157
|
InstallerOutput.asciiIco()
|
130
158
|
print(f'\u001b[32mThank you for using the framework!\u001b[0m')
|
131
159
|
|
160
|
+
# Check the current version
|
161
|
+
InstallerOutput.checkVersion()
|
162
|
+
|
132
163
|
@staticmethod
|
133
164
|
def endInstallation():
|
134
165
|
"""
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import requests
|
2
|
+
from orionis.framework import API
|
3
|
+
|
4
|
+
def check_version():
|
5
|
+
"""
|
6
|
+
Checks the current API version and compares it with the installed version.
|
7
|
+
|
8
|
+
Returns
|
9
|
+
-------
|
10
|
+
str
|
11
|
+
The latest available version from the API.
|
12
|
+
"""
|
13
|
+
try:
|
14
|
+
|
15
|
+
response = requests.get(API, timeout=10)
|
16
|
+
response.raise_for_status()
|
17
|
+
data = response.json()
|
18
|
+
latest_version = data.get("info", {}).get("version")
|
19
|
+
|
20
|
+
if not latest_version:
|
21
|
+
raise ValueError("Version information not found in API response.")
|
22
|
+
|
23
|
+
return latest_version
|
24
|
+
|
25
|
+
except requests.RequestException as e:
|
26
|
+
|
27
|
+
return None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: orionis
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.179.0
|
4
4
|
Summary: Orionis Framework – Elegant, Fast, and Powerful.
|
5
5
|
Home-page: https://github.com/orionis-framework/framework
|
6
6
|
Author: Raul Mauricio Uñate Castro
|
@@ -13,6 +13,7 @@ Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENCE
|
14
14
|
Requires-Dist: apscheduler>=3.11.0
|
15
15
|
Requires-Dist: python-dotenv>=1.0.1
|
16
|
+
Requires-Dist: requests>=2.32.3
|
16
17
|
Dynamic: author
|
17
18
|
Dynamic: author-email
|
18
19
|
Dynamic: classifier
|
@@ -1,14 +1,15 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=oXY5UYvtalP996h7z5iaEc7z5b1hyFWXrLPrvtoxWcU,1368
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=tzTxUM5PbtGe2ITDIH3oFkWT6XojoEcHm_c4OAlYHgw,1469
|
4
4
|
orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/installer/manager.py,sha256=SiypGJ2YiFeWyK_4drkheHUd42oS2CH63PNuxiw6Cps,3139
|
6
|
+
orionis/installer/version.py,sha256=soue-gHr-K6szqq4uvPaJTei_NRmS21wXGTHSaereKE,670
|
6
7
|
orionis/installer/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
8
|
orionis/installer/contracts/installer_manager.py,sha256=Zfndhuyu0JaTKo3PsGsKmVsvotQMw8Pmt4KQp97elY8,1567
|
8
9
|
orionis/installer/contracts/installer_output.py,sha256=SQZeXg5HRu-x1697HCdoU1-RVJWEqCWY-zNboWnc_vs,2897
|
9
10
|
orionis/installer/contracts/installer_setup.py,sha256=enXOusaAJVWamTpH9FjXpJf-o35twEJPaEkHz7fvB48,1711
|
10
11
|
orionis/installer/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
orionis/installer/output/output.py,sha256=
|
12
|
+
orionis/installer/output/output.py,sha256=3xLaE5uREQICshhGLuqbW4d2NbANkrlKRKkWCs_ZBwQ,8154
|
12
13
|
orionis/installer/setup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
14
|
orionis/installer/setup/setup.py,sha256=zAZDelFwieZ9HbR_mSgvW9-gI--Zzu__6SZWWw4VEE8,6967
|
14
15
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -181,9 +182,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
182
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
182
183
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
183
184
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
184
|
-
orionis-0.
|
185
|
-
orionis-0.
|
186
|
-
orionis-0.
|
187
|
-
orionis-0.
|
188
|
-
orionis-0.
|
189
|
-
orionis-0.
|
185
|
+
orionis-0.179.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
186
|
+
orionis-0.179.0.dist-info/METADATA,sha256=doPBbzRB79nJfQTdBbiJB-ATk_Xif93TKv5VbNrNxlA,3003
|
187
|
+
orionis-0.179.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
188
|
+
orionis-0.179.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
189
|
+
orionis-0.179.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
190
|
+
orionis-0.179.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|