Skip to main content

pyplyn: One-way only pipeline for data handling

https://badge.fury.io/py/pyplyn.svg https://pypip.in/d/pyplyn/badge.png https://pypip.in/license/pyplyn/badge.png

Pyplyn is an MIT Licensed simple flow-based data handling structure for making data handling repetitive tasks, easily without repeating yourself for every different scenario.

It is based on Python’s lovely generators, so for every data flow into the pipe is in an iterative fashion. It is currently used in a research project to handle some repetitive daily tasks. (Moving, filtering, altering the data)

Still the pyplyn module that is used in the project has some dirty but useful components like progressbar, ML based classification filter and so on, with this simple library, I think there can be a common simple ground for handling our repetitive tasks.

Installation

In order to install pyplyn, just simply:

pip install pyplyn

Or alternatively, download the package from pypi, extract and execute:

python setup.py install

Quick Start

Pyplyn aims to make data handling in a flow based fashion:

import pyplyn as p

pipe = p.Pipe()
pipe.add(p.LineReader("hello.txt"))
pipe.add(p.LambdaFilter(lambda line: len(line) < 50))
pipe.add(p.LineWriter("small_hello.txt"))
pipe.run()

You can even write your own Pyp modules as simple as this:

import pyplyn as p
import pymongo

class MongoCollection(p.InPypElement):
    def __init__(self, db, collection):
        self.collection = pymongo.MongoClient()[db][collection]
    def grasp(self):
        for document in self.collection:
            yield document

Add this new pipe element to your current flow by:

pipe = p.Pipe()
pipe.add(MongoCollection("data","raw"))
pipe.add(p.LambdaExtension(lambda document: document["text"])
pipe.add(p.LineWriter("data_text.txt"))

Documentation

Sorry, it is currently not available, but I recommend you to check the source, it is pretty straightforward for now.

Contribute

Any contribution is welcome.

Release files for pyplyn 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyplyn 0.1.5
File Size Uploaded
pyplyn-0.1.5.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyplyn 0.1.5
File Interpreter ABI Platform
pyplyn-0.1.5.macosx-10.9-intel.exe Details

Total release size: 73.4 kB

Release files / pyplyn-0.1.5.tar.gz

Download URL pyplyn-0.1.5.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e8cecc95d7210eaf6a142ef02176be6df6c8e27e461e50cd20bfb447ee6ae741
BLAKE2b-256 checksum
How to use checksums
f2bf61b5db084551c108c0e775513864f75082ab899ff1a3ecf6e0a8fe5d9120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyplyn-0.1.5.macosx-10.9-intel.exe

Download URL pyplyn-0.1.5.macosx-10.9-intel.exe
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7446cf5aaa44ad82e424cdb3171fa6cf90624750f50e514ff96c44dde1ef85b6
BLAKE2b-256 checksum
How to use checksums
967a72ddb4df342e1b8a7d143729b1594a4354ac0cf61af821cd7284771bd588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page