Skip to content

Instantly share code, notes, and snippets.

@bkeating bkeating/
Created Dec 13, 2015

What would you like to do?
SysAPI - A Simple Example using
from bottle import route, run, template, redirect
import socket
import subprocess
def index(name):
print(["du", "-sh"]))
return template('<b>Hello {{name}}</b>!', name=name)
def index():
hostname = socket.gethostname()
du = subprocess.check_output(['df', '-h'])["say", "Vagina"])
return template('overview', hostname=hostname, du=du)
run(port=8000, host='')
<title>System Overview</title>
<h1>System Overview</h1>
Host: <strong>{{ hostname }}</strong>
<h2>Disk Usage</h2>
<pre>{{ du }}</pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.