Skip to main content

py-omakase

My choice of missing python functions.

list.len()
list.map(function)
list.filter(function)
list.compact()
list.uniq()
list.take(num)
list.drop(num)
list.flatten()
list.each_cons(num)
list.each_slice(num)
list.max()
list.min()
list.sum()
list.zip()
list.first()
list.last()
list.freq(function=None)
list.groupby(function=None)
list.indexby(function=None)
list.join(separator)
list.sortby(function)
list.sorted()
list.reduce(function)
list.reduce(initial, function)
list.percentile(float)
list.percentiles(*float)

tuple.len()
tuple.map(function)
tuple.max()
tuple.min()
tuple.sum()
tuple.zip()
tuple.first()
tuple.last()
tuple.freq(function=None)
tuple.groupby(function=None)
tuple.indexby(function=None)
tuple.join(separator)
tuple.sortby(function)
tuple.sorted()
tuple.reduce(function)
tuple.reduce(initial, function)
tuple.percentile(float)
tuple.percentiles(*float)

dict.len()
dict.compact()

Examples

$ python
>>> import omakase
>>> array = 'the quick brown fox jumps over the lazy dog'.split()
>>> array.map(len)
[3, 5, 5, 3, 5, 4, 3, 4, 3]
>>> array.filter(lambda each: each > 'hello worlds')
['the', 'quick', 'jumps', 'over', 'the', 'lazy']
>>> array.take(3)
['the', 'quick', 'brown']
>>>

Installation

To install this package, run

pip install omakase

Contributing

Bug reports and pull requests are welcome on github at, https://github.com/akuhn/py-omakase

Metadata

Release files for omakase 1.1.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 omakase 1.1.0
File Size Uploaded Provenance
omakase-1.1.0.tar.gz 2.3 kB Without provenance Details

Release files / omakase-1.1.0.tar.gz

Download URL omakase-1.1.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4abfbacea6cf49a288dc7613cb895f12ff7d2be2309c6e516ee850854a51f51b
BLAKE2b-256 checksum
How to use checksums
f86e70f7b595e0696df4163f62ff047d526b5423c45c23dcce7daecede6a90b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.10.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10

Security for omakase 1.1.0

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