Skip to main content

Epycs is a simple way to convert shell scripts to python

Project description

Epycs

Epycs is a simple way to convert shell scripts to python. It features

  • A simple subprocess API
  • A sane behaviour of exiting by default on subprocess failures
  • A show-output-on-fail behaviour

The goal of this package is to be able to write shell-script equivalent code in python while still being terse, but adding a tons of goodness in terms of arithmetical expression, string manipulation, code reuse etc...

Say no to .sh and welcome .py with epycs, you'll thank me later.

Changelog

  • v1.5.0

epycs.cmd directly accessible

ShellProgram.add supports kwargs, deprecated other methods, they will be removed in a future version.

ShellProgram.env(name=value) for setting additional environment variables

tox testing on python 3.7 to 3.13

Various CI fixes

Using UV for package management

  • v1.4.0

Improved handling of additional environment (allows any str-convertible, and providing None deletes the env var)

Added new python_to_subprocess function, which turns a local python function to a full-fledged subprocess, allowing for pure-python piping.

  • v1.3.0

Added sourcing of shell scripts

Added new out_filter=text_lines_0 that splits by NUL character

  • v1.2.0

Added epycs.config for lightweight user-defined config management

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

epycs-1.5.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

epycs-1.5.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file epycs-1.5.0.tar.gz.

File metadata

  • Download URL: epycs-1.5.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.5

File hashes

Hashes for epycs-1.5.0.tar.gz
Algorithm Hash digest
SHA256 4eaf4493c242327f5988663ff24e719c02f1051414de1ed92b8a0efb3926693d
MD5 263762ce4740b4b53fd4349fde572e1a
BLAKE2b-256 17216925a3cc48df2650d4351d17d05faa105de2d8bf0e210c50b83bdae81db2

See more details on using hashes here.

File details

Details for the file epycs-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: epycs-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.5

File hashes

Hashes for epycs-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79a99b197eb251f80fd0a42bb54404e170c030e0df3698402f4037ac07ce9878
MD5 0cd23ee2b0670e0995595cf94bde897c
BLAKE2b-256 5001aa81bef60e1aa2ce606ba7c86f7119ed6e1e3bf30a9e8b33a507681847c8

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