kingkybel-pyprocess 2.0.0__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.
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: kingkybel-pyprocess
3
+ Version: 2.0.0
4
+ Summary: Comprehensive Python utility library for file system operations and process management
5
+ Author-email: Dieter J Kybelksties <github@kybelksties.com>
6
+ Maintainer-email: Dieter J Kybelksties <github@kybelksties.com>
7
+ License-Expression: GPL-2.0-only
8
+ Project-URL: Homepage, https://github.com/kingkybel/PyProcess
9
+ Project-URL: Documentation, https://github.com/kingkybel/PyProcess#readme
10
+ Project-URL: Repository, https://github.com/kingkybel/PyProcess
11
+ Project-URL: Issues, https://github.com/kingkybel/PyProcess/issues
12
+ Project-URL: Changelog, https://github.com/kingkybel/PyProcess/blob/main/CHANGELOG.md
13
+ Keywords: filesystem,process,utilities,path,subprocess
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: System :: Filesystems
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ Requires-Dist: psutil>=5.0.0
28
+ Requires-Dist: kingkybel-pyflashlogger>=2.2.0
29
+ Requires-Dist: kingkybel-pyfundamentals>=0.1.1
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: black; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Provides-Extra: docs
35
+ Requires-Dist: sphinx; extra == "docs"
36
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
37
+ Provides-Extra: build
38
+ Requires-Dist: build; extra == "build"
39
+ Requires-Dist: twine; extra == "build"
40
+
41
+ ![PyProcess banner](assets/banners/pyprocess-banner.svg)
42
+ # kingkybel-pyprocess
43
+
44
+ Comprehensive Python utility library for file system operations and process management.
45
+
46
+ ## Features
47
+
48
+ - 📂 **File System Operations**: Robust implementations of `mkdir`, `touch`, `remove`, and `symbolic_link` with glob support
49
+ - 🛡️ **Path Protection**: Absolute path validation with automatic protection of critical Linux system directories
50
+ - 🥞 **Directory Stack**: `pushd` and `popd` functionality for clean working directory management
51
+ - 🔍 **Advanced Finding**: Flexible `find` utility with type filtering, name patterns, exclusion, and sorting
52
+ - 📝 **File Utilities**: Easy `read_file` and `write_file` operations with automatic directory creation
53
+ - ⚙️ **Env Parsing**: Simple `.env` file parser for configuration management
54
+ - 🚀 **Process Management**: Run standard and interactive commands with real-time output monitoring and thread-safe capture
55
+ - 🌐 **Network Tools**: Simple `ping` implementation and IP retrieval
56
+ - 🛠️ **Tool Validation**: Check for installed system tools and versions
57
+ - 🪵 **Logger Integration**: Built-in support for `PyFlashLogger` for command and error logging
58
+ - ✅ **Comprehensive Testing**: Robust test suite using Python's `unittest` framework
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ pip install kingkybel-pyprocess
64
+ ```
65
+
66
+ Or from source:
67
+ ```bash
68
+ git clone https://github.com/kingkybel/PyProcess.git
69
+ cd PyProcess
70
+ pip install -e .
71
+ ```
72
+
73
+ ## Quick Start
74
+
75
+ ### File System Operations
76
+
77
+ ```python
78
+ from pyprocess import mkdir, touch, remove, pushdir, popdir
79
+
80
+ # Create directories and files
81
+ mkdir("path/to/my/project")
82
+ touch("path/to/my/project/config.ini")
83
+
84
+ # Directory stack management
85
+ pushdir("path/to/my/project")
86
+ # ... do something ...
87
+ popdir()
88
+
89
+ # Clean up
90
+ remove("path/to/my/project")
91
+ ```
92
+
93
+ ### Process Management
94
+
95
+ ```python
96
+ from pyprocess import run_command, run_interactive_command
97
+
98
+ # Run a simple command
99
+ reval, stdout, stderr = run_command("ls -la", cwd="/tmp")
100
+
101
+ # Run an interactive command (e.g., top, vim)
102
+ run_interactive_command("top")
103
+ ```
104
+
105
+ ### Advanced Finding
106
+
107
+ ```python
108
+ from pyprocess import find, FileSystemObjectType, FindSortField
109
+
110
+ # Find all python files, sorted by name
111
+ py_files = find(
112
+ paths=".",
113
+ file_type_filter=FileSystemObjectType.FILE,
114
+ name_patterns="*.py",
115
+ sort_field=FindSortField.BY_NAME
116
+ )
117
+ ```
118
+
119
+ ## Releasing to PyPI
120
+
121
+ 1. Bump the package version in `pyprocess/__init__.py` (`__version__`).
122
+ 2. Clean old build artifacts:
123
+ ```bash
124
+ rm -rf build dist *.egg-info
125
+ ```
126
+ 3. Build distributions:
127
+ ```bash
128
+ python -m build
129
+ ```
130
+ 4. Upload to TestPyPI first (recommended):
131
+ ```bash
132
+ python -m twine upload --repository testpypi dist/*
133
+ ```
134
+ 5. Upload to PyPI:
135
+ ```bash
136
+ python -m twine upload dist/*
137
+ ```
138
+
139
+ ## License
140
+
141
+ GPLv2 - See the LICENSE file for details.
142
+
143
+ ## Contributing
144
+
145
+ Contributions welcome! Please open issues for bugs or feature requests.
146
+
147
+ 1. Fork the repository
148
+ 2. Create a feature branch
149
+ 3. Make your changes
150
+ 4. Add tests if applicable
151
+ 5. Submit a pull request
@@ -0,0 +1,111 @@
1
+ ![PyProcess banner](assets/banners/pyprocess-banner.svg)
2
+ # kingkybel-pyprocess
3
+
4
+ Comprehensive Python utility library for file system operations and process management.
5
+
6
+ ## Features
7
+
8
+ - 📂 **File System Operations**: Robust implementations of `mkdir`, `touch`, `remove`, and `symbolic_link` with glob support
9
+ - 🛡️ **Path Protection**: Absolute path validation with automatic protection of critical Linux system directories
10
+ - 🥞 **Directory Stack**: `pushd` and `popd` functionality for clean working directory management
11
+ - 🔍 **Advanced Finding**: Flexible `find` utility with type filtering, name patterns, exclusion, and sorting
12
+ - 📝 **File Utilities**: Easy `read_file` and `write_file` operations with automatic directory creation
13
+ - ⚙️ **Env Parsing**: Simple `.env` file parser for configuration management
14
+ - 🚀 **Process Management**: Run standard and interactive commands with real-time output monitoring and thread-safe capture
15
+ - 🌐 **Network Tools**: Simple `ping` implementation and IP retrieval
16
+ - 🛠️ **Tool Validation**: Check for installed system tools and versions
17
+ - 🪵 **Logger Integration**: Built-in support for `PyFlashLogger` for command and error logging
18
+ - ✅ **Comprehensive Testing**: Robust test suite using Python's `unittest` framework
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ pip install kingkybel-pyprocess
24
+ ```
25
+
26
+ Or from source:
27
+ ```bash
28
+ git clone https://github.com/kingkybel/PyProcess.git
29
+ cd PyProcess
30
+ pip install -e .
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ### File System Operations
36
+
37
+ ```python
38
+ from pyprocess import mkdir, touch, remove, pushdir, popdir
39
+
40
+ # Create directories and files
41
+ mkdir("path/to/my/project")
42
+ touch("path/to/my/project/config.ini")
43
+
44
+ # Directory stack management
45
+ pushdir("path/to/my/project")
46
+ # ... do something ...
47
+ popdir()
48
+
49
+ # Clean up
50
+ remove("path/to/my/project")
51
+ ```
52
+
53
+ ### Process Management
54
+
55
+ ```python
56
+ from pyprocess import run_command, run_interactive_command
57
+
58
+ # Run a simple command
59
+ reval, stdout, stderr = run_command("ls -la", cwd="/tmp")
60
+
61
+ # Run an interactive command (e.g., top, vim)
62
+ run_interactive_command("top")
63
+ ```
64
+
65
+ ### Advanced Finding
66
+
67
+ ```python
68
+ from pyprocess import find, FileSystemObjectType, FindSortField
69
+
70
+ # Find all python files, sorted by name
71
+ py_files = find(
72
+ paths=".",
73
+ file_type_filter=FileSystemObjectType.FILE,
74
+ name_patterns="*.py",
75
+ sort_field=FindSortField.BY_NAME
76
+ )
77
+ ```
78
+
79
+ ## Releasing to PyPI
80
+
81
+ 1. Bump the package version in `pyprocess/__init__.py` (`__version__`).
82
+ 2. Clean old build artifacts:
83
+ ```bash
84
+ rm -rf build dist *.egg-info
85
+ ```
86
+ 3. Build distributions:
87
+ ```bash
88
+ python -m build
89
+ ```
90
+ 4. Upload to TestPyPI first (recommended):
91
+ ```bash
92
+ python -m twine upload --repository testpypi dist/*
93
+ ```
94
+ 5. Upload to PyPI:
95
+ ```bash
96
+ python -m twine upload dist/*
97
+ ```
98
+
99
+ ## License
100
+
101
+ GPLv2 - See the LICENSE file for details.
102
+
103
+ ## Contributing
104
+
105
+ Contributions welcome! Please open issues for bugs or feature requests.
106
+
107
+ 1. Fork the repository
108
+ 2. Create a feature branch
109
+ 3. Make your changes
110
+ 4. Add tests if applicable
111
+ 5. Submit a pull request
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: kingkybel-pyprocess
3
+ Version: 2.0.0
4
+ Summary: Comprehensive Python utility library for file system operations and process management
5
+ Author-email: Dieter J Kybelksties <github@kybelksties.com>
6
+ Maintainer-email: Dieter J Kybelksties <github@kybelksties.com>
7
+ License-Expression: GPL-2.0-only
8
+ Project-URL: Homepage, https://github.com/kingkybel/PyProcess
9
+ Project-URL: Documentation, https://github.com/kingkybel/PyProcess#readme
10
+ Project-URL: Repository, https://github.com/kingkybel/PyProcess
11
+ Project-URL: Issues, https://github.com/kingkybel/PyProcess/issues
12
+ Project-URL: Changelog, https://github.com/kingkybel/PyProcess/blob/main/CHANGELOG.md
13
+ Keywords: filesystem,process,utilities,path,subprocess
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: System :: Filesystems
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ Requires-Dist: psutil>=5.0.0
28
+ Requires-Dist: kingkybel-pyflashlogger>=2.2.0
29
+ Requires-Dist: kingkybel-pyfundamentals>=0.1.1
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: black; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Provides-Extra: docs
35
+ Requires-Dist: sphinx; extra == "docs"
36
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
37
+ Provides-Extra: build
38
+ Requires-Dist: build; extra == "build"
39
+ Requires-Dist: twine; extra == "build"
40
+
41
+ ![PyProcess banner](assets/banners/pyprocess-banner.svg)
42
+ # kingkybel-pyprocess
43
+
44
+ Comprehensive Python utility library for file system operations and process management.
45
+
46
+ ## Features
47
+
48
+ - 📂 **File System Operations**: Robust implementations of `mkdir`, `touch`, `remove`, and `symbolic_link` with glob support
49
+ - 🛡️ **Path Protection**: Absolute path validation with automatic protection of critical Linux system directories
50
+ - 🥞 **Directory Stack**: `pushd` and `popd` functionality for clean working directory management
51
+ - 🔍 **Advanced Finding**: Flexible `find` utility with type filtering, name patterns, exclusion, and sorting
52
+ - 📝 **File Utilities**: Easy `read_file` and `write_file` operations with automatic directory creation
53
+ - ⚙️ **Env Parsing**: Simple `.env` file parser for configuration management
54
+ - 🚀 **Process Management**: Run standard and interactive commands with real-time output monitoring and thread-safe capture
55
+ - 🌐 **Network Tools**: Simple `ping` implementation and IP retrieval
56
+ - 🛠️ **Tool Validation**: Check for installed system tools and versions
57
+ - 🪵 **Logger Integration**: Built-in support for `PyFlashLogger` for command and error logging
58
+ - ✅ **Comprehensive Testing**: Robust test suite using Python's `unittest` framework
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ pip install kingkybel-pyprocess
64
+ ```
65
+
66
+ Or from source:
67
+ ```bash
68
+ git clone https://github.com/kingkybel/PyProcess.git
69
+ cd PyProcess
70
+ pip install -e .
71
+ ```
72
+
73
+ ## Quick Start
74
+
75
+ ### File System Operations
76
+
77
+ ```python
78
+ from pyprocess import mkdir, touch, remove, pushdir, popdir
79
+
80
+ # Create directories and files
81
+ mkdir("path/to/my/project")
82
+ touch("path/to/my/project/config.ini")
83
+
84
+ # Directory stack management
85
+ pushdir("path/to/my/project")
86
+ # ... do something ...
87
+ popdir()
88
+
89
+ # Clean up
90
+ remove("path/to/my/project")
91
+ ```
92
+
93
+ ### Process Management
94
+
95
+ ```python
96
+ from pyprocess import run_command, run_interactive_command
97
+
98
+ # Run a simple command
99
+ reval, stdout, stderr = run_command("ls -la", cwd="/tmp")
100
+
101
+ # Run an interactive command (e.g., top, vim)
102
+ run_interactive_command("top")
103
+ ```
104
+
105
+ ### Advanced Finding
106
+
107
+ ```python
108
+ from pyprocess import find, FileSystemObjectType, FindSortField
109
+
110
+ # Find all python files, sorted by name
111
+ py_files = find(
112
+ paths=".",
113
+ file_type_filter=FileSystemObjectType.FILE,
114
+ name_patterns="*.py",
115
+ sort_field=FindSortField.BY_NAME
116
+ )
117
+ ```
118
+
119
+ ## Releasing to PyPI
120
+
121
+ 1. Bump the package version in `pyprocess/__init__.py` (`__version__`).
122
+ 2. Clean old build artifacts:
123
+ ```bash
124
+ rm -rf build dist *.egg-info
125
+ ```
126
+ 3. Build distributions:
127
+ ```bash
128
+ python -m build
129
+ ```
130
+ 4. Upload to TestPyPI first (recommended):
131
+ ```bash
132
+ python -m twine upload --repository testpypi dist/*
133
+ ```
134
+ 5. Upload to PyPI:
135
+ ```bash
136
+ python -m twine upload dist/*
137
+ ```
138
+
139
+ ## License
140
+
141
+ GPLv2 - See the LICENSE file for details.
142
+
143
+ ## Contributing
144
+
145
+ Contributions welcome! Please open issues for bugs or feature requests.
146
+
147
+ 1. Fork the repository
148
+ 2. Create a feature branch
149
+ 3. Make your changes
150
+ 4. Add tests if applicable
151
+ 5. Submit a pull request
@@ -0,0 +1,16 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ kingkybel_pyprocess.egg-info/PKG-INFO
5
+ kingkybel_pyprocess.egg-info/SOURCES.txt
6
+ kingkybel_pyprocess.egg-info/dependency_links.txt
7
+ kingkybel_pyprocess.egg-info/not-zip-safe
8
+ kingkybel_pyprocess.egg-info/requires.txt
9
+ kingkybel_pyprocess.egg-info/top_level.txt
10
+ pyprocess/__init__.py
11
+ pyprocess/file_system_object.py
12
+ pyprocess/file_utils.py
13
+ pyprocess/processes.py
14
+ test/test_file_system_object.py
15
+ test/test_file_utils.py
16
+ test/test_processes.py
@@ -0,0 +1,16 @@
1
+ psutil>=5.0.0
2
+ kingkybel-pyflashlogger>=2.2.0
3
+ kingkybel-pyfundamentals>=0.1.1
4
+
5
+ [build]
6
+ build
7
+ twine
8
+
9
+ [dev]
10
+ pytest
11
+ black
12
+ mypy
13
+
14
+ [docs]
15
+ sphinx
16
+ sphinx-rtd-theme
@@ -0,0 +1,3 @@
1
+ assets
2
+ dist
3
+ pyprocess
@@ -0,0 +1,6 @@
1
+ from .file_utils import *
2
+ from .__init__ import *
3
+ from .file_system_object import *
4
+ from .processes import *
5
+
6
+ __version__ = "2.0.0"