Tool set.
Project description
ToolSet
Tool set.
Install
pip3 install toolset --upgrade
ToolList
- Combiner : list all combinations of elements.
- get_localhost : get local host.
- get_md5 : Get the file md5 value.
- text_encryptor : Encrypt/decrypt text.
Combiner
List all combinations of elements.
from toolset.combiner import Combiner
for item in Combiner(ele_set=[1, 2, 3], min_eles=1, max_eles=2):
print(item)
# print: [1], [2], [3], [1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]
- ele_set: element set.
- min_eles: minimum number of elements.
- max_eles: maximum number of elements.
get_localhost
Get local host.
>>> from toolset import get_localhost
>>> localhost = get_localhost()
localhost: 192.168.0.112
get_md5
Get the file md5 value.
>>> from toolset import get_md5
>>> file_md5 = get_md5('demo.txt')
file_md5: 2e37db575bdab271fbd8d36e29afd737
text_encryptor
Encrypt/decrypt text.
>>> from toolset import TextEncryptor
>>> ciphertext = TextEncryptor.encrypt(token='123456', text='hello world!')
ciphertext: b'gAAAAABc4qW9v-0UH0nuVkv9749QDm_8NCJmvWMHcnqSWx8WX1nOiO8Zi-kRmKmVjGQdsn1buoQV8wTCcI-7uHGutQ6tAVQQ4A=='
>>> text = TextEncryptor.decrypt(token='123456', ciphertext=ciphertext)
text: 'hello world!'
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
toolset-2019.5.20.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for toolset-2019.5.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 247051121a96049dbcecf3453072d153e06d3e96dc04c91051d58749eb7a4d65 |
|
MD5 | a54df5b8b2fb0f26e833eaa298764f23 |
|
BLAKE2b-256 | 35337c24b9ca9ae175a23b45bfd9645eae1d1f6cddee48a5585be235fd7a110c |