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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sfm-0.0.17.tar.gz
(73.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sfm-0.0.17-py2.py3-none-any.whl
(86.5 kB
view details)
File details
Details for the file sfm-0.0.17.tar.gz.
File metadata
- Download URL: sfm-0.0.17.tar.gz
- Upload date:
- Size: 73.5 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa97c0c22183de1b92caab42a75cdb3a54e4772ce8cc0643daf832c331ec245c
|
|
| MD5 |
1339030631f200edfe29a1037b9c3542
|
|
| BLAKE2b-256 |
58669031dfcc6036603a2aab53377c4c21a6be91e7e9f9f812176a23e018d895
|
File details
Details for the file sfm-0.0.17-py2.py3-none-any.whl.
File metadata
- Download URL: sfm-0.0.17-py2.py3-none-any.whl
- Upload date:
- Size: 86.5 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d56b2e1b1a45281cb078a15e4c521e035e899e5621cb22feeeaf0c5e0584252
|
|
| MD5 |
1a66f98ed6f780815004d1d50ed21f96
|
|
| BLAKE2b-256 |
eb7cd36e83ae90c5e0c892649a8064f90c484c29b2f43de555bad1f83a55acaa
|