Skip to main content

some useful bash tools write in python

Project description

SHTools - some useful bash tools write in pure python.

image image image

About

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

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
cmd = mysql('-h 127.0.0.1 -P 3306 -u root -p ****** -D database -e "SELECT * FROM table"')
result = cmd.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shtools-2.0.0.zip (23.8 kB view details)

Uploaded Source

File details

Details for the file shtools-2.0.0.zip.

File metadata

  • Download URL: shtools-2.0.0.zip
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for shtools-2.0.0.zip
Algorithm Hash digest
SHA256 3838e7349cb339588f6d1527f0f5325f11d97066d69df09029510c42a383b620
MD5 a514f412e524c9c4c339897b1f1c6ac3
BLAKE2b-256 6090554f48abfb3b60dbd6a966d7a5808b89436361b40fe19902b8f1ac9e78ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page