PyTool-Kit is an Python tools. It contain many usefull Tools
Project description
PyTools-Kit
PyTool-Kit is an Python tools. It contain many usefull Tools
what is Pytool-kit
PyTool-kit , its has Many tool for Python. This tool is use in everytime in Program(Python). But import this module for this and " make progam small and easy to Understand"
Installation
Open CMD
pip install pytools-kit
sudo pip3 install pytool_kit
Tools/Function
Note:- Before use import moduls like below way :
import pytool_kit as kit
get_txt_between
This tool is use For, Get txt/string between the txt/string from txt/string that we want ...
Example
This string(or txt) From Terminal (ifconfig)
inet6 fe80::d0f1:608c:a48b:5ab prefixlen 64 scopeid 0x20<link>
inet 192.168.x.x netmask 255.255.255.0 broadcast 192.168.0.255
ether 70:f1:a1:de:06:00 txqueuelen 1000 (Ethernet)
From above txt File we Want ip address in 2 second Line , we Known that ip is between inet & netmask
parse1 = "inet"
parse2 = "netmask"
text_var = txt/string
kit.get_txt_between(text_var,parse1,parse2)
output
192.168.x.x
add_txt_between
this tool use for , txt(string) add in txt(string) or replace
example
txt = "Ben is an Girls who live in his "
now we add or replace Girls By boy is between a " is an " and is an is an " "who live
parse1 = "is an"
parse2 = "who live"
text_var = txt/string
#add/replace
kit.add_txt_between(txt,"boy",parse1,parse2)
>>>Ben is an boy who live in his
#replace txt from parse2 to end as "add this from kit" (parse2=" ")
kit.add_txt_between(txt,"add this from kit ",parse1, " ")
>>>Ben is an girls add this from kit
#replace txt starting to parse1 to "add this from kit" and parse2 as it is(parse1=" ")
kit.add_txt_between(txt,"add this from kit ",parse1, " ")
>>>Ben is an girls add this from kit
txt2array
This tool is convert it convert txt to array
Example
string = "Python is an interpreted high-level general-purpose programming language"
now it convert to array
kit.txt2array(string)
>>>{'Python', 'is', 'an', 'interpreted', 'high-level', 'general-purpose', 'programming', 'language'}
array2txt
this tool is use from convert Array to Txt(string)
Example
array_test = {'A', 'computer', 'is', 'a', 'machine'}
now, It convert to simple txt or (string)
kit.array2txt(array_test)
>>>A computer is a machine
array2dic
This tools use for Convet Two array to one Python Dictory
Example
Name = ["Prajwal", "Ram" , "Rohit" , "Subodh" ,"Pratham"]
Marks =[95,68,58,81,70]
There are Two array (Name and Marks) than convert To Dictory
kit.array2dic(Name,Marks)
>>>{'Prajwal': 95, 'Ram': 68, 'Rohit': 58, 'Subodh': 81, 'Pratham': 70}
dic2array
dic2array tool use for Conervet 1 Dictory into 2 array
Example
dict={'Prajwal': 95, 'Ram': 68, 'Rohit': 58, 'Subodh': 81, 'Pratham': 70}
Now,THis Dictory convert to 2 array
Note:- it return three array
1 =>key value
2 =>item value
3 => key and they value
a,b,c=kit.dic2array(dict)
#its Take varibale a,b and c resptivly
a
>>>(['Prajwal', 'Ram', 'Rohit', 'Subodh', 'Pratham'],
b
>>>[95, 68, 58, 81, 70],
c
>>>[('Prajwal', 95), ('Ram', 68), ('Rohit', 58), ('Subodh', 81), ('Pratham', 70)])
License
Requirement
Install python3 on pc:-
🔗 Links
LICENSE
Author
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Pytools-kit-0.0.3.tar.gz.
File metadata
- Download URL: Pytools-kit-0.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be33d3d77f47d932b1893b316a7ba1d0567f556a34f01079a6fe2fb684cb06c4
|
|
| MD5 |
4574c21c303530f2535ff005fa3d639c
|
|
| BLAKE2b-256 |
c0e17e8429496949bdaf1113a16686c7ec6a614db20be922e109254ed1dc08a0
|
File details
Details for the file Pytools_kit-0.0.3-py3-none-any.whl.
File metadata
- Download URL: Pytools_kit-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a974ef58d4065b4ecc9c1130fb858087bf495d4ce2437e1a0b3aa5538a2fe90a
|
|
| MD5 |
80e42671a657c359e03b83e9a03a705d
|
|
| BLAKE2b-256 |
7bc018dda2baccbff42ce4af88d8678444a58518e6c084b269f77ea42dfa877c
|