Skip to main content

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")

Metadata

Release files for shtools 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shtools 2.2.2
File Size Uploaded
shtools-2.2.2.zip 28.3 kB Details

Release files / shtools-2.2.2.zip

Download URL shtools-2.2.2.zip
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
898f675db0b16b0f1bbcd8384dc8f40aaaf5bb018e74414083da2cebdefe54c0
BLAKE2b-256 checksum
How to use checksums
88efea75542a84deb16fca602b86fe6b6f9031b07e8acc70d8f21ad9de135463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.8

Release history Release notifications | RSS feed

This release

2.2.2 This release

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.7

1 release file

2.1.6

1 release file

2.1.5

1 release file

2.1.4

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.10

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page