lutils

Loitd Public Ultilities Project

View the Project on GitHub loitd/lutils

lutils

codecov lutils

A Loitd’s Public Python Utilities Library.

Website: https://loitd.github.io/lutils
Pip: https://pypi.org/project/lutils/
Git: https://github.com/loitd/lutils/
JS: https://github.com/loitd/lutilsjs/ - Not equivalent

Installation

You can easily install this library with command pip or pipenv:
pip install lutils
With specific version (pip will automatically uninstall older version & install specific version):
pip install lutils~=2.11.73
Install with pipenv:
pipenv install lutils~=2.11.73
Update existing installation: pipenv update lutils Update existing installation (manually): pipenv uninstall lutils
and then:
pipenv install lutils

Note

Usage

In your python file:

from lutils.utils import printlog, printwait
printlog("abc", "test.log")
printwait("Please wait while doing things", 5, "logfile.log")

To connect SSH to Linux servers and get disk space status

from lutils.utils import LServer
srv = LServer()
srv.connect(ip="192.168.1.2", uname="root", pwd="123456")
srv.getdiskspace()

For developers

To build this package:

Compiling this package:

Upload to PyPI:

Easy upload with keyring:

CI/CD Automated with Pytest and Circle CI

License