Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

LINQ-for-objects style queries for Python iterables.

Project Description

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.

How to get it

asq is available on the Python Package Index and can be installed with easy_install from setuptools:

$ 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, Python 3.3, Python 3.4 and Python 3.5. Furthermore it is tested on IronPython 2.7.

Release History

Release History

This version
History Node

1.2.1

History Node

1.2

History Node

1.0

History Node

0.9

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
asq-1.2.1-py2.py3-none-any.whl (31.4 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Dec 6, 2015
asq-1.2.1.tar.gz (44.6 kB) Copy SHA256 Checksum SHA256 Source Dec 6, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting