semvec/pypi-packages huggingface dataset:
webstack-django-pagination 2.1.2
Recent release of linaro-django-pagination by Webstack
License: BSD
Keywords: pagination,django

========================
Linaro Django Pagination
========================

.. image:: https://travis-ci.org/zyga/django-pagination.svg?branch=master
    :target: https://travis-ci.org/zyga/django-pagination

.. image:: https://coveralls.io/repos/zyga/django-pagination/badge.svg?branch=master&service=github
    :target: https://coveralls.io/github/zyga/django-pagination?branch=master


About the fork
--------------

This project is a fork of apparently dead "django-pagination" project
originally written by 'Eric Florenzano'. It is maintained by the Linaro
Validation/Infrastructure team. Latest releases can be found on launchpad and
pypi.
 
We are in the process of deciding how to properly host and manage the project.
Feel free to hop to #linaro on irc.freenode.net and ask either 'zyga' or
'mwhudson' about this.


About top-level package name change
-----------------------------------
The top level package name was changed from `pagination` to
`linaro-django-pagination`. I did this to ensure that existing users of the
original package could easily transition, on their own terms. Since both
packages are co-installable you are free to check things out and see if the new
pagination code works well for you or not.

Also, since the implementation of the actual tags was rewritten I would not
feel entirely confident that the new package is a drop-in replacement.


Contributors
------------

We would like to welcome any and all contributors. Please use the pull request
feature on github.


How to use linaro-django-pagination
-----------------------------------

See our official documentation for more details.
http://packages.python.org/linaro-django-pagination/


.. image:: https://badges.gitter.im/zyga/django-pagination.svg
   :alt: Join the chat at https://gitter.im/zyga/django-pagination
   :target: https://gitter.im/zyga/django-pagination?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
picles.plumber 0.11
Simple data transformation pipeline.
License: BSD

==============
picles.plumber
==============

A simple data transformation pipeline based on python's iteration protocol that
runs on python versions 2.7, 3.3 and 3.4.

.. code-block::

     +----------+      +-------------+      +-------------+      +--------+      +----------+
     | Producer | ---> | Transformer | ---> | Transformer | ---> | Tester | ---> | Consumer |
     +----------+      +-------------+      +-------------+      +--------+      +----------+



A pipeline model expects 4 types of filters:

* Producer: starting point, outbound only;
* Transformer: input, processing, output;
* Tester: input, discard or pass-thru;
* Consumer: ending point, inbound only.


.. code-block:: python

    import plumber
    
    @plumber.filter
    def upper(data):
        return data.upper()
    
    ppl = plumber.Pipeline(upper)
    output = ppl.run("Hey Jude, don't make it bad")
    
    print(''.join(output))
    "HEY JUDE, DON'T MAKE IT BAD"


Since the design is based on python's iteration protocol, both producers and 
consumers are ordinary iterable objects. Transformers are implemented as 
callables that accept a single argument, perform the processing and return the 
result. 

Input data may also be checked against some preconditions in order to decide 
if the transformation should happen or be by-passed. For example:


.. code-block:: python

    import plumber
    
    def is_vowel(data):
        if data not in 'aeiou':
            raise plumber.UnmetPrecondition()
    
    @plumber.filter
    @plumber.precondition(is_vowel)
    def upper(data):
        return data.upper()
    
    ppl = plumber.Pipeline(upper)
    output = ppl.run("Hey Jude, don't make it bad")
    
    print(''.join(output))
    "hEy jUdE, dOn't mAkE It bAd"


Prefetching
-----------

If you think the pipes are taking too long to move data forward, 
you can use a prefetching feature. To use it, just define the upper 
limit of items to be pre fetched.

Using the same example as above:


.. code-block:: python

    ppl = plumber.Pipeline(stripper, upper)
    transformed_data = ppl.run([" I am the Great Cornholio!", "Hey Jude, don't make it bad "], 
                               prefetch=2)
    
    for td in transformed_data:
        print(td)
    
    I AM THE GREAT CORNHOLIO!
    "HEY JUDE, DON'T MAKE IT BAD"


By default the prefetching mechanism is thread-based, so be careful with cpu-bound
pipelines.


Installation
------------

Pypi (recommended):

.. code-block:: bash

    $ pip install picles.plumber


Source code (development version):

.. code-block:: bash

    $ git clone https://github.com/picleslivre/plumber.git && cd plumber && python setup.py install


Use license
-----------

This project is licensed under FreeBSD 2-clause. See `LICENSE <https://github.com/picleslivre/plumber/blob/master/LICENSE>`_ for more details.