Skip to main content

No project description provided

Project description

Made with pop, a Python implementation of Plugin Oriented Programming Made with Python

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, 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:

Getting Started

Prerequisites

  • Python 3.6+

  • git (if installing from source, or contributing to the project)

Installation

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.

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

# 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pop-loop-1.0.5.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

pop_loop-1.0.5-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file pop-loop-1.0.5.tar.gz.

File metadata

  • Download URL: pop-loop-1.0.5.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14

File hashes

Hashes for pop-loop-1.0.5.tar.gz
Algorithm Hash digest
SHA256 bb5f131af58e8fab13b816a0848d7687c4eb34d82536e937df6a83df82484b25
MD5 d4c5a525e3859d11b9beb3bbc23f5a0e
BLAKE2b-256 996f21d49b70245953e4b4874bc5e89139440b2071e125b4ec49e1a448fd7c2b

See more details on using hashes here.

File details

Details for the file pop_loop-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pop_loop-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14

File hashes

Hashes for pop_loop-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d8efe4844ef3fe5142c909d72b2c184d5145947b72a6bc59dfdf492ba7b5c711
MD5 844a455c458af42669eb1eff8989bd66
BLAKE2b-256 c6da5d00db087d6c07606ba9e3eda55fb624a6e847ce3ce722b9b43fb90330c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page