2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
MapReduce Python
Experimental Pythonic MapReduce inspired by Spotify’s luigi framework.
Canonical Word Count Example
Currently there are two MapReduce implementations, one that includes sorting and one that does not. The example below would not benefit from sorting so we can take advantage of the inherent optimization of not sorting. The API is the same but tinymr.memory.MRSerial() sorts after partitioning and again between the reducer() and final_reducer().
import json
import re
import sys
from tinymr.memory import MRSerial
class WordCount(MRSerial):
def __init__(self):
self.pattern = re.compile('[\W_]+')
def mapper(self, item):
for word in item.split():
word = self.pattern.sub('', word)
if word:
yield word.lower(), 1
def reducer(self, key, values):
yield key, sum(values)
def final_reducer(self, pairs):
return {k: tuple(v)[0] for k, v in pairs}
wc = WordCount()
with open('LICENSE.txt') as f:
out = wc(f)
print(json.dumps(out, indent=4, sort_keys=True))
Truncated output:
{
"a": 1,
"above": 2,
"advised": 1,
"all": 1,
"and": 8,
"andor": 1
}
Developing
$ git clone https://github.com/geowurster/tinymr.git
$ cd tinymr
$ pip install -e .\[dev\]
$ py.test tests --cov tinymr --cov-report term-missing
License
See LICENSE.txt
Changelog
See CHANGES.md
Metadata
Release files for tinymr 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinymr-0.1.tar.gz | 16.8 kB | Without provenance | Details for tinymr-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinymr-0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for tinymr-0.1-py2.py3-none-any.whl |
Total release size: 31.9 kB
Release files / tinymr-0.1.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | tinymr-0.1.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bba34762221bcf14696679b11f81810bd5a09258c1a9eec4a1c63cfbc11fe980
|
|
BLAKE2b-256 checksum How to use checksums |
d83cadbb7418a860a1202b7bb8f1dfc296ff43b622512a330ca8919e5edd1b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / tinymr-0.1-py2.py3-none-any.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | tinymr-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
093f2359d19a279a1ba88fae77b3af25650245f30ec7c027a99e733e95d1bff9
|
|
BLAKE2b-256 checksum How to use checksums |
0b3a2b8c208985c7e8ee3be96a880b1757076c35bb67d98ae2a9a52948a1e709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tinymr 0.1
Upload timing
Release files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
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.