Skip to main content

UNIX command-line tool for python line-based stream processing

Project description

Author: Pahaz Blinov

Repo: https://github.com/pahaz/py3line/

Pyline is a UNIX command-line tool for line-based processing in Python with regex and output transform features similar to grep, sed, and awk.

This project inspired by: piep, pysed, pyline, pyp and Jacob+Mark recipe

requirements: Python3

WHY I MAKE IT?

I sometimes have to use sed / awk. Not often, and so I always forget the necessary options and sed / awk DSL. But I now python, I like it, and I want use it for data processing. Default python -c is hard to write the kind of one-liner that works well.

Why not a pyline?
  • Don`t support python3

  • Have many options (I want as much simple as possible solution)

  • Bad performance

  • Don`t support command chaining

Why not a pysed?

Installation

py3line is on PyPI, so simply run:

pip install py3line

or

easy_install py3line

to have it installed in your environment.

For installing from source, clone the repo and run:

python setup.py install

Usage scenarios

Examples

Example 1: create spreadsheet

$ echo -e "Here are\nsome\nwords for you." | ./py3line.py "x.split()" -a "len(x)"
2
1
3

DOCS

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

py3line-0.0.1.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file py3line-0.0.1.tar.gz.

File metadata

  • Download URL: py3line-0.0.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3line-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c598d951c8daf070032454ad4944f9fbcadba414bd5105a1f4f722676ecafd73
MD5 c7e8b091aee0b6917919a6234ab49426
BLAKE2b-256 28cd5fe6a799ead4aa1430a0f42ea6e6c3ac116b73902140950ad85e8d91cafc

See more details on using hashes here.

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