Skip to main content

Simple and easy-to-use library for executing shell commands saving data to the file system without re-executing already executed tasks.

Project description

Ey

A super-simple library for performing stepwise batch tasks that saves things to files, such that outputs from already finished tasks are not needlessly re-computed.

Prerequisites

  • Ey is so far only tested on unix-like environments.

Installation

Install from the Python Package Index using pip:

pip install ey

Example:

Below is a small example that downloads a gzipped text file (in the so called FASTA format), and un-gzips it:

import ey

# Download a gzipped fasta file and save it as chrmt.fa.gz
url = 'ftp://ftp.ensembl.org/pub/release-100/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.chromosome.MT.fa.gz'
gz = ey.shell('wget -O [o:gz:chrmt.fa.gz] '+url)

# Un-GZip the file, into a file named chrmt.fa
fa = ey.shell('zcat [i:gz] > [o:fa:[i:gz|%.gz]]',
        inputs={'gz': gz.outputs['gz']})

Add this code to a file named download_fasta.py and run it with:

python download_fasta.py

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

ey-0.1.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

ey-0.1.1-py3-none-any.whl (3.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