Skip to content

meanstrong/shtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHTools - some useful bash tools write in pure python.

image image image

About

纯Python实现的一些CLI命令工具集合.

Requirements

  • Python3

Install

通过pip命令安装:

pip install shtools[ssh]

或者通过下载源码包或clone代码至本地,然后通过如下命令安装:

python setup.py install

cli command

  • curl: transfer a URL
  • mongo: mongodb cli
  • mysql: mysql cli
  • nc: concatenate and redirect sockets
  • ntpdate: set the date and time via NTP
  • ping: send ICMP ECHO_REQUEST to network hosts
  • psql: postgresql cli
  • rediscli: redis cli
  • scp: secure copy (remote file copy program)
  • bash: local shell command
  • ssh: OpenSSH SSH client (remote login program)

Example

from shtools.bash.mysql import mysql

# print help
mysql.print_help()

# run
with mysql('-h 127.0.0.1 -P 3306 -u root -p ****** -D database') as client:
    result = client.execute("SELECT * FROM table")

About

some useful bash tools write in pure python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages