quart-trio


Namequart-trio JSON
Version 0.11.1 PyPI version JSON
download
home_pagehttps://github.com/pgjones/quart-trio/
SummaryA Quart extension to provide trio support
upload_time2023-11-19 22:26:04
maintainer
docs_urlNone
authorpgjones
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Quart-Trio
==========

|Build Status| |docs| |pypi| |python| |license|

Quart-Trio is an extension for `Quart
<https://github.com/pallets/quart>`__ to support the `Trio
<https://trio.readthedocs.io/en/latest/>`_ event loop. This is an
alternative to using the asyncio event loop present in the Python
standard library and supported by default in Quart.

Quickstart
----------

QuartTrio can be installed via `pip
<https://docs.python.org/3/installing/index.html>`_,

.. code-block:: console

    $ pip install quart-trio

and requires Python 3.8 or higher (see `python version support
<https://quart.palletsprojects.com/en/latest/discussion/python_versions.html>`_
for reasoning).

A minimal Quart example is,

.. code-block:: python

    from quart import websocket
    from quart_trio import QuartTrio

    app = QuartTrio(__name__)

    @app.route('/')
    async def hello():
        return 'hello'

    @app.websocket('/ws')
    async def ws():
        while True:
            await websocket.send('hello')

    app.run()

if the above is in a file called ``app.py`` it can be run as,

.. code-block:: console

    $ python app.py

To deploy in a production setting see the `deployment
<https://quart-trio.readthedocs.io/en/latest/tutorials/deployment.html>`_
documentation.

Contributing
------------

Quart-Trio is developed on `GitHub
<https://github.com/pgjones/quart-trio>`_. You are very welcome to
open `issues <https://github.com/pgjones/quart-trio/issues>`_ or
propose `merge requests
<https://github.com/pgjones/quart-trio/merge_requests>`_.

Testing
~~~~~~~

The best way to test Quart-Trio is with Tox,

.. code-block:: console

    $ pip install tox
    $ tox

this will check the code style and run the tests.

Help
----

The `Quart-Trio <https://quart-trio.readthedocs.io>`__ and `Quart
<https://quart.palletsprojects.com>`__ documentation are the best
places to start, after that try searching `stack overflow
<https://stackoverflow.com/questions/tagged/quart>`_, if you still
can't find an answer please `open an issue
<https://github.com/pgjones/quart-trio/issues>`_.


.. |Build Status| image:: https://github.com/pgjones/quart-trio/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/pgjones/quart-trio/commits/main

.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg
   :target: https://quart-trio.readthedocs.io

.. |pypi| image:: https://img.shields.io/pypi/v/quart-trio.svg
   :target: https://pypi.python.org/pypi/Quart-Trio/

.. |python| image:: https://img.shields.io/pypi/pyversions/quart-trio.svg
   :target: https://pypi.python.org/pypi/Quart-Trio/

.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
   :target: https://github.com/pgjones/quart-trio/blob/main/LICENSE


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pgjones/quart-trio/",
    "name": "quart-trio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "pgjones",
    "author_email": "philip.graham.jones@googlemail.com",
    "download_url": "https://files.pythonhosted.org/packages/b6/21/b644db3cd4c0055af99c3e6f4fb066921fe0e21cf55afcef85208c8efa93/quart_trio-0.11.1.tar.gz",
    "platform": null,
    "description": "Quart-Trio\n==========\n\n|Build Status| |docs| |pypi| |python| |license|\n\nQuart-Trio is an extension for `Quart\n<https://github.com/pallets/quart>`__ to support the `Trio\n<https://trio.readthedocs.io/en/latest/>`_ event loop. This is an\nalternative to using the asyncio event loop present in the Python\nstandard library and supported by default in Quart.\n\nQuickstart\n----------\n\nQuartTrio can be installed via `pip\n<https://docs.python.org/3/installing/index.html>`_,\n\n.. code-block:: console\n\n    $ pip install quart-trio\n\nand requires Python 3.8 or higher (see `python version support\n<https://quart.palletsprojects.com/en/latest/discussion/python_versions.html>`_\nfor reasoning).\n\nA minimal Quart example is,\n\n.. code-block:: python\n\n    from quart import websocket\n    from quart_trio import QuartTrio\n\n    app = QuartTrio(__name__)\n\n    @app.route('/')\n    async def hello():\n        return 'hello'\n\n    @app.websocket('/ws')\n    async def ws():\n        while True:\n            await websocket.send('hello')\n\n    app.run()\n\nif the above is in a file called ``app.py`` it can be run as,\n\n.. code-block:: console\n\n    $ python app.py\n\nTo deploy in a production setting see the `deployment\n<https://quart-trio.readthedocs.io/en/latest/tutorials/deployment.html>`_\ndocumentation.\n\nContributing\n------------\n\nQuart-Trio is developed on `GitHub\n<https://github.com/pgjones/quart-trio>`_. You are very welcome to\nopen `issues <https://github.com/pgjones/quart-trio/issues>`_ or\npropose `merge requests\n<https://github.com/pgjones/quart-trio/merge_requests>`_.\n\nTesting\n~~~~~~~\n\nThe best way to test Quart-Trio is with Tox,\n\n.. code-block:: console\n\n    $ pip install tox\n    $ tox\n\nthis will check the code style and run the tests.\n\nHelp\n----\n\nThe `Quart-Trio <https://quart-trio.readthedocs.io>`__ and `Quart\n<https://quart.palletsprojects.com>`__ documentation are the best\nplaces to start, after that try searching `stack overflow\n<https://stackoverflow.com/questions/tagged/quart>`_, if you still\ncan't find an answer please `open an issue\n<https://github.com/pgjones/quart-trio/issues>`_.\n\n\n.. |Build Status| image:: https://github.com/pgjones/quart-trio/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/pgjones/quart-trio/commits/main\n\n.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg\n   :target: https://quart-trio.readthedocs.io\n\n.. |pypi| image:: https://img.shields.io/pypi/v/quart-trio.svg\n   :target: https://pypi.python.org/pypi/Quart-Trio/\n\n.. |python| image:: https://img.shields.io/pypi/pyversions/quart-trio.svg\n   :target: https://pypi.python.org/pypi/Quart-Trio/\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://github.com/pgjones/quart-trio/blob/main/LICENSE\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Quart extension to provide trio support",
    "version": "0.11.1",
    "project_urls": {
        "Homepage": "https://github.com/pgjones/quart-trio/",
        "Repository": "https://github.com/pgjones/quart-trio/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb619320f40bc363095bdb0c5e0c94b99cd582decfa61c2094f60d068fafe077",
                "md5": "5883b0ab1ca0fb7a5cb7a7aa704404a1",
                "sha256": "d4da1ab7699e44357f7788e1b5a30158680e999cf6b8e9ee762ce22164218bc0"
            },
            "downloads": -1,
            "filename": "quart_trio-0.11.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5883b0ab1ca0fb7a5cb7a7aa704404a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16062,
            "upload_time": "2023-11-19T22:26:02",
            "upload_time_iso_8601": "2023-11-19T22:26:02.444687Z",
            "url": "https://files.pythonhosted.org/packages/cb/61/9320f40bc363095bdb0c5e0c94b99cd582decfa61c2094f60d068fafe077/quart_trio-0.11.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b621b644db3cd4c0055af99c3e6f4fb066921fe0e21cf55afcef85208c8efa93",
                "md5": "d7ee9eb505f0263635c75db0832ace0e",
                "sha256": "149c9c65c2faafdf455a4461b600e1983b71e593b6f8c8b91b592bbda36cea98"
            },
            "downloads": -1,
            "filename": "quart_trio-0.11.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d7ee9eb505f0263635c75db0832ace0e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13190,
            "upload_time": "2023-11-19T22:26:04",
            "upload_time_iso_8601": "2023-11-19T22:26:04.210259Z",
            "url": "https://files.pythonhosted.org/packages/b6/21/b644db3cd4c0055af99c3e6f4fb066921fe0e21cf55afcef85208c8efa93/quart_trio-0.11.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-19 22:26:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pgjones",
    "github_project": "quart-trio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "quart-trio"
}
        
Elapsed time: 0.15541s