Skip to main content

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:-

linkedin Gitlab Bitbucket

LICENSE

Author

Metadata

Release files for Pytools-kit 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Pytools-kit 0.0.3
File Size Uploaded Provenance
Pytools-kit-0.0.3.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Pytools-kit 0.0.3
File Interpreter ABI Platform
Pytools_kit-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / Pytools-kit-0.0.3.tar.gz

Download URL Pytools-kit-0.0.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
be33d3d77f47d932b1893b316a7ba1d0567f556a34f01079a6fe2fb684cb06c4
BLAKE2b-256 checksum
How to use checksums
c0e17e8429496949bdaf1113a16686c7ec6a614db20be922e109254ed1dc08a0
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / Pytools_kit-0.0.3-py3-none-any.whl

Download URL Pytools_kit-0.0.3-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a974ef58d4065b4ecc9c1130fb858087bf495d4ce2437e1a0b3aa5538a2fe90a
BLAKE2b-256 checksum
How to use checksums
7bc018dda2baccbff42ce4af88d8678444a58518e6c084b269f77ea42dfa877c
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for Pytools-kit 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page