Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lig/asq
Temporary mirror of the http://code.google.com/p/asq/ project.
https://github.com/lig/asq
Last synced: 2 months ago
JSON representation
Temporary mirror of the http://code.google.com/p/asq/ project.
- Host: GitHub
- URL: https://github.com/lig/asq
- Owner: lig
- License: mit
- Created: 2013-02-19T20:00:46.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-14T10:14:43.000Z (almost 12 years ago)
- Last Synced: 2024-10-07T18:23:03.846Z (3 months ago)
- Language: Python
- Size: 1.65 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- Changelog: CHANGES.txt
Awesome Lists containing this project
README
``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::$ easy_install asq
Alternatively you can download and unpack the source distribution (link to the
left) and install using::$ cd asq-1.0
$ python setup.py installRequirements
============This version of ``asq`` works with Python 2.6 and higher, including Python 3.
It has been tested on Python 2.6, Python 2.7, Python 3.1 and Python 3.2.
Furthermore it is tested on !IronPython 2.6 and !IronPython 2.7.``asq`` has a dependency on the ordereddict module which ships as standard
with Python 2.7 and upwards, but this module must be installed separately
for Python 2.6.