Skip to main content

Process Queue

Simplify data processing using pipelines.

  • Inline
# Create the numbers 1-10, square them, then sum the results
result = proq.create(range(11)).map(lambda x: x ** 2).reduce(lambda x, y: x + y).next()
  • Procedurally
# Create a square numbers proq and split into two
data1, data2 = proq.create(range(11)).map(lambda x: x ** 2).tee()

# negate one of the streams
data1_neg = data1.map(lambda x: -x)

# add 1 to the other
data2_plus_1 = data2.map(lambda x: x + 1)

# Iterate over the results
for d1, d2 in zip(data1_neg, data2_plus_1):
    print(d1, d2, d1 + d2)
    assert d1 + d2 == 1
  • In parallel
# Get prime numbers under 1,000,000 - calculation happens concurrently
primes = (
    proq.create(range(1000001))
        .par_map(lambda x: x, is_prime(x))
        .filter(lambda x, is_prime: is_prime)
        .map(lambda x, is_prime: x)
        .collect()
)

Installation

pip install proq

Development

  • Download source
  • Install development dependencies: flit install -s --deps develop
  • Format code: black .
  • Run tests: pytest
  • Bump version in src/proq/__init__.py
  • Build package: flit build
  • Deploy: flit publish

Metadata

Release files for proq 0.0.4

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

Source distribution (sdist)

Source distribution for proq 0.0.4
File Size Uploaded Provenance Actions
proq-0.0.4.tar.gz 6.9 kB Without provenance Details for proq-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 12.0 kB

Release files / proq-0.0.4.tar.gz

Download URL proq-0.0.4.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b95e8a6f1b73619b84ed622b5a478d616ec4b6d75259ec7d15b3b71c679c748c
BLAKE2b-256 checksum
How to use checksums
20e7375f76dd90743836c6359ba916792624102e1a6e25bca103a02c3196213e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / proq-0.0.4-py3-none-any.whl

Download URL proq-0.0.4-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58bc39d43003fd21a0dfeb23709b8594e58442e4bd203cc70ce5b07b7ce5c4af
BLAKE2b-256 checksum
How to use checksums
2b26ca7fa3e523fb0c96303c6e7911672d8f99eab77244a5209143579b8bfeea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Security for proq 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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