Skip to main content

A command line client and functions for collation.

Project description

Pipelib

PyPI version

Pipelib is a library for creating pipelines. You can parse, compare, and order iterables. With Pipelib you can:

  1. Create a custom pipeline to parse and compare version strings
  2. Use a collection of provided sorting functions for custom sorts.
  3. Assemble different processing blocks to pre-process inputs first.

The initial ideas came from Singularity Registry HPC (shpc) that had a need to parse and compare version strings from docker container tags.

under development

Design

import pipelib.main.steps as steps
import pipelib.main.pipeline as pipeline

# A pipeline to process a list of strings
steps = (

   # A step that converts everything to lowercase
   steps.AllLowercase(),

   # step that includes anything with "two"
   (steps.ExcludeFilter(), {"filters": ['two']})
)

# Strings to process
items = ['item-ONE', 'item-TWO', 'item-two-THREE']

p = pipeline.Pipeline(steps)

# The updated and transformed items
updated = p.run(items)
# ['item-one']

TODO

  • automated discovery of steps
  • automated testing for structure / output of each test
  • docstrings should have examples to show usage
  • custom version parsing / comparson class
  • pipeline steps will need a way to sort / compare / filter

Contributors

We use the all-contributors tool to generate a contributors graphic below.


Vanessasaurus

💻

License

This code is licensed under the MPL 2.0 LICENSE.

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

pipelib-0.0.0.tar.gz (17.6 kB view hashes)

Uploaded Source

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