inspy-logger 3.0.dev1__tar.gz → 3.0.dev3__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,20 +1,20 @@
1
- ### Do What the Fuck You Want To - Public License (v3.0 3, Sept. 2020)
2
- ----
3
- ----
4
-
5
- Copyright (C) 2020 Taylor-Jayde Blackstone <t.blackstone@inspyre.tech>
6
-
7
- ----
8
-
9
- Everyone is permitted to copy and distribute verbatim or modified
10
- copies of this license document, and changing it is allowed as long
11
- as the name is changed. That's my name, you can't have it.
12
-
13
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
14
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
15
-
16
- - You just **DO WHAT THE FUCK YOU WANT TO**.
17
- - You **don't** blame me for **shit**. _I don't care_ how much smoke your hard-drive spewed out.
18
- - If someone else did what the fuck they wanted to and you're _**triggered**_ I'm **not** responsible.
19
-
20
- Contact <dev.null@inspyre.tech> with any complaints.
1
+ ### Do What the Fuck You Want To - Public License (v3.0 3, Sept. 2020)
2
+ ----
3
+ ----
4
+
5
+ Copyright (C) 2020 Taylor-Jayde Blackstone <t.blackstone@inspyre.tech>
6
+
7
+ ----
8
+
9
+ Everyone is permitted to copy and distribute verbatim or modified
10
+ copies of this license document, and changing it is allowed as long
11
+ as the name is changed. That's my name, you can't have it.
12
+
13
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
14
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
15
+
16
+ - You just **DO WHAT THE FUCK YOU WANT TO**.
17
+ - You **don't** blame me for **shit**. _I don't care_ how much smoke your hard-drive spewed out.
18
+ - If someone else did what the fuck they wanted to and you're _**triggered**_ I'm **not** responsible.
19
+
20
+ Contact <dev.null@inspyre.tech> with any complaints.
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.1
2
+ Name: inspy-logger
3
+ Version: 3.0.dev3
4
+ Summary: Colorable, scalable logger for CLI
5
+ Home-page: https://github.com/Inspyre-Softworks/inSPy-Logger
6
+ License: MIT
7
+ Keywords: cli,color,logging,log,terminal,console,colorama,colorlog,rich
8
+ Author: Taylor-Jayde Blackstone
9
+ Author-email: tayjaybabee@gmail.com
10
+ Requires-Python: >=3.9,<4.0
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Natural Language :: English
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.7
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: System :: Logging
25
+ Classifier: Topic :: Utilities
26
+ Requires-Dist: appdirs (>=1.4.4,<2.0.0)
27
+ Requires-Dist: colorama (>=0.4.6,<0.5.0)
28
+ Requires-Dist: colorlog (>=6.7,<7.0)
29
+ Requires-Dist: humanize (>=4.4.0,<5.0.0)
30
+ Requires-Dist: luddite (>=1.0.1,<2.0.0)
31
+ Requires-Dist: packaging (>=21.0,<22.0)
32
+ Requires-Dist: python-box (>=6.1.0,<7.0.0)
33
+ Requires-Dist: requests (>=2.28.1,<3.0.0)
34
+ Requires-Dist: rich (>=13.5.2,<14.0.0)
35
+ Requires-Dist: setuptools-autover (>=1.0.2,<2.0.0)
36
+ Project-URL: Documentation, https://inspy-logger.readthedocs.io/en/latest/
37
+ Project-URL: Repository, https://github.com/Inspyre-Softworks/inSPy-Logger
38
+ Description-Content-Type: text/markdown
39
+
40
+ # inSPy-Logger
41
+ ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Inspyre-Softworks/inSPy-Logger/CI?label=CI&logo=github&logoColor=9cf&style=for-the-badge)
42
+ ![Codacy grade](https://img.shields.io/codacy/grade/7171eec682c549a88dee0da9cc9b92b3?logo=codacy&logoColor=9cf&style=for-the-badge)
43
+ ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Inspyre-Softworks/inSPy-Logger?color=9cf&include_prereleases&label=Pre-Release&logo=pypi&logoColor=9cf&style=for-the-badge)
44
+ ![PyPI](https://img.shields.io/pypi/v/inspy-logger?color=9cf&label=Latest&logo=pypi&logoColor=9cf&style=for-the-badge)
45
+ ![GitHub issues](https://img.shields.io/github/issues/Inspyre-Softworks/inSPy-Logger?color=9cf&logo=github&logoColor=9cf&style=for-the-badge)
46
+ ![PyPI - Format](https://img.shields.io/pypi/format/inSPy-Logger?logo=PyPi&style=for-the-badge)
47
+
48
+ ## Installation
49
+
50
+ ### Prerequisites:
51
+
52
+ **Platform/Env**:
53
+ * **Python**: ^3.6.3
54
+ * **PIP**: (_If you want to install via PIP, that is_)
55
+
56
+ **inSPy-Logger Runtime Dependencies**:
57
+ I am providing this list of dependencies for transparency and for instances where one would not be able to install inSPy-Logger via PyPi's package manager. It is **highly** recommended you use `python3 -m pip install inspy_logger==<ver>` to install inSPy-Logger 2.0+
58
+
59
+ * [colorlog](https://pypi.org/project/colorlog) (^4.2.1)
60
+ * [setuptools-autover](https://pypi.org/project/setuptools-autover) = (^1.0.2)
61
+ * [luddite](https://pypi.org/project/luddite) = (^1.0.1)
62
+ * [packaging](https://pypi.org/project/packaging) = (^20.4)
63
+
64
+ ### Installation via Pip on Python 3.6.3+ (recommended method):
65
+
66
+ - `$> python3 -m pip install inspy_logger==<version>`
67
+
68
+ #### Test out InspyLogger:
69
+
70
+ ```python3
71
+
72
+ import inspy_logger
73
+
74
+ # Set up a log device object. The first parameter is the root loggers name, and the second is the debug level
75
+ log_device = inspy_logger.InspyLogger('LogName', 'debug')
76
+
77
+ # Start a running log from that device
78
+ log = log_device.start()
79
+
80
+ # Output our own logger lines:
81
+ log.debug('This is a debug log entry')
82
+ log.info('This is an info log entry')
83
+ log.warning('This is a warning log entry!')
84
+ log.error('This is an error log entry!')
85
+ log.exception('This is an exception log entry!')
86
+
87
+ ```
88
+
89
+ If you run the code above you'll get output similar to this:
90
+
91
+ ![output1](https://github.com/Inspyre-Softworks/inSPy-Logger/blob/v2.0-alpha.6/examples/v2.0/output_screenies/v2.0.0a.6_screenie1.png)
92
+
93
+ v2.0+ repository for inSPy-Logger
94
+
@@ -0,0 +1,54 @@
1
+ # inSPy-Logger
2
+ ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Inspyre-Softworks/inSPy-Logger/CI?label=CI&logo=github&logoColor=9cf&style=for-the-badge)
3
+ ![Codacy grade](https://img.shields.io/codacy/grade/7171eec682c549a88dee0da9cc9b92b3?logo=codacy&logoColor=9cf&style=for-the-badge)
4
+ ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Inspyre-Softworks/inSPy-Logger?color=9cf&include_prereleases&label=Pre-Release&logo=pypi&logoColor=9cf&style=for-the-badge)
5
+ ![PyPI](https://img.shields.io/pypi/v/inspy-logger?color=9cf&label=Latest&logo=pypi&logoColor=9cf&style=for-the-badge)
6
+ ![GitHub issues](https://img.shields.io/github/issues/Inspyre-Softworks/inSPy-Logger?color=9cf&logo=github&logoColor=9cf&style=for-the-badge)
7
+ ![PyPI - Format](https://img.shields.io/pypi/format/inSPy-Logger?logo=PyPi&style=for-the-badge)
8
+
9
+ ## Installation
10
+
11
+ ### Prerequisites:
12
+
13
+ **Platform/Env**:
14
+ * **Python**: ^3.6.3
15
+ * **PIP**: (_If you want to install via PIP, that is_)
16
+
17
+ **inSPy-Logger Runtime Dependencies**:
18
+ I am providing this list of dependencies for transparency and for instances where one would not be able to install inSPy-Logger via PyPi's package manager. It is **highly** recommended you use `python3 -m pip install inspy_logger==<ver>` to install inSPy-Logger 2.0+
19
+
20
+ * [colorlog](https://pypi.org/project/colorlog) (^4.2.1)
21
+ * [setuptools-autover](https://pypi.org/project/setuptools-autover) = (^1.0.2)
22
+ * [luddite](https://pypi.org/project/luddite) = (^1.0.1)
23
+ * [packaging](https://pypi.org/project/packaging) = (^20.4)
24
+
25
+ ### Installation via Pip on Python 3.6.3+ (recommended method):
26
+
27
+ - `$> python3 -m pip install inspy_logger==<version>`
28
+
29
+ #### Test out InspyLogger:
30
+
31
+ ```python3
32
+
33
+ import inspy_logger
34
+
35
+ # Set up a log device object. The first parameter is the root loggers name, and the second is the debug level
36
+ log_device = inspy_logger.InspyLogger('LogName', 'debug')
37
+
38
+ # Start a running log from that device
39
+ log = log_device.start()
40
+
41
+ # Output our own logger lines:
42
+ log.debug('This is a debug log entry')
43
+ log.info('This is an info log entry')
44
+ log.warning('This is a warning log entry!')
45
+ log.error('This is an error log entry!')
46
+ log.exception('This is an exception log entry!')
47
+
48
+ ```
49
+
50
+ If you run the code above you'll get output similar to this:
51
+
52
+ ![output1](https://github.com/Inspyre-Softworks/inSPy-Logger/blob/v2.0-alpha.6/examples/v2.0/output_screenies/v2.0.0a.6_screenie1.png)
53
+
54
+ v2.0+ repository for inSPy-Logger
@@ -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()
@@ -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
+ '''