sfm 0.0.17

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

sfm 0.0.17

Welcome to sfm Documentation
Collection of useful single file module. Please install required package respectively when needed.

winzip module
Suppose this is your file structure:
/alice ($HOME)
/Document
/word
/paper1.doc
/paper2.doc
/excel
/data1.xlsx
/data2.xlsx
/readme.txt
Usage:
>>> from sfm.winzip import zip_a_folder, zip_everything_in_a_folder, zip_many_files
>>> zip_a_folder("/Users/alice/Document", "/Users/alice/document.zip")
>>> zip_everything_in_a_folder("/Users/alice/Document", "/Users/alice/document.zip")
>>> zip_many_files(
[
"/Users/alice/Document/word/paper1.doc",
"/Users/alice/Document/excel/data1.xlsx",
"/Users/alice/Document/readme.txt",
],
"/Users/alice/document.zip"
)


timer module
Usage:
>>> import time
>>> from sfm.timer import DateTimeTimer

>>> with DateTimeTimer(title="first measure") as timer:
... time.sleep(1)
from xxxx-xx-xx xx:xx:xx.xxx to xxxx-xx-xx xx:xx:xx.xxx elapsed 1.000000 second.

>>> timer = DateTimeTimer(title="second measure")
>>> timer.start()
>>> time.sleep(1)
>>> timer.end()
from xxxx-xx-xx xx:xx:xx.xxx to xxxx-xx-xx xx:xx:xx.xxx elapsed 1.000000 second.
And a lot more!


Install
sfm is released on PyPI, so all you need is:
$ pip install sfm
To upgrade to latest version:
$ pip install --upgrade sfm

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.