Skip to main content

Parallel computing framework

Project description

link.parallel is a database agnostic query system.

See documentation for more informations.

License Development Status Latest release Supported Python versions Supported Python implementations Download format Build status Code test coverage Downloads Code Health

Installation

pip install link.parallel

Features

  • parallel loops interface with IPython and multiprocessing drivers

  • Map/Reduce middleware

Examples

Create your map/reduce functions:

from b3j0f.task import register_task


@register_task('mymap')
def mymap(mapper, item):
    if item['i'] < 5:
        mapper.emit('i_lt_5', item)

    elif item['i'] > 5:
        mapper.emit('i_gt_5', item)

    else:
        mapper.emit('i_eq_5', item)


@register_task('myreduce')
def myreduce(key, values):
    return (key, len(values))

Get input data and pass it to the middleware:

from link.middleware.core import Middleware

mapreduce = Middleware.get_middleware_by_uri(
    'mapreduce+ipython:///test/classify?mapcb=mymap&reducecb=myreduce'
)

items = # load items
result = dict(mapreduce(items))

print(result)

Donating

Support via Liberapay

Project details


Download files

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

Source Distribution

link.parallel-1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

link.parallel-1.1-py2.py3-none-any.whl (12.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file link.parallel-1.1.tar.gz.

File metadata

  • Download URL: link.parallel-1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for link.parallel-1.1.tar.gz
Algorithm Hash digest
SHA256 404d346a1ade4479d9ce2db851a00e13605f3907e5dd3c40257a79ef99de0fbc
MD5 2f5e5a8f2df0c81404dfce4c20a6be50
BLAKE2b-256 3d1a5e54c8dc78cb35dc09bcbf1b5eef2f413319e12c4d7266d0d0fa893767bb

See more details on using hashes here.

File details

Details for the file link.parallel-1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for link.parallel-1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2a3f2d5facd6e6779189586adbd670967fb05a1b2fc8ebc0fd60b5ad6174b1b3
MD5 de8b0c127bda69fcd4aa7f89f1326135
BLAKE2b-256 be9ab3c7b8605d91a35456af6cd4d2fb26e487cec226fd5c03b06e62414ad7c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page