Skip to main content

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

Status

Build status:

Build Status 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

Requirements

This version of asq works with and 3.9 and higher

Metadata

Release files for asq 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asq 2.0.0
File Size Uploaded
asq-2.0.0.tar.gz 44.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asq 2.0.0
File Interpreter ABI Platform
asq-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.4 kB

Release files / asq-2.0.0.tar.gz

Download URL asq-2.0.0.tar.gz
Size 44.9 kB
Tags Source
SHA-256 checksum
How to use checksums
76f579672196d1d0a9ccadc25e092fcd2674879369a62eaf7a962d1e2ec78823
BLAKE2b-256 checksum
How to use checksums
efaf7263f311aa8b4b3df4cf8fa951375efb179b60cb5d75118bc8a1041de42c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / asq-2.0.0-py3-none-any.whl

Download URL asq-2.0.0-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c28c26d666fcbaaf856f78f087a9c80a8317b4f7a5427bbfc040bf5ca9e26fb
BLAKE2b-256 checksum
How to use checksums
578fabdcff7a42b0302ed024ad8cdda39e822d722db6e36a2eeaccf662870b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.3

2 release files

1.2.1

2 release files

1.2

1 release file

1.0

2 release files

0.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page