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
omakase-1.1.0.tar.gz 2.3 kB 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

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file

1.0.0

1 release file

0.7.0

1 release file

0.6.2

1 release file

0.6.0

1 release file

0.5.5

1 release file

0.5.4

1 release file

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