All Projects → sixty-north → Asq

sixty-north / Asq

Licence: mit
asq is simple implementation of a LINQ-inspired API for Python which operates over Python iterables

Programming Languages

python
139335 projects - #7 most used programming language

asq is simple implementation of a LINQ-inspired API for Python which operates over Python iterables, including a parallel version implemented in terms of the Python standard library multiprocessing module.

What It Does

asq is a package implementing queries over iterables of Python objects. asq provides a fluent interface making extensive use of method chaining to create complex queries without compromising readability. For example, to take the first five uppercased results from a list of words sorted by length and then alphabetically, try::

from asq import query words = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"] query(words).order_by(len).then_by().take(5).select(str.upper).to_list() ['ONE', 'SIX', 'TEN', 'TWO', 'FIVE']

Over 40 standard query operators are provided together with various utilities to make the API even more convenient to use in Python.

Documentation

Of course, there is full Narrative and reference documentation for asq <http://asq.readthedocs.org/>_

Status

Build status:

.. image:: https://travis-ci.org/sixty-north/segpy.svg?branch=master :target: https://travis-ci.org/sixty-north/asq :alt: Build Status

.. image:: https://readthedocs.org/projects/asq/badge/?version=latest :target: https://readthedocs.org/projects/asq/?badge=latest :alt: Documentation Status

How to get it

asq is available on the Python Package Index and can be installed with easy_install or pip::

$ pip install asq

Alternatively you can download and unpack the source and install using::

$ cd asq-1.2 $ python setup.py install

Requirements

This version of asq works with and 2.7 and higher, including Python 3. It is tested on Python 2.7, and Python 3.4 to 3.7. Furthermore it is tested on IronPython 2.7.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].