Python Snippets
Project description
Python Snippets
Installation
pip install pysnippets
Usage
dict:
In [1]: import pysnippets.dictsnippets as dsn In [2]: dsn.filter({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4']) Out[2]: {'c': 3, 'd': 4} In [3]: dsn.filter({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'], exec_eval=False) Out[3]: {'c': 3, 'd': '4'} In [4]: dsn.gets({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4']) Out[4]: [3, 4] In [5]: dsn.gets({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'], exec_eval=False) Out[5]: [3, '4']
list:
In [1]: import pysnippets.listsnippets as lsn In [2]: lsn.all([1, 2, 3], [1, 2]) Out[2]: True In [3]: lsn.any([1, 2, 3], [1, 5]) Out[3]: True
str:
In [1]: import pysnippets.strsnippets as ssn In [2]: ssn.strip(None) In [3]: ssn.strip(' xyz ') Out[3]: 'xyz'
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
pysnippets-1.0.5.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file pysnippets-1.0.5.tar.gz
.
File metadata
- Download URL: pysnippets-1.0.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e80160e70d1347287a8b5a163a34dde3de1207832074b668d021d19dbd58fe |
|
MD5 | 45fb9fdec294c30e24414a8a298b7ae3 |
|
BLAKE2b-256 | 3f5554ec682f0ee07f53da3c74eca5c714271eca6c08e7b1b06dfab6690a678f |
File details
Details for the file pysnippets-1.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: pysnippets-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a06b0b0bd71c7c817516549411ccb49e8415f1c7d5bce652217445897b3615 |
|
MD5 | 5a1750578764a45a3454f3a65614cb9f |
|
BLAKE2b-256 | 175629e222fabe2b0e29f9b009fa2b0215c1f6a94067b45aa6803285a0bec438 |