How to use the daphne.__version__ function in daphne

To help you get started, we’ve selected a few daphne examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hivesolutions / appier / src / appier / asgi.py View on Github external
def serve_daphne(self, host, port, **kwargs):
        util.ensure_pip("daphne")
        import daphne.server
        import daphne.cli
        self.server_version = daphne.__version__
        app_asgi = build_asgi_i(self)
        app_daphne = daphne.cli.ASGI3Middleware(app_asgi)
        self._server = daphne.server.Server(
            app_daphne,
            endpoints = ["tcp:port=%d:interface=%s" % (port, host)]
        )
        self._server.run()
github django / daphne / setup.py View on Github external
import os

from setuptools import find_packages, setup

from daphne import __version__

# We use the README as the long_description
readme_path = os.path.join(os.path.dirname(__file__), "README.rst")
with open(readme_path) as fp:
    long_description = fp.read()

setup(
    name="daphne",
    version=__version__,
    url="https://github.com/django/daphne",
    author="Django Software Foundation",
    author_email="foundation@djangoproject.com",
    description="Django ASGI (HTTP/WebSocket) server",
    long_description=long_description,
    license="BSD",
    zip_safe=False,
    package_dir={"twisted": "daphne/twisted"},
    packages=find_packages() + ["twisted.plugins"],
    include_package_data=True,
    install_requires=["twisted[tls]>=18.7", "autobahn>=0.18", "asgiref~=3.2"],
    setup_requires=["pytest-runner"],
    extras_require={
        "tests": ["hypothesis==4.23", "pytest~=3.10", "pytest-asyncio~=0.8"]
    },
    entry_points={