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. ])