Skip to main content

utils for python

Project description

pyutils

pip3 install --upgrade slimz

Color

from slimz.color import Color

cl = Color()

print(cl.red('I am red!'))
print(cl.green('I am gree!'))
print(cl.yellow('I am yellow!'))
print(cl.blue('I am blue!'))
print(cl.magenta('I am magenta!'))
print(cl.cyan('I am cyan!'))
print(cl.white('I am white!'))
print(cl.white_green('I am white green!'))

Book1

Book1 is just for reading specified cell data

from slimz.book import Book1,parseFloatTimeToString

b1 = Book1("/Users/scottxiong/Desktop/test.xlsx")
sheet = b1.sheet(0)

#parseFloatTimeToString(row,col,sheet)
print(sheet.cell_value(0,0))
print(sheet.cell_value(0,1))
print(sheet.cell_value(0,2))
print(sheet.cell_value(1,2))
print(sheet.cell_value(4,0))

Book2

Book2 used for writing data with existing sheet template

from slimz.book import font,style,Book2,borders,alignment_center,alignment_left,alignment_right
style1 = style(borders,alignment_center,font("Arial",10))

b2 = Book2("/Users/scottxiong/Desktop/test.xlsx","/Users/scottxiong/Desktop/test1.xls")
sheet = b2.copy(0,0)
sheet.write(5,1,"hello world")
sheet.write(5,2,1111,style1)
sheet.write(5,3,"2020/03/02")
b2.save()

other function

from slimz import today_str,isExist,firstLetterToUpper

print(today_str)
print(isExist("a.txt"))
print(firstLetterToUpper("I lOve yoU & all the PEOPLE that loved me!"))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slimz-0.0.8.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slimz-0.0.8-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file slimz-0.0.8.tar.gz.

File metadata

  • Download URL: slimz-0.0.8.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1

File hashes

Hashes for slimz-0.0.8.tar.gz
Algorithm Hash digest
SHA256 d0bca56668a1dea420aa72ee48e1919662c51d6b264f60426a19d3ad8e48e1da
MD5 335c1159c3281383254bdef8bb10efa8
BLAKE2b-256 93331e0f31c48a840b144b45b5eba7569503b4bc3fd5e3e7153955444f3ba1d6

See more details on using hashes here.

File details

Details for the file slimz-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: slimz-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1

File hashes

Hashes for slimz-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ef9daead8d2037d29d5e418bf2efb1d0dd71f5eb9c7d80abb71bfdea2c48d22e
MD5 e043fd3fdba4e4d19e8b3a17f6c68fcc
BLAKE2b-256 8ae7a69fd39c32afe95d4ecce478f557ed1bfa2afba2b9caa5ef97042bfa8637

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page