Add your description here
Project description
CapsuleCore shellback
Shellback is a robust, architecturally-agnostic Python library designed to bridge terminal environments (Bash, CMD, PowerShell) with Python scripts. It provides a clean, decoupled abstraction layer to execute system commands while maintaining persistent session state and cross-platform compatibility.
Built with Hexagonal Architecture (Ports and Adapters) principles, Shellback ensures that your domain logic remains independent of the specific shell or operating system being used.
Usage
from CapsuleCore_shellback import Bash, ConsoleLogger,Command
logger = ConsoleLogger()
mkdir = Command("mkdir").add_args("dir")
with Bash(logger=logger) as sh:
result = sh.run(mkdir)
if result.is_success():
print("Directory created successfully.")
else:
print("Error creating directory.")
Key Features
Agnostic Design: Decouple your application logic from the underlying shell implementation.
Persistent Session State: Maintain working directories (cwd), environment variables, and encodings across multiple executions using SessionContext.
Fluent Command Builder: Construct complex commands with a declarative and chainable API via ArgumentBuilder and Command.
Safe Execution: Automatic validation of executables in the system PATH before execution.
Flexible Logging: Swappable logging backends (Console, Null, or custom) using the Strategy and Null Object patterns.
Pipe-like Syntax: Easy integration between command results using the | operator.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capsulecore_shellback-0.2.0.tar.gz.
File metadata
- Download URL: capsulecore_shellback-0.2.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d260d3b4e8c045c7bd5d9c049152e871fef90d23a0f0bb2a38e2c1a19a8c24f1
|
|
| MD5 |
48aaa6521aeb430aa1e95dfbe00f39b9
|
|
| BLAKE2b-256 |
5562dc83e3a3c700154fc1b96e200b766d4f1d5451af5d4d318b31137a77eaf9
|
File details
Details for the file capsulecore_shellback-0.2.0-py3-none-any.whl.
File metadata
- Download URL: capsulecore_shellback-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f3c5cd7d2215829bafc2511e13100dbfe5b1f2abe48c5a0e82929b07508327
|
|
| MD5 |
f107c993f587e4810a45fb5d6c0708f2
|
|
| BLAKE2b-256 |
2cb7e21512fe38938c36ed2758193d27ab96b7bdf01b7e73ff3b5cb4a347459a
|