kingkybel-pyprocess
Comprehensive Python utility library for file system operations and process management.
Features
- 📂 File System Operations: Robust implementations of
mkdir,touch,remove, andsymbolic_linkwith glob support - 🛡️ Path Protection: Absolute path validation with automatic protection of critical Linux system directories
- 🥞 Directory Stack:
pushdandpopdfunctionality for clean working directory management - 🔍 Advanced Finding: Flexible
findutility with type filtering, name patterns, exclusion, and sorting - 📝 File Utilities: Easy
read_fileandwrite_fileoperations with automatic directory creation - ⚙️ Env Parsing: Simple
.envfile parser for configuration management - 🚀 Process Management: Run standard and interactive commands with real-time output monitoring and thread-safe capture
- 🌐 Network Tools: Simple
pingimplementation and IP retrieval - 🛠️ Tool Validation: Check for installed system tools and versions
- 🪵 Logger Integration: Built-in support for
PyFlashLoggerfor command and error logging - ✅ Comprehensive Testing: Robust test suite using Python's
unittestframework
Installation
pip install kingkybel-pyprocess
Or from source:
git clone https://github.com/kingkybel/PyProcess.git
cd PyProcess
pip install -e .
Quick Start
File System Operations
from pyprocess import mkdir, touch, remove, pushdir, popdir
# Create directories and files
mkdir("path/to/my/project")
touch("path/to/my/project/config.ini")
# Directory stack management
pushdir("path/to/my/project")
# ... do something ...
popdir()
# Clean up
remove("path/to/my/project")
Process Management
from pyprocess import run_command, run_interactive_command
# Run a simple command
reval, stdout, stderr = run_command("ls -la", cwd="/tmp")
# Run an interactive command (e.g., top, vim)
run_interactive_command("top")
Advanced Finding
from pyprocess import find, FileSystemObjectType, FindSortField
# Find all python files, sorted by name
py_files = find(
paths=".",
file_type_filter=FileSystemObjectType.FILE,
name_patterns="*.py",
sort_field=FindSortField.BY_NAME
)
Releasing to PyPI
- Bump the package version in
pyprocess/__init__.py(__version__). - Clean old build artifacts:
rm -rf build dist *.egg-info
- Build distributions:
python -m build
- Upload to TestPyPI first (recommended):
python -m twine upload --repository testpypi dist/*
- Upload to PyPI:
python -m twine upload dist/*
License
GPLv2 - See the LICENSE file for details.
Contributing
Contributions welcome! Please open issues for bugs or feature requests.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Metadata
Release files for kingkybel-pyprocess 2.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kingkybel_pyprocess-2.0.3.tar.gz | 21.0 kB | Without provenance | Details for kingkybel_pyprocess-2.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kingkybel_pyprocess-2.0.3-py3-none-any.whl | Python 3 | none | any | Details for kingkybel_pyprocess-2.0.3-py3-none-any.whl |
Total release size: 35.5 kB
Release files / kingkybel_pyprocess-2.0.3.tar.gz
| Download URL | kingkybel_pyprocess-2.0.3.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cca53644fc9b99fc7bcae9b366897417c785d9317c7e5c670b10ba69e3091ba
|
|
BLAKE2b-256 checksum How to use checksums |
9fcffdd85401bf21077a3f6b94e4b4d17b8bcf2cfe5c717aa68133b44903aadb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / kingkybel_pyprocess-2.0.3-py3-none-any.whl
| Download URL | kingkybel_pyprocess-2.0.3-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6181453df4d5479d562d8192db0b36abd366cfcabbbad8a0a615fb0b6668716
|
|
BLAKE2b-256 checksum How to use checksums |
87d34f816fed87cfb3e6ada2810b0114c2550d310b9fb26a55af26211e9e0b42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for kingkybel-pyprocess 2.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.