pop-loop


Namepop-loop JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://vmware.gitlab.io/pop/pop-loop/en/latest/index.html
SummaryPlugins that allow alternate io loops to be used to run asynchronous code in pop projects
upload_time2023-07-03 20:19:04
maintainer
docs_urlNone
authorVMware, Inc.
requires_python>=3.8
licenseApache Software License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========
pop-loop
========

.. image:: https://img.shields.io/badge/made%20with-pop-teal
   :alt: Made with pop, a Python implementation of Plugin Oriented Programming
   :target: https://pop.readthedocs.io/

.. image:: https://img.shields.io/badge/made%20with-python-yellow
   :alt: Made with Python
   :target: https://www.python.org/


`pop-loop` Contains plugins that allow alternate io loops to be used to run asynchronous code in pop projects.

About
=====

Pop used the asyncio loop by default in a built-in mod at 'hub.pop.loop'.
It became necessary to split the mod into it's own project for more loop capabilities.
For testing, loop management was difficult, but paired with pytest-pop, pop-loop makes async testing easy.


What is POP?
------------

This project is built with `pop <https://pop.readthedocs.io/>`__, a Python-based
implementation of *Plugin Oriented Programming (POP)*. POP seeks to bring
together concepts and wisdom from the history of computing in new ways to solve
modern computing problems.

For more information:

* `Intro to Plugin Oriented Programming (POP) <https://pop-book.readthedocs.io/en/latest/>`__
* `pop-awesome <https://gitlab.com/saltstack/pop/pop-awesome>`__
* `pop-create <https://gitlab.com/saltstack/pop/pop-create/>`__

Getting Started
===============

Prerequisites
-------------

* Python 3.8+
* git *(if installing from source, or contributing to the project)*

Installation
------------

.. note::

   If wanting to contribute to the project, and setup your local development
   environment, see the ``CONTRIBUTING.rst`` document in the source repository
   for this project.

If wanting to use ``pop-loop``, you can do so by either
installing from PyPI or from source.

Install from PyPI
+++++++++++++++++

    If package is available via PyPI, include the directions.

    .. code-block:: bash

        pip install pop-loop


Install Extras
++++++++++++++

    ``pop-loop`` can be installed with extras to enable the different loop plugins in this project.

    trio:
    .. code-block:: bash

        pip install pop-loop\[trio\]


    uvloop:
    .. code-block:: bash

        pip install pop-loop\[uvloop\]

    qt:
    .. code-block:: bash

        pip install pop-loop\[qt\]


Install from source
+++++++++++++++++++

.. code-block:: bash

   # clone repo
   git clone git@gitlab.com/saltstack/pop/pop-loop.git
   cd pop-loop

   # Setup venv
   python3 -m venv .venv
   source .venv/bin/activate
   pip install -e .

Usage
=====

Describe some basic example use case for this plugin.

Examples
--------

uvloop example:
.. code-block:: python

    import asyncio
    import pop.hub

    hub = pop.hub.Hub()

    hub.pop.loop.create(loop_plugin="uv")
    task = hub.pop.Loop.create(asyncio.sleep(0))
    hub.pop.Loop.run_until_complete(task)


trio example:
.. code-block:: python

    import asyncio
    import pop.hub

    hub = pop.hub.Hub()

    hub.pop.loop.create(loop_plugin="trio")
    task = hub.pop.Loop.create(asyncio.sleep(0))
    hub.pop.Loop.run_until_complete(task)


QT example:
.. code-block:: python

    import asyncio
    import pop.hub
    import PyQt5.QtWidgets as pyqt5


    hub = pop.hub.Hub()
    hub.loop.qt.APP = pyqt5.QApplication([])
    hub.pop.loop.create(loop_plugin="qt")

    task = hub.pop.Loop.create(asyncio.sleep(0))
    hub.pop.Loop.run_until_complete(task)


Acknowledgements
================

* `Img Shields <https://shields.io>`__ for making repository badges easy.



            

