Useful tool to execute commands via SSH on a RPI or grab system info from said RPI
Project description
raspycheck
raspycheck is a small tool to grab infos from and execute commands on a Raspberry Pi via SSH.
raspycheck is in an early alpha stage!
Usage:
from raspycheck import RasPyCheck
rpc = RasPyCheck(ip='ip', user='username', password='password', persist=False) # Setting persist to True keeps the connection open
# Commands to grab data from the RPI
ip = rpc.get_rpi_ip()
hostname = rpc.get_rpi_hostname()
cpu_temp = rpc.get_rpi_cpu_temp()
usb_devices = rpc.get_rpi_usb_devices()
rpi_version = rpc.get_rpi_version()
free_mem = rpc.get_rpi_free_memory()
total_mem = rpc.get_rpi_total_memory()
essids = rpc.get_rpi_available_essids()
date = rpc.get_rpi_date()
installed_packages = rpc.get_rpi_list_installed_packages()
all_infos = rpc.get_all_rpi_info()
# Commanding the Pi
rpc.cmd_reboot_pi()
# Generic stuff
output = rpc.run_command_get_output('pwd') # executes pwd on the RPI and returns the output
return_code = rpc.run_command_get_return_code('pwd') # executes pwd on the RPI and returns the return code
# Only when persist=True:
rpc.close_instance_client() # closes SSH client
Supported Versions
raspycheck is currently only tested with Python3.9
TODO:
- Extend errorhandling
- Extend functionality
- Add tests
- Relax/Check dependencies
- ...
Release History
0.0.2 (2021-05-24)
Improvements
- Added README
- Added HISTORY
Bugfixes
- Fixed package structure
0.0.1 (2021-05-24)
- Initial Creation
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
raspycheck-0.0.2.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for raspycheck-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf1ab8c59d3023ef3d9a4338ea9f05348337c8512eb1e2a78679feb93b0ccaa4 |
|
MD5 | 2f8c816106880bdaa1291b13c8efd5c0 |
|
BLAKE2b-256 | cefcfaa759866ec60f6b97563dd6202d36fd179ef38a53137ee09166f34fabe0 |