Skip to main content

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 !

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')
>>> 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()

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for splendid, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size splendid-1.1.0-py2.py3-none-any.whl (9.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size splendid-1.1.0.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page