control
66
67#create control route on /control
68@app.get('/control')
69def control():70 return static_file("control.html", root="static")
71
72
index
61
62
63@app.get('/')
64def index():65 return static_file("index.html", root="static")
66
67#create control route on /control
switch
50
51
52@app.get('/switch/<pin:int>')
53def switch(pin):54 if not pin:
55 abort(code=404, text="pin not provided")
56 if pin not in pins:
getAll
45
46
47@app.get('/get')
48def getAll():49 return states
50
51
get
38
39
40@app.get('/get/<pin:int>')
41def get(pin):42 if pin not in pins:
43 abort(code=404, text="pin useless")
44 return str(states.get(pin))
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.