inspy-logger 3.0.dev1__py3-none-any.whl → 3.0.dev2__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.
- inspy_logger/Scripts/main.py +91 -0
- inspy_logger/__about__.py +33 -33
- inspy_logger/__init__.py +326 -294
- inspy_logger/errors/__init__.py +121 -121
- inspy_logger/helpers/__init__.py +189 -123
- inspy_logger/helpers/cache.py +140 -140
- inspy_logger/helpers/network.py +388 -388
- inspy_logger/manifest.py +40 -40
- inspy_logger/version.py +287 -0
- {inspy_logger-3.0.dev1.dist-info → inspy_logger-3.0.dev2.dist-info}/LICENSE.md +20 -20
- inspy_logger-3.0.dev2.dist-info/METADATA +94 -0
- inspy_logger-3.0.dev2.dist-info/RECORD +14 -0
- inspy_logger-3.0.dev2.dist-info/entry_points.txt +3 -0
- inspy_logger-3.0.dev1.dist-info/METADATA +0 -23
- inspy_logger-3.0.dev1.dist-info/RECORD +0 -11
- {inspy_logger-3.0.dev1.dist-info → inspy_logger-3.0.dev2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
File:
|
|
4
|
+
inspy_logger/Scripts/main.py
|
|
5
|
+
|
|
6
|
+
Author:
|
|
7
|
+
Inspyre Softworks
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
INSPY_LOG_LEVEL = 'info'
|
|
11
|
+
|
|
12
|
+
from inspy_logger.version import parse_version, get_full_version_name, PyPiVersionInfo
|
|
13
|
+
import sys
|
|
14
|
+
from rich import print
|
|
15
|
+
from rich.table import Table
|
|
16
|
+
from argparse import ArgumentParser
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
parser = ArgumentParser('inspy-logger-version', description='Displays version information for inspy-logger.')
|
|
20
|
+
|
|
21
|
+
parser.add_argument('-v', '--version', action='version', version=parse_version())
|
|
22
|
+
|
|
23
|
+
subparsers = parser.add_subparsers(title='subcommands', dest='subcommand')
|
|
24
|
+
|
|
25
|
+
update_parser =subparsers.add_parser('update', help='Checks for updates to inspy-logger.')
|
|
26
|
+
|
|
27
|
+
update_parser.add_argument('-p', '--pre-release', action='store_true', help='When checking for updates, include pre-release versions.')
|
|
28
|
+
|
|
29
|
+
parsed_args = parser.parse_args()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if parsed_args.subcommand == 'update':
|
|
33
|
+
INCLUDE_PRE_RELEASE_FOR_UPDATE_CHECK = parsed_args.pre_release
|
|
34
|
+
else:
|
|
35
|
+
INCLUDE_PRE_RELEASE_FOR_UPDATE_CHECK = False
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
pypi_info = PyPiVersionInfo(include_pre_release_for_update_check=INCLUDE_PRE_RELEASE_FOR_UPDATE_CHECK)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def update():
|
|
42
|
+
"""
|
|
43
|
+
Checks for updates to inspy-logger.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
None
|
|
47
|
+
|
|
48
|
+
Since:
|
|
49
|
+
v3.0
|
|
50
|
+
"""
|
|
51
|
+
if pypi_info.update_available:
|
|
52
|
+
print(f'\n\n[bold green]Update Available![/bold green] New version: [bold cyan]{pypi_info.new_version_available}[/bold cyan]')
|
|
53
|
+
else:
|
|
54
|
+
print(f'\n\n[bold green]No update available.[/bold green] Current version: [bold cyan]{parse_version()}[/bold cyan] {"which is newer than the available version on PyPi.org" if pypi_info.installed_newer_than_latest else ""}')
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def get_version_info():
|
|
58
|
+
# Create a table
|
|
59
|
+
table = Table(show_header=False, show_lines=True, expand=True, border_style='bright_blue',
|
|
60
|
+
row_styles=['none', 'dim'])
|
|
61
|
+
|
|
62
|
+
# Add columns
|
|
63
|
+
table.add_column('Property', style='cyan', width=20)
|
|
64
|
+
table.add_column('Value', justify='center')
|
|
65
|
+
|
|
66
|
+
# Add rows
|
|
67
|
+
table.add_row('Version', parse_version(), )
|
|
68
|
+
table.add_row('Full Version Name', get_full_version_name())
|
|
69
|
+
|
|
70
|
+
if pypi_info.update_available:
|
|
71
|
+
table.add_row('Update Available', f'[bold green]Yes[/bold green]')
|
|
72
|
+
table.add_row('Latest Version', f'{pypi_info.new_version_available_num}')
|
|
73
|
+
|
|
74
|
+
table.add_row('Python Executable Path', sys.executable)
|
|
75
|
+
table.add_row('Python Version', sys.version)
|
|
76
|
+
|
|
77
|
+
print(table)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def main():
|
|
82
|
+
|
|
83
|
+
if parsed_args.subcommand == 'update':
|
|
84
|
+
return update()
|
|
85
|
+
|
|
86
|
+
return get_version_info()
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
if __name__ == '__main__':
|
|
91
|
+
main()
|
inspy_logger/__about__.py
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"""
|
|
2
|
-
|
|
3
|
-
File: inspy_logger/__about__.py
|
|
4
|
-
Project: inSPy-Logger
|
|
5
|
-
Description:
|
|
6
|
-
Holds information about the inSPy-Logger program and its version.
|
|
7
|
-
|
|
8
|
-
Created: 11/3/22 - 21:05:06
|
|
9
|
-
|
|
10
|
-
Since:
|
|
11
|
-
v2.1.1
|
|
12
|
-
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
__prog__ = 'inSPy-Logger'
|
|
16
|
-
__version__ = '3.0-dev.1'
|
|
17
|
-
__authors__ = [
|
|
18
|
-
('Inspyre-Softworks', 'https://inspyre.tech'),
|
|
19
|
-
('Taylor-Jayde Blackstone', '<t.blackstone@inspyre.tech')
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
'''
|
|
23
|
-
File Change History:
|
|
24
|
-
11/5/22 - 4:21 AM (v2.1.2):
|
|
25
|
-
- Added description to docstring. (target: 2.1.2)
|
|
26
|
-
|
|
27
|
-
11/5/22 - 4:41 AM:
|
|
28
|
-
- Version bump (target: 2.1.3)
|
|
29
|
-
|
|
30
|
-
08/16/2023 - 13:49 (v3.0):
|
|
31
|
-
- Version bump (v2.1.3 -> v3.0-dev.1)
|
|
32
|
-
|
|
33
|
-
'''
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
File: inspy_logger/__about__.py
|
|
4
|
+
Project: inSPy-Logger
|
|
5
|
+
Description:
|
|
6
|
+
Holds information about the inSPy-Logger program and its version.
|
|
7
|
+
|
|
8
|
+
Created: 11/3/22 - 21:05:06
|
|
9
|
+
|
|
10
|
+
Since:
|
|
11
|
+
v2.1.1
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
__prog__ = 'inSPy-Logger'
|
|
16
|
+
__version__ = '3.0-dev.1'
|
|
17
|
+
__authors__ = [
|
|
18
|
+
('Inspyre-Softworks', 'https://inspyre.tech'),
|
|
19
|
+
('Taylor-Jayde Blackstone', '<t.blackstone@inspyre.tech')
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
'''
|
|
23
|
+
File Change History:
|
|
24
|
+
11/5/22 - 4:21 AM (v2.1.2):
|
|
25
|
+
- Added description to docstring. (target: 2.1.2)
|
|
26
|
+
|
|
27
|
+
11/5/22 - 4:41 AM:
|
|
28
|
+
- Version bump (target: 2.1.3)
|
|
29
|
+
|
|
30
|
+
08/16/2023 - 13:49 (v3.0):
|
|
31
|
+
- Version bump (v2.1.3 -> v3.0-dev.1)
|
|
32
|
+
|
|
33
|
+
'''
|