A Public Loitd utility package
Project description
lutils
A Loitd's Public Utilities Library Project
Website: https://inneka.com
Pip: https://pypi.org/project/lutils/
Git: https://github.com/loitd/lutils/
JS: https://github.com/loitd/lutilsjs/
Installation
You can easily install this library with command pip
pip install lutils
with specific version (pip will automatically uninstall older version & install specific version):
pip install lutils~=2.10.2
Update existing installation (manually):
pipenv uninstall lutils
and
pipenv install lutils
Note
- Support Unicode from version 1.4. Then please update to newest version.
- Backward compatible with Python 2.7 (recommended for 2.x) from version 2.10.2.1. From 2.10.2.1, lutils works on both 2.x and 3.x
Usage
In your python file:
# import printlog() to both PRINT to SCREEN & WRITE to LOGFILE
from lutils.lutils import printlog
# using printlog. If file not exist, printlog will creates a new one
# If the log file exists, printlog will appends to the end of the log file
printlog("abc", "test.log")
To connect SSH to Linux servers and get disk space status
# import LServer
from lutils.lutils import LServer
# init instance
srv = LServer()
# connect to server
srv.connect(ip="192.168.1.2", uname="root", pwd="123456")
# get disk space
srv.getdiskspace()
For developers
To build this package:
pip install --upgrade pip setuptools wheel
pip install tqdm
pip install --user --upgrade twine keyring
Compiling this package:
python setup.py sdist bdist_wheel
Upload to PyPI:
python -m twine upload --skip-existing dist/*
orpython -m twine upload --skip-existing -u loitd --repository-url https://upload.pypi.org/legacy/ dist/*
Easy upload with keyring:
python -m keyring set https://upload.pypi.org/legacy/ loitd
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lutils-2.10.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1e43d6902ede6e1dae9203a8e77fa1487b1357dab2ea4653f33b2c9a7df6dee |
|
MD5 | a7ebcb3f847001ff4cab5879289bb8cd |
|
BLAKE2b-256 | c9401c8d8f64f77d7ba622727ad7827f7009dbb6a965070a6cd5c980c358cf5b |