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
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.3.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file pysnippets-1.0.3.tar.gz
.
File metadata
- Download URL: pysnippets-1.0.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c56306d6e6f1352af0aac53e43e80063fa83c7fe392066eca1de11aa465e1eb2 |
|
MD5 | 3ae1fc1caedb0ac35c3b2952c22bb1fc |
|
BLAKE2b-256 | 026a2bc7eaa02e799a429468c9f85d9f8b6d9a8af90d94e49a81cb0b2f16a1f7 |
File details
Details for the file pysnippets-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pysnippets-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf56c78430e12ccf09055e73206404510778add5bf97c382f0d49d44a1b01e3 |
|
MD5 | e65c78d92fd490544b198b896e9694de |
|
BLAKE2b-256 | 06100c6f6d690655742282defd7c24e079d969f1d0919bcc341d1c18ae2e5d54 |