Raw data

            {
    "_id": null,
    "home_page": "https://vmware.gitlab.io/pop/pop-loop/en/latest/index.html",
    "name": "pop-loop",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "VMware, Inc.",
    "author_email": "idemproject@vmware.com",
    "download_url": "https://files.pythonhosted.org/packages/73/1b/0b8939675e3e67c52a6e308a1b6ca429c9c372542f301fc78875c2d491bc/pop-loop-1.1.0.tar.gz",
    "platform": null,
    "description": "========\npop-loop\n========\n\n.. image:: https://img.shields.io/badge/made%20with-pop-teal\n   :alt: Made with pop, a Python implementation of Plugin Oriented Programming\n   :target: https://pop.readthedocs.io/\n\n.. image:: https://img.shields.io/badge/made%20with-python-yellow\n   :alt: Made with Python\n   :target: https://www.python.org/\n\n\n`pop-loop` Contains plugins that allow alternate io loops to be used to run asynchronous code in pop projects.\n\nAbout\n=====\n\nPop used the asyncio loop by default in a built-in mod at 'hub.pop.loop'.\nIt became necessary to split the mod into it's own project for more loop capabilities.\nFor testing, loop management was difficult, but paired with pytest-pop, pop-loop makes async testing easy.\n\n\nWhat is POP?\n------------\n\nThis project is built with `pop <https://pop.readthedocs.io/>`__, a Python-based\nimplementation of *Plugin Oriented Programming (POP)*. POP seeks to bring\ntogether concepts and wisdom from the history of computing in new ways to solve\nmodern computing problems.\n\nFor more information:\n\n* `Intro to Plugin Oriented Programming (POP) <https://pop-book.readthedocs.io/en/latest/>`__\n* `pop-awesome <https://gitlab.com/saltstack/pop/pop-awesome>`__\n* `pop-create <https://gitlab.com/saltstack/pop/pop-create/>`__\n\nGetting Started\n===============\n\nPrerequisites\n-------------\n\n* Python 3.8+\n* git *(if installing from source, or contributing to the project)*\n\nInstallation\n------------\n\n.. note::\n\n   If wanting to contribute to the project, and setup your local development\n   environment, see the ``CONTRIBUTING.rst`` document in the source repository\n   for this project.\n\nIf wanting to use ``pop-loop``, you can do so by either\ninstalling from PyPI or from source.\n\nInstall from PyPI\n+++++++++++++++++\n\n    If package is available via PyPI, include the directions.\n\n    .. code-block:: bash\n\n        pip install pop-loop\n\n\nInstall Extras\n++++++++++++++\n\n    ``pop-loop`` can be installed with extras to enable the different loop plugins in this project.\n\n    trio:\n    .. code-block:: bash\n\n        pip install pop-loop\\[trio\\]\n\n\n    uvloop:\n    .. code-block:: bash\n\n        pip install pop-loop\\[uvloop\\]\n\n    qt:\n    .. code-block:: bash\n\n        pip install pop-loop\\[qt\\]\n\n\nInstall from source\n+++++++++++++++++++\n\n.. code-block:: bash\n\n   # clone repo\n   git clone git@gitlab.com/saltstack/pop/pop-loop.git\n   cd pop-loop\n\n   # Setup venv\n   python3 -m venv .venv\n   source .venv/bin/activate\n   pip install -e .\n\nUsage\n=====\n\nDescribe some basic example use case for this plugin.\n\nExamples\n--------\n\nuvloop example:\n.. code-block:: python\n\n    import asyncio\n    import pop.hub\n\n    hub = pop.hub.Hub()\n\n    hub.pop.loop.create(loop_plugin=\"uv\")\n    task = hub.pop.Loop.create(asyncio.sleep(0))\n    hub.pop.Loop.run_until_complete(task)\n\n\ntrio example:\n.. code-block:: python\n\n    import asyncio\n    import pop.hub\n\n    hub = pop.hub.Hub()\n\n    hub.pop.loop.create(loop_plugin=\"trio\")\n    task = hub.pop.Loop.create(asyncio.sleep(0))\n    hub.pop.Loop.run_until_complete(task)\n\n\nQT example:\n.. code-block:: python\n\n    import asyncio\n    import pop.hub\n    import PyQt5.QtWidgets as pyqt5\n\n\n    hub = pop.hub.Hub()\n    hub.loop.qt.APP = pyqt5.QApplication([])\n    hub.pop.loop.create(loop_plugin=\"qt\")\n\n    task = hub.pop.Loop.create(asyncio.sleep(0))\n    hub.pop.Loop.run_until_complete(task)\n\n\nAcknowledgements\n================\n\n* `Img Shields <https://shields.io>`__ for making repository badges easy.\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Plugins that allow alternate io loops to be used to run asynchronous code in pop projects",
    "version": "1.1.0",
    "project_urls": {
        "Code": "https://gitlab.com/vmware/pop/pop-loop",
        "Homepage": "https://vmware.gitlab.io/pop/pop-loop/en/latest/index.html",
        "Issue tracker": "https://gitlab.com/vmware/pop/pop-loop/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "pypi",
            "digests": {
                "blake2b_256": "9c69278576aab27387de566cc676b405ea0ac1a8fab8cc40cfaf58bb297d1a53",
                "md5": "79876caccc5b06c333a1a74c71e3a0a6",
                "sha256": "c529a558895180e74eec1880fcc66189cab1e18070338590a82d0da28de179e2"
            },
            "downloads": -1,
            "filename": "pop_loop-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79876caccc5b06c333a1a74c71e3a0a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13274,
            "upload_time": "2023-07-03T20:19:02",
            "upload_time_iso_8601": "2023-07-03T20:19:02.758994Z",
            "url": "https://files.pythonhosted.org/packages/9c/69/278576aab27387de566cc676b405ea0ac1a8fab8cc40cfaf58bb297d1a53/pop_loop-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "pypi",
            "digests": {
                "blake2b_256": "731b0b8939675e3e67c52a6e308a1b6ca429c9c372542f301fc78875c2d491bc",
                "md5": "d83c6bd4fcf39f73d3f3e8ccc708cb3d",
                "sha256": "9d5fd00afa2334c0edf80d9af331b668199cfbcf31a335dcf7730ff87bfc252f"
            },
            "downloads": -1,
            "filename": "pop-loop-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d83c6bd4fcf39f73d3f3e8ccc708cb3d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11931,
            "upload_time": "2023-07-03T20:19:04",
            "upload_time_iso_8601": "2023-07-03T20:19:04.556831Z",
            "url": "https://files.pythonhosted.org/packages/73/1b/0b8939675e3e67c52a6e308a1b6ca429c9c372542f301fc78875c2d491bc/pop-loop-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-03 20:19:04",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "vmware",
    "gitlab_project": "pop",
    "lcname": "pop-loop"
}
        
Elapsed time: 0.09054s