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
Metadata
Release files for sfm 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sfm-0.0.17.tar.gz | 73.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sfm-0.0.17-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 159.9 kB
Release files / sfm-0.0.17.tar.gz
| Download URL | sfm-0.0.17.tar.gz |
|---|---|
| Size | 73.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa97c0c22183de1b92caab42a75cdb3a54e4772ce8cc0643daf832c331ec245c
|
|
BLAKE2b-256 checksum How to use checksums |
58669031dfcc6036603a2aab53377c4c21a6be91e7e9f9f812176a23e018d895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13
|
Release files / sfm-0.0.17-py2.py3-none-any.whl
| Download URL | sfm-0.0.17-py2.py3-none-any.whl |
|---|---|
| Size | 86.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8d56b2e1b1a45281cb078a15e4c521e035e899e5621cb22feeeaf0c5e0584252
|
|
BLAKE2b-256 checksum How to use checksums |
eb7cd36e83ae90c5e0c892649a8064f90c484c29b2f43de555bad1f83a55acaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13
|