Cool Utils
Release 1.3.2 (The All Around Update!)
文件
這是您可以在Python中使用的很酷的實用工具。您可能會發現一些工具非常有用,您幾乎可以在任何項目上使用它,並且某些utils可能會為您提供很多幫助並節省很多時間,因為這是一個簡單的功能。我們希望您喜歡我們的UTIL。祝你今天過得愉快!
PYPI安裝
視窗:
$ pip install -U cool-utilsLinux/MacOS:
$ python3 -m pip install -U cool-utils開發安裝
視窗:
$ pip install git+https://github.com/Senarc-Studios/Cool-UtilsLinux/MacOS:
$ python3 -m pip install -U git+https://github.com/Senarc-Studios/Cool-Utils編譯:
from cool_utils import Compile
strings = [ "This" , "Is" , "A" , "String" ]
num_list = [ 9 , 4 , 2 ]
print ( Compile . string ( strings , startswith = "Hey, " , endswith = "." , joints = " " ))
print ( Compile . numbers ( num_list , startswith = 6 , endswith = 0 ))
>> Hey , This Is A String .
> > 69420JSON:
import cool_utils
json = cool_utils . JSON . open ( "sample" )
json . register_value ( variable = "foo" , value = "bar" ) # This creates a JSON file.
data = json . get_data ( variable = "foo" )
invalid_data = json . get_data ( "non-existant value" ) # You can do this instead of doing the variable's name.
print ( data )
print ( invalid_data )
>> bar
>> NoneGlobaljson:
import cool_utils
cool_utils . GlobalJSON . open ( "sample" )
cool_utils . GlobalJSON . register_value ( variable = "foo" , value = "bar" )
data = cool_utils . GlobalJSON . get_data ( variable = "foo" )
invalid_data = cool_utils . GlobalJSON . get_data ( "non-existant value" )
print ( data )
print ( invalid_data )
>> bar
>> None 沒有這些人,這不會成為可能