xulbux 1.5.7__py3-none-any.whl → 1.5.9__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.

Potentially problematic release.


This version of xulbux might be problematic. Click here for more details.

@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.1
2
+ Name: xulbux
3
+ Version: 1.5.9
4
+ Summary: A library which includes a lot of really helpful functions.
5
+ Author-email: XulbuX <xulbux.real@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 XulbuX
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Bug Reports, https://github.com/XulbuX-dev/PythonLibraryXulbuX/issues
29
+ Project-URL: Changelog, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md
30
+ Project-URL: Documentation, https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki
31
+ Project-URL: Homepage, https://github.com/XulbuX-dev/PythonLibraryXulbuX
32
+ Project-URL: License, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/LICENSE
33
+ Project-URL: Source Code, https://github.com/XulbuX-dev/PythonLibraryXulbuX/tree/main/src
34
+ Keywords: xulbux,python,library,utility,helper,functions,tools,classes,types,methods,cmd,code,color,data,structures,env,environment,file,format,json,path,regex,string,system,operations,presets
35
+ Classifier: Intended Audience :: Developers
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Classifier: License :: OSI Approved :: MIT License
41
+ Classifier: Operating System :: OS Independent
42
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
43
+ Requires-Python: >=3.10.0
44
+ Description-Content-Type: text/markdown
45
+ License-File: LICENSE
46
+ Requires-Dist: keyboard>=0.13.5
47
+ Requires-Dist: mouse>=0.7.1
48
+ Requires-Dist: pyperclip>=1.9.0
49
+ Requires-Dist: regex>=2023.10.3
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest>=7.4.2; extra == "dev"
52
+ Requires-Dist: black>=23.7.0; extra == "dev"
53
+ Requires-Dist: isort>=5.12.0; extra == "dev"
54
+ Requires-Dist: flake8>=6.1.0; extra == "dev"
55
+
56
+ # **$\color{#8085FF}\Huge\textsf{XulbuX}$**
57
+
58
+ **$\color{#8085FF}\textsf{XulbuX}$** is a library which includes a lot of really helpful classes, types and functions.
59
+
60
+ For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki).<br>
61
+ For the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md).
62
+
63
+
64
+ ## Installation
65
+
66
+ To install the library and all its dependencies, open a console and run the command:
67
+ ```prolog
68
+ pip install xulbux
69
+ ```
70
+
71
+ To upgrade the library to the latest available version, run the following command in your console:
72
+ ```prolog
73
+ pip install --upgrade xulbux
74
+ ```
75
+
76
+
77
+ ## Usage
78
+
79
+ Import the full library under the alias `xx`, so it's classes, types and functions are accessible with `xx.Class.method()`, `xx.type()` and `xx.function()`:
80
+ ```python
81
+ import xulbux as xx
82
+ ```
83
+ So you don't have to write `xx` in front of the library's types, you can import them directly:
84
+ ```python
85
+ from xulbux import rgba, hsla, hexa
86
+ ```
87
+
88
+
89
+ # Modules
90
+
91
+ | | |
92
+ | :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------- |
93
+ | <h3>[`xx_code`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_code)</h3> | advanced code-string operations (*changing the indent, finding function calls, ...*) |
94
+ | <h3>[`xx_color`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_color)</h3> | everything around colors (*converting, blending, searching colors in strings, ...*) |
95
+ | <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3> | advanced actions related to the console (*pretty logging, advanced inputs, ...*) |
96
+ | <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3> | advanced operations with data structures (*compare, generate path ID's, pretty print/format, ...*) |
97
+ | <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3> | getting and editing the PATH variable (*get paths, check for paths, add paths, ...*) |
98
+ | <h3>`xx_file`</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
99
+ | <h3>`xx_format_codes`</h3> | easy pretty printing with custom format codes (*print, inputs, custom format codes to ANSI, ...*) |
100
+ | <h3>`xx_json`</h3> | advanced working with json files (*read, create, update, ...*) |
101
+ | <h3>`xx_path`</h3> | advanced path operations (*get paths, smart-extend relative paths, delete paths, ...*) |
102
+ | <h3>`xx_regex`</h3> | generated regex pattern-templates (*match bracket- and quote pairs, match colors, ...*) |
103
+ | <h3>[`xx_string`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_string)</h3> | helpful actions when working with strings. (*normalize, escape, decompose, ...*) |
104
+ | <h3>`xx_system`</h3> | advanced system actions (*restart with message, check installed Python libs, ...*) |
105
+
106
+
107
+ <br>
108
+
109
+ --------------------------------------------------------------
110
+ [View this library on PyPI](https://pypi.org/project/XulbuX/)
@@ -0,0 +1,21 @@
1
+ xulbux/__init__.py,sha256=1I5Hbze_27gyM9k1JJ_JZdVUV8EM-7zQrNNpbvUtToE,1658
2
+ xulbux/_cli_.py,sha256=U25ZrtpQgpKXtvOSTBBbh7-AJ_WTeZ95A66DQARAqzo,3558
3
+ xulbux/_consts_.py,sha256=2-swueg8B5retfsAQqmR8nFNc06tqAwpL__TOv3V4kw,4882
4
+ xulbux/xx_code.py,sha256=dAksTh2Fw6-XTIGn8eEJVUlvJOsrWbctDZJDk4cs8FQ,5137
5
+ xulbux/xx_color.py,sha256=AqMqPCwDQZVQwkQUM0IOO47GzKNhKapoCwDifs-ewI8,44906
6
+ xulbux/xx_console.py,sha256=Xzl73_LTyt9AW09KAV9tsGdEdiltxPJwJq9nZChWrUQ,15482
7
+ xulbux/xx_data.py,sha256=cwjJeQHwf-b9yE6UTI0DO7US-hWtgTmIdvwKH5KKtmI,25969
8
+ xulbux/xx_env_path.py,sha256=ITdJ4DKh1zAvZrV5kph1z0jUDBhwEtOP4u1OKW0hMts,4309
9
+ xulbux/xx_file.py,sha256=nO2FtxqlBaW84L-qiTcQf16Im2xD-ZKPAytJDG4RCRw,2618
10
+ xulbux/xx_format_codes.py,sha256=NIleZ9TrXdF0i9UMCZP7ZI_k1ChJjYlHCFAcHZHHq2c,14891
11
+ xulbux/xx_json.py,sha256=1xAYBmpb4o8hOS_TaMQW2E5pZdE1YqbUdSJm-53wm-s,5054
12
+ xulbux/xx_path.py,sha256=KB1HGYCxFB3_T97RVACajy3-QiksbviZVIW9-iQcr4s,4558
13
+ xulbux/xx_regex.py,sha256=-dU1x4GDhFKEg0uQPT6uw9Yyo0vo7f98TtlicG9uBJo,7872
14
+ xulbux/xx_string.py,sha256=SC5Wn-rp601sre5cTFCVrvKeHr6v1Y_GIkqMcLWF4b0,7128
15
+ xulbux/xx_system.py,sha256=yehO57ggWDRJbeFoTE1VisW4QrbkqZzAyjKoL3xHx9k,3935
16
+ xulbux-1.5.9.dist-info/LICENSE,sha256=6NflEcvzFEe8_JFVNCPVwZBwBhlLLd4vqQi8WiX_Xk4,1084
17
+ xulbux-1.5.9.dist-info/METADATA,sha256=Exj7GULPxlgsB9PlaASWXeD9JX4wPmy1pnasSp7vR3A,6836
18
+ xulbux-1.5.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
19
+ xulbux-1.5.9.dist-info/entry_points.txt,sha256=a3womfLIMZKnOFiyy-xnVb4g2qkZsHR5FbKKkljcGns,94
20
+ xulbux-1.5.9.dist-info/top_level.txt,sha256=FkK4EZajwfP36fnlrPaR98OrEvZpvdEOdW1T5zTj6og,7
21
+ xulbux-1.5.9.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ xulbux-help = xulbux._cli_:help_command
3
+ xx-help = xulbux._cli_:help_command
@@ -0,0 +1 @@
1
+ xulbux
xulbux/xx_env_vars.py DELETED
@@ -1,73 +0,0 @@
1
- """
2
- Functions for modifying and checking the systems environment-variables:
3
- - `EnvVars.get_paths()`
4
- - `EnvVars.has_path()`
5
- - `EnvVars.add_path()`
6
- """
7
-
8
- from .xx_data import *
9
- from .xx_path import *
10
-
11
- import os as _os
12
-
13
-
14
- class EnvVars:
15
-
16
- @staticmethod
17
- def get_paths(as_list: bool = False) -> str | list:
18
- paths = _os.environ.get("PATH")
19
- return paths.split(_os.pathsep) if as_list else paths
20
-
21
- @staticmethod
22
- def has_path(path: str = None, cwd: bool = False, base_dir: bool = False) -> bool:
23
- if cwd:
24
- path = _os.getcwd()
25
- if base_dir:
26
- path = Path.get(base_dir=True)
27
- paths = EnvVars.get_paths()
28
- return path in paths
29
-
30
- @staticmethod
31
- def __add_sort_paths(add_path: str, current_paths: str) -> str:
32
- final_paths = Data.remove_empty_items(Data.remove_duplicates(f"{add_path};{current_paths}".split(_os.pathsep)))
33
- final_paths.sort()
34
- return f"{_os.pathsep.join(final_paths)};"
35
-
36
- @staticmethod
37
- def add_path(
38
- add_path: str = None,
39
- cwd: bool = False,
40
- base_dir: bool = False,
41
- persistent: bool = True,
42
- ) -> None:
43
- if cwd:
44
- add_path = _os.getcwd()
45
- if base_dir:
46
- add_path = Path.get(base_dir=True)
47
- if not EnvVars.has_path(add_path):
48
- final_paths = EnvVars.__add_sort_paths(add_path, EnvVars.get_paths())
49
- _os.environ["PATH"] = final_paths
50
- if persistent:
51
- if _os.name == "nt": # Windows
52
- try:
53
- import winreg as _winreg
54
-
55
- key = _winreg.OpenKey(
56
- _winreg.HKEY_CURRENT_USER,
57
- "Environment",
58
- 0,
59
- _winreg.KEY_ALL_ACCESS,
60
- )
61
- _winreg.SetValueEx(key, "PATH", 0, _winreg.REG_EXPAND_SZ, final_paths)
62
- _winreg.CloseKey(key)
63
- except ImportError:
64
- raise ImportError("Unable to make persistent changes on Windows.")
65
- else: # UNIX-LIKE (Linux/macOS)
66
- shell_rc_file = _os.path.expanduser(
67
- "~/.bashrc" if _os.path.exists(_os.path.expanduser("~/.bashrc")) else "~/.zshrc"
68
- )
69
- with open(shell_rc_file, "a") as f:
70
- f.write(f'\n# Added by XulbuX\nexport PATH="$PATH:{add_path}"\n')
71
- _os.system(f"source {shell_rc_file}")
72
- else:
73
- raise ValueError(f"{add_path} is already in PATH.")
@@ -1,101 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: XulbuX
3
- Version: 1.5.7
4
- Summary: A library which includes a lot of really helpful functions.
5
- Project-URL: Homepage, https://github.com/XulbuX-dev/PythonLibraryXulbuX
6
- Project-URL: Bug Reports, https://github.com/XulbuX-dev/PythonLibraryXulbuX/issues
7
- Project-URL: Documentation, https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki
8
- Project-URL: Source Code, https://github.com/XulbuX-dev/PythonLibraryXulbuX/tree/main/src
9
- Project-URL: Changelog, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md
10
- Author-email: XulbuX <xulbux.real@gmail.com>
11
- License: MIT License
12
-
13
- Copyright (c) 2024 XulbuX
14
-
15
- Permission is hereby granted, free of charge, to any person obtaining a copy
16
- of this software and associated documentation files (the "Software"), to deal
17
- in the Software without restriction, including without limitation the rights
18
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- copies of the Software, and to permit persons to whom the Software is
20
- furnished to do so, subject to the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be included in all
23
- copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- SOFTWARE.
32
- Keywords: classes,cmd,code,color,data,env,environment,file,format,functions,helper,json,library,methods,operations,path,presets,python,regex,string,structures,system,tools,types,utility,xulbux
33
- Classifier: Intended Audience :: Developers
34
- Classifier: License :: OSI Approved :: MIT License
35
- Classifier: Operating System :: OS Independent
36
- Classifier: Programming Language :: Python :: 3
37
- Classifier: Programming Language :: Python :: 3.10
38
- Classifier: Programming Language :: Python :: 3.11
39
- Classifier: Programming Language :: Python :: 3.12
40
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
41
- Requires-Python: >=3.10.0
42
- Requires-Dist: keyboard>=0.13.5
43
- Requires-Dist: mouse>=0.7.1
44
- Requires-Dist: pyperclip>=1.9.0
45
- Requires-Dist: regex>=2023.10.3
46
- Provides-Extra: dev
47
- Requires-Dist: black>=23.7.0; extra == 'dev'
48
- Requires-Dist: flake8>=6.1.0; extra == 'dev'
49
- Requires-Dist: isort>=5.12.0; extra == 'dev'
50
- Requires-Dist: pytest>=7.4.2; extra == 'dev'
51
- Description-Content-Type: text/markdown
52
-
53
- # **$\color{#8085FF}\Huge\textsf{XulbuX}$**
54
-
55
- **$\color{#8085FF}\textsf{XulbuX}$** is a library which includes a lot of really helpful classes, types and functions.
56
-
57
- For the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md).<br>
58
- For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki).
59
-
60
-
61
- ## Installation
62
-
63
- On all operating systems, run the following command:
64
- ```bash
65
- pip install XulbuX
66
- ```
67
-
68
-
69
- ## Usage
70
-
71
- ```python
72
- # GENERAL LIBRARY
73
- import XulbuX as xx
74
- # CUSTOM TYPES
75
- from XulbuX import rgba, hsla, hexa
76
- ```
77
- The library **$\color{#8085FF}\textsf{XulbuX}$** (*below used as* `xx` *with above imported types*) contains the following modules:
78
- ```python
79
- • CUSTOM TYPES:
80
- • rgba(int,int,int,float)
81
- • hsla(int,int,int,float)
82
- • hexa(str)
83
- • PATH OPERATIONS xx.Path
84
- • FILE OPERATIONS xx.File
85
- • JSON FILE OPERATIONS xx.Json
86
- • SYSTEM ACTIONS xx.System
87
- • MANAGE ENVIRONMENT VARS xx.EnvVars
88
- • CMD LOG AND ACTIONS xx.Cmd
89
- • PRETTY PRINTING xx.FormatCodes
90
- • COLOR OPERATIONS xx.Color
91
- • DATA OPERATIONS xx.Data
92
- • STR OPERATIONS xx.String
93
- • CODE STRING OPERATIONS xx.Code
94
- • REGEX PATTERN TEMPLATES xx.Regex
95
- ```
96
-
97
-
98
- <br>
99
-
100
- --------------------------------------------------------------
101
- [View this library on PyPI](https://pypi.org/project/XulbuX/)
@@ -1,20 +0,0 @@
1
- xulbux/__init__.py,sha256=h6v5Ld_jy1LeTD8hZLfOZUIljUScCRu1FnHRJP1Dp54,1660
2
- xulbux/_cli_.py,sha256=W6qLGAY5F17bVDCkgtU-XOwqe_UyXBxBonW8e0Gso74,3437
3
- xulbux/_consts_.py,sha256=HqBCzFYSk9LS2TrxPCQBQcEjEB8McLodH4ZGZ8yP3Ec,4858
4
- xulbux/xx_cmd.py,sha256=K8U96QSAbLgDG65zIQdniSFtJUqUgKoaHhxgyaq5qBQ,15315
5
- xulbux/xx_code.py,sha256=PDZi1HNzGfEfoI646N5FQOAL3nZ7cE8eETmW6pl-szA,5146
6
- xulbux/xx_color.py,sha256=sUZKZdx6dMNL48G5o_SHYMnYPx3sbGoGiu6NpeJkPSw,44053
7
- xulbux/xx_data.py,sha256=2lYt0kiZxgqqA0e8u8k6VQr8juVzrZRAgio4ehUteSc,27876
8
- xulbux/xx_env_vars.py,sha256=nJQtddsfDo2HDG1vzmcmz2h79N3jV-J-fLayGpASRUE,2706
9
- xulbux/xx_file.py,sha256=pQrTsTvaa8tBHOrN9pu2r7qxi8Wzon5V43TfVGitxko,2608
10
- xulbux/xx_format_codes.py,sha256=OqzegaaiLJ09id6LI842bH4oyXOXbVrBM5q5jh6-z7I,13562
11
- xulbux/xx_json.py,sha256=wAIwC5IO8oepsYoF1tN5c4DOjSBvT2HZakUxmA-F3BE,5050
12
- xulbux/xx_path.py,sha256=KB1HGYCxFB3_T97RVACajy3-QiksbviZVIW9-iQcr4s,4558
13
- xulbux/xx_regex.py,sha256=yTGtNtuW2Cng714iuwxWz9wDN3Bw06rzXfPUVvfiXvk,7159
14
- xulbux/xx_string.py,sha256=znfeRrAu8OA3Dd0cmMsOm2zXZKzudS4ZuH2Pny2ulEw,6212
15
- xulbux/xx_system.py,sha256=yehO57ggWDRJbeFoTE1VisW4QrbkqZzAyjKoL3xHx9k,3935
16
- xulbux-1.5.7.dist-info/METADATA,sha256=dLdhkqGBSyklBIzk_A4zgViiXfxTKoPlYuWigz_rr-0,4336
17
- xulbux-1.5.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
18
- xulbux-1.5.7.dist-info/entry_points.txt,sha256=KX2dtQr5OW5WdHcNqgj6rxFTqliIBNcNQq_FBOGS-0A,94
19
- xulbux-1.5.7.dist-info/licenses/LICENSE,sha256=6NflEcvzFEe8_JFVNCPVwZBwBhlLLd4vqQi8WiX_Xk4,1084
20
- xulbux-1.5.7.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- xulbux-help = XulbuX._cli_:help_command
3
- xx-help = XulbuX._cli_:help_command