Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

METADATA 6.3KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. Metadata-Version: 2.1
  2. Name: daphne
  3. Version: 4.0.0
  4. Summary: Django ASGI (HTTP/WebSocket) server
  5. Home-page: https://github.com/django/daphne
  6. Author: Django Software Foundation
  7. Author-email: foundation@djangoproject.com
  8. License: BSD
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 4 - Beta
  11. Classifier: Environment :: Web Environment
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: BSD License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python
  16. Classifier: Programming Language :: Python :: 3
  17. Classifier: Programming Language :: Python :: 3.7
  18. Classifier: Programming Language :: Python :: 3.8
  19. Classifier: Programming Language :: Python :: 3.9
  20. Classifier: Programming Language :: Python :: 3.10
  21. Classifier: Topic :: Internet :: WWW/HTTP
  22. Requires-Python: >=3.7
  23. License-File: LICENSE
  24. Requires-Dist: twisted[tls] (>=22.4)
  25. Requires-Dist: autobahn (>=22.4.2)
  26. Requires-Dist: asgiref (<4,>=3.5.2)
  27. Provides-Extra: tests
  28. Requires-Dist: hypothesis ; extra == 'tests'
  29. Requires-Dist: pytest ; extra == 'tests'
  30. Requires-Dist: pytest-asyncio ; extra == 'tests'
  31. Requires-Dist: django ; extra == 'tests'
  32. daphne
  33. ======
  34. .. image:: https://img.shields.io/pypi/v/daphne.svg
  35. :target: https://pypi.python.org/pypi/daphne
  36. Daphne is a HTTP, HTTP2 and WebSocket protocol server for
  37. `ASGI <https://github.com/django/asgiref/blob/main/specs/asgi.rst>`_ and
  38. `ASGI-HTTP <https://github.com/django/asgiref/blob/main/specs/www.rst>`_,
  39. developed to power Django Channels.
  40. It supports automatic negotiation of protocols; there's no need for URL
  41. prefixing to determine WebSocket endpoints versus HTTP endpoints.
  42. Running
  43. -------
  44. Simply point Daphne to your ASGI application, and optionally
  45. set a bind address and port (defaults to localhost, port 8000)::
  46. daphne -b 0.0.0.0 -p 8001 django_project.asgi:application
  47. If you intend to run daphne behind a proxy server you can use UNIX
  48. sockets to communicate between the two::
  49. daphne -u /tmp/daphne.sock django_project.asgi:application
  50. If daphne is being run inside a process manager, you might
  51. want it to bind to a file descriptor passed down from a parent process.
  52. To achieve this you can use the --fd flag::
  53. daphne --fd 5 django_project.asgi:application
  54. If you want more control over the port/socket bindings you can fall back to
  55. using `twisted's endpoint description strings
  56. <http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html#serverFromString>`_
  57. by using the `--endpoint (-e)` flag, which can be used multiple times.
  58. This line would start a SSL server on port 443, assuming that `key.pem` and `crt.pem`
  59. exist in the current directory (requires pyopenssl to be installed)::
  60. daphne -e ssl:443:privateKey=key.pem:certKey=crt.pem django_project.asgi:application
  61. Endpoints even let you use the ``txacme`` endpoint syntax to get automatic certificates
  62. from Let's Encrypt, which you can read more about at http://txacme.readthedocs.io/en/stable/.
  63. To see all available command line options run daphne with the ``-h`` flag.
  64. HTTP/2 Support
  65. --------------
  66. Daphne supports terminating HTTP/2 connections natively. You'll
  67. need to do a couple of things to get it working, though. First, you need to
  68. make sure you install the Twisted ``http2`` and ``tls`` extras::
  69. pip install -U 'Twisted[tls,http2]'
  70. Next, because all current browsers only support HTTP/2 when using TLS, you will
  71. need to start Daphne with TLS turned on, which can be done using the Twisted endpoint syntax::
  72. daphne -e ssl:443:privateKey=key.pem:certKey=crt.pem django_project.asgi:application
  73. Alternatively, you can use the ``txacme`` endpoint syntax or anything else that
  74. enables TLS under the hood.
  75. You will also need to be on a system that has **OpenSSL 1.0.2 or greater**; if you are
  76. using Ubuntu, this means you need at least Ubuntu 16.04.
  77. Now, when you start up Daphne, it should tell you this in the log::
  78. 2017-03-18 19:14:02,741 INFO Starting server at ssl:port=8000:privateKey=privkey.pem:certKey=cert.pem, channel layer django_project.asgi:channel_layer.
  79. 2017-03-18 19:14:02,742 INFO HTTP/2 support enabled
  80. Then, connect with a browser that supports HTTP/2, and everything should be
  81. working. It's often hard to tell that HTTP/2 is working, as the log Daphne gives you
  82. will be identical (it's HTTP, after all), and most browsers don't make it obvious
  83. in their network inspector windows. There are browser extensions that will let
  84. you know clearly if it's working or not.
  85. Daphne only supports "normal" requests over HTTP/2 at this time; there is not
  86. yet support for extended features like Server Push. It will, however, result in
  87. much faster connections and lower overheads.
  88. If you have a reverse proxy in front of your site to serve static files or
  89. similar, HTTP/2 will only work if that proxy understands and passes through the
  90. connection correctly.
  91. Root Path (SCRIPT_NAME)
  92. -----------------------
  93. In order to set the root path for Daphne, which is the equivalent of the
  94. WSGI ``SCRIPT_NAME`` setting, you have two options:
  95. * Pass a header value ``Daphne-Root-Path``, with the desired root path as a
  96. URLencoded ASCII value. This header will not be passed down to applications.
  97. * Set the ``--root-path`` commandline option with the desired root path as a
  98. URLencoded ASCII value.
  99. The header takes precedence if both are set. As with ``SCRIPT_ALIAS``, the value
  100. should start with a slash, but not end with one; for example::
  101. daphne --root-path=/forum django_project.asgi:application
  102. Python Support
  103. --------------
  104. Daphne requires Python 3.7 or later.
  105. Contributing
  106. ------------
  107. Please refer to the
  108. `main Channels contributing docs <https://github.com/django/channels/blob/main/CONTRIBUTING.rst>`_.
  109. To run tests, make sure you have installed the ``tests`` extra with the package::
  110. cd daphne/
  111. pip install -e '.[tests]'
  112. pytest
  113. Maintenance and Security
  114. ------------------------
  115. To report security issues, please contact security@djangoproject.com. For GPG
  116. signatures and more security process information, see
  117. https://docs.djangoproject.com/en/dev/internals/security/.
  118. To report bugs or request new features, please open a new GitHub issue.
  119. This repository is part of the Channels project. For the shepherd and maintenance team, please see the
  120. `main Channels readme <https://github.com/django/channels/blob/main/README.rst>`_.