__init__.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. r"""
  2. The ``platform`` module provides support for different web frameworks.
  3. See also: :ref:`Integration with Web Framework <integration_web_framework>` section of user manual.
  4. Tornado support
  5. -----------------
  6. .. autofunction:: pywebio.platform.tornado.start_server
  7. .. autofunction:: pywebio.platform.tornado.webio_handler
  8. Flask support
  9. -----------------
  10. When using the Flask as PyWebIO backend server, you need to install Flask by yourself and make sure the version is not less than ``0.10``.
  11. You can install it with the following command::
  12. pip3 install -U flask>=0.10
  13. .. autofunction:: pywebio.platform.flask.webio_view
  14. .. autofunction:: pywebio.platform.flask.start_server
  15. Django support
  16. -----------------
  17. When using the Django as PyWebIO backend server, you need to install Django by yourself and make sure the version is not less than ``2.2``.
  18. You can install it with the following command::
  19. pip3 install -U django>=2.2
  20. .. autofunction:: pywebio.platform.django.webio_view
  21. .. autofunction:: pywebio.platform.django.start_server
  22. aiohttp support
  23. -----------------
  24. When using the aiohttp as PyWebIO backend server, you need to install aiohttp by yourself and make sure the version is not less than ``3.1``.
  25. You can install it with the following command::
  26. pip3 install -U aiohttp>=3.1
  27. .. autofunction:: pywebio.platform.aiohttp.webio_handler
  28. .. autofunction:: pywebio.platform.aiohttp.start_server
  29. Other
  30. --------------
  31. .. autofunction:: pywebio.platform.seo
  32. .. autofunction:: pywebio.platform.run_event_loop
  33. """
  34. from .httpbased import run_event_loop
  35. from .tornado import start_server
  36. from .utils import seo