Projet de remplacement du "RPiPasserelle" d'Otec.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223
  1. #!/usr/bin/env python3
  2. from starlette.routing import Router, Mount, Route
  3. from starlette.responses import HTMLResponse
  4. from starlette.exceptions import HTTPException
  5. from pyheatpump.config import app as config
  6. from pyheatpump.heatpump import app as heatpump
  7. from pyheatpump.variable_types import app as types
  8. from pyheatpump.variable_values import app as values
  9. async def index(request):
  10. with open('index.html') as html:
  11. return HTMLResponse(html.read())
  12. raise HTTPException(404)
  13. application = Router(routes=[
  14. Route('/', index),
  15. Mount('/config', config),
  16. Mount('/heatpump', heatpump),
  17. Mount('/variables', types),
  18. Mount('/values', values)
  19. ])