__init__.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #
  2. # Copyright 2009 Facebook
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  5. # not use this file except in compliance with the License. You may obtain
  6. # a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. # License for the specific language governing permissions and limitations
  14. # under the License.
  15. """The Tornado web server and tools."""
  16. # version is a human-readable version number.
  17. # version_info is a four-tuple for programmatic comparison. The first
  18. # three numbers are the components of the version number. The fourth
  19. # is zero for an official release, positive for a development branch,
  20. # or negative for a release candidate or beta (after the base version
  21. # number has been incremented)
  22. version = "6.5.5"
  23. version_info = (6, 5, 5, 0)
  24. import importlib
  25. import typing
  26. __all__ = [
  27. "auth",
  28. "autoreload",
  29. "concurrent",
  30. "curl_httpclient",
  31. "escape",
  32. "gen",
  33. "http1connection",
  34. "httpclient",
  35. "httpserver",
  36. "httputil",
  37. "ioloop",
  38. "iostream",
  39. "locale",
  40. "locks",
  41. "log",
  42. "netutil",
  43. "options",
  44. "platform",
  45. "process",
  46. "queues",
  47. "routing",
  48. "simple_httpclient",
  49. "tcpclient",
  50. "tcpserver",
  51. "template",
  52. "testing",
  53. "util",
  54. "web",
  55. ]
  56. # Copied from https://peps.python.org/pep-0562/
  57. def __getattr__(name: str) -> typing.Any:
  58. if name in __all__:
  59. return importlib.import_module("." + name, __name__)
  60. raise AttributeError(f"module {__name__!r} has no attribute {name!r}")