Skip to main content

General utilities on top of Python standard libraries

Project description


General utilities on top of Python standard libraries.

Examples for process-related utilities:

from utils.process import run, silent_run

run('ls -l')
out = run(['ls', '-l'], return_output=True)

# Just runs without any output to stdout. Alias for: run(..., silent=True)
silent_run('ls -l')

Examples for filesystem-related utilities:

import os

from utils.fs import in_dir, in_temp_dir

with in_temp_dir() as tmpdir:
    assert os.getcwd() == tmpdir

with in_dir('/tmp'):
    assert os.getcwd() == '/tmp'

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
utils_core-0.0.5-py3-none-any.whl (5.3 kB) Copy SHA256 hash SHA256 Wheel py3
utils-core-0.0.5.tar.gz (6.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page