Skip to main content

Pypeline is a data pipeline builder library.

Project description

Pypeline

This is a package for creating iterative data processing pipelines. Note that this is NOT a general purpose stream processing library. It is only designed as being a low overhead and simple-to-setup stream processing library. So for large scale production applications, use something like kafka instead.

Warning

This library is still at an ALPHA stage. So things may not work as intended and the api is not final!

Trivial Example

from pypeline import build_action, Pypeline, ForkingPypelineExecutor, wrap
import asyncio

async def step1():
    results = []
    for i in range(1000):
        results.append(wrap(i))
    return results

async def step2(i):
    return i * 10

async def step3(i):
    return i + 1

async def run_pipeline():
    pypeline = Pypeline()
    # Adding actions to the pipeline
    pypeline.add_action(build_action("Step1", step1)) \ 
            .add_action(build_action("Step2", step2)) \
            .add_action(build_action("Step3", step3, serialize_dir="./example"))  # Serialize results so future runs will skip this step entirely
    results = await pypeline.run(executor=ForkingPypelineExecutor())  # Custom executor that avoids the GIL
    # Results are wrapped in a utility namedtuple, so let's flatten it.
    results = [r.args[0] for r in results]
    return results

results = asyncio.get_event_loop().run_until_complete(run_pipeline())
for result in results:
    print(result)

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

data-pypeline-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

data_pypeline-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file data-pypeline-0.1.0.tar.gz.

File metadata

  • Download URL: data-pypeline-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

File hashes

Hashes for data-pypeline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9e1ef2d7a94f9fb9db0f804aaf07ce7e48a72fdeeba544edee88e8168a8e973a
MD5 f270fdf5fc600ad4f4de869dec0cc7be
BLAKE2b-256 a6eb2cb5b16e496344376013d30b00be5ad468a602bfb14db8199816ce414e9c

See more details on using hashes here.

File details

Details for the file data_pypeline-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: data_pypeline-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

File hashes

Hashes for data_pypeline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f41a5c475560278b6fa03543980c8a77f674269987b7a2705d7172b69192886
MD5 fb7e53c63ea9c50a9086ce5df4613eb9
BLAKE2b-256 9390105f73fae98cd4d9d09ec11a1a6dd8a6694e4e978631ed3fae2268b8d202

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