Splendid, a collection of useful, small python tools.
Project description
splendid is a collection of useful small python tools to make your life easier.
Visit us on https://github.com/pythoncircus/splendid !
Some Examples
>>> from splendid import chunker >>> list(chunker([1, 2, 3, 4, 5], 3)) [[1, 2, 3], [4, 5]]>>> from splendid import get_path >>> get_path({'foo':[{'bar':3}]}, ['foo'], 'not found') [{'bar': 3}] >>> get_path({'foo':[{'bar':3}]}, ['foo', 'bar'], 'not found') 'not found' >>> get_path({'foo':[{'bar':3}]}, ['foo', 0, 'bar'], 'not found') 3 >>> get_path({'foo':[{'bar':3}]}, ['foo', 0], 'not found') {'bar': 3}>>> from splendid import run_once >>> @run_once ... def foo(): ... print('bar') >>> for i in range(10): ... foo() bar
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
splendid-1.0.2.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for splendid-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b8c064d4bbfb361db910c126009bf20698efdd664bbabe509746d0d0356ffa |
|
MD5 | 3ce0da0edba92054d15106fb6f3e4667 |
|
BLAKE2b-256 | 0198b0318fea6b80de8fd340bb90ac9decd6641d63b4489dda6d686deca5e18b |