Skip to main content

General utilities on top of Python standard libraries

Project description

utils-core

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.

Source Distribution

utils-core-0.1.2.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

utils_core-0.1.2-py3-none-any.whl (7.6 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