1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00
electrs/contrib/health_check.py
Roman Zeyde 423e4c7922 Rewrite Python scripts
Also, improve balance/history display
2021-06-18 17:49:29 +03:00

17 lines
400 B
Python
Executable File

#!/usr/bin/env python3
import argparse
import client
import json
def main():
parser = argparse.ArgumentParser()
parser.add_argument("host")
parser.add_argument("port", type=int)
args = parser.parse_args()
conn = client.Client((args.host, args.port))
print(json.dumps(conn.call([client.request("server.version", "health_check", "1.4")])))
if __name__ == '__main__':
main()