Skip to main content

Removes the boilierplate when working with shells in python.

Reason this release was yanked:

Project description

QuickShell: Simplify Shell Command Execution in Python

PyPI - Version License: MIT Python 3.8+

QuickShell is a simple Python library designed to remove the boilerplate when dealing with shell commands.

Key Features

  • Asynchronous Execution: Run shell commands asynchronously using asyncio.
  • Flexible Output Handling: Easily print and capture command output and errors.

Installation

Get started with QuickShell by installing it via pip:

pip install quickshell

Usage

use QuickShell to quickly run a command:

import asyncio
from quickshell import run_shell

async def main():
    cmd = 'echo Hello from the shell!'
    stdout, stderr = await run_shell(cmd, print_output=True) # Output: Hello from the shell!
    
if __name__ == '__main__':
    asyncio.run(main())

Explanation

  • Importing the Library: the run_shell function is imported from the quickshell library.
  • Define the Command: Replace "dir" with the shell command you want to execute.
  • Running the Command: The run_shell function executes the command asynchronously and captures its output.
  • Printing the Output: Set print_output=True to print the live output and errors from the shell.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quickshell-1.1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quickshell-1.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file quickshell-1.1.0.tar.gz.

File metadata

  • Download URL: quickshell-1.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for quickshell-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9f86b1405daac276c7d7a61e55f4c792c11226e3f701d5665e8276e7efdc5578
MD5 6799ab1b605aff7c9e22bcb074ffb946
BLAKE2b-256 74ef2ef33b5afc08247c86319a7616902f57fc38e906751d8f5e8e68edccd96b

See more details on using hashes here.

File details

Details for the file quickshell-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quickshell-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa94e6abf0b3106c349337a0d16eeb50e7fcd3d3bf6114314a703c54026a0876
MD5 989cb59333bd258e5334540a9ad1a2ff
BLAKE2b-256 8d0dcec94b61d4c143cf8534a4c031e443aa73c00bed489879781724c573d04b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page