A Multi-processing based single-host MapReduce Framework
This is a simple mapreduce framework.
Sample program
from mapreduce import *
from math import ceil, sqrt
def mapper_2(item):
return (item + 5) * 23 - 1
def reducer_2(accumulated, item):
return accumulated + item
def is_prime(n):
for i in range(2, ceil(sqrt(n))):
if n % i == 0:
return False
return True
if __name__ == "__main__":
N = 150000
print('* map & reduce ')
mr = MapReducer().prefilter(is_prime).mapper(mapper_2).reducer(reducer_2, 0)
result = mr(range(N))
print(' MR Result :', result)
n = sum([(n + 5) * 23 - 1 for n in range(N) if is_prime(n)])
print(' Validation:', n)
History
0.5.1
update examples
optimize export & imports
0.5.0
process speed optimized
0.1.0
First release
Metadata
Release files for mapreduce-py 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mapreduce-py-0.5.1.tar.gz | 3.5 kB | Without provenance | Details for mapreduce-py-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mapreduce_py-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for mapreduce_py-0.5.1-py3-none-any.whl |
Total release size: 7.9 kB
Release files / mapreduce-py-0.5.1.tar.gz
| Download URL | mapreduce-py-0.5.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fde20730411f676bae3edd30d4c77f73086e86b6de294d3f6c77a7454a395170
|
|
BLAKE2b-256 checksum How to use checksums |
aeb5df77bb12d1a7ede73d52bf7a3a5091610ced4ac9770c2c2997375dfc1262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
|
Release files / mapreduce_py-0.5.1-py3-none-any.whl
| Download URL | mapreduce_py-0.5.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a36185ca93bab0374087100f24b43f44339ec9ce1ab8e96a61ffdaee58915d56
|
|
BLAKE2b-256 checksum How to use checksums |
a3fd35036dd7c70197c1a2438c57dff15c893c259dbce59f683db9ddf588f5fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
|
Security for mapreduce-py 0.5.1
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.