set up a simple working template for a bottle server
This commit is contained in:
parent
a24b083e42
commit
2b90fe86c3
1 changed files with 22 additions and 0 deletions
22
andoid_bottle.py
Normal file
22
andoid_bottle.py
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import matplotlib
|
||||||
|
matplotlib.use('agg')
|
||||||
|
import pandas as pd
|
||||||
|
from bottle import Bottle
|
||||||
|
|
||||||
|
app = Bottle()
|
||||||
|
|
||||||
|
@app.route('/index')
|
||||||
|
def index():
|
||||||
|
title = 'Hello World'
|
||||||
|
plot = 'plot placeholder'
|
||||||
|
footer = 'created fron an android device using Termux'
|
||||||
|
html = f'''<h1> {title} </h1>
|
||||||
|
<br>
|
||||||
|
{plot}
|
||||||
|
<br>
|
||||||
|
{footer}'''
|
||||||
|
return html
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue