Skip to main content

Shell helper utilities for python

Project description

gripe    
Shell-util library for python.
Includes helpers for subprocess invocation, shell-formatters / pretty-printers, and more.


Overview

The gripe library provides various shell-utilities for python.


Features

Shell-formatters / pretty-printers

Subprocess Invocation

There's a lot of shell-related libraries out there, especially for invocation (see for example this list). The interface for gripe is hopefully unsurprising, and something that's convenient but not fancy. It's a utility, and not a huge framework.

The main goal is to provide an API that is simple and stable, without a ton of dependencies.

>>> import gripe 
>>> proc = gripe.invoke('echo hello world')
>>> assert proc.succeeded
>>> assert proc.stdout.strip()=='hello world'
>>>

Beyond such basics, gripe includes support for rich output and uses pydantic for datastructures.

See the API docs for more detailed information.


Installation

See pypi for available releases.

$ pip install gripe

Usage (CLI)

The gripe library publishes a small CLI tool, mostly just for testing & demoing the API behaviour. See the CLI docs for the latest (autogenerated) help.


Usage (API)

See also:

OOP-style Dispatch

This uses gripe.Invocation and returns gripe.InvocationResponse.

>>> import gripe 

Loading data when command-output is JSON

>>> import gripe 
>>> 

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

gripe-2024.2.12.22.43.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

gripe-2024.2.12.22.43-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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