Skip to main content

Add your description here

Project description

Concurrentor

A simple wrapper class around anyio to help create programs that contain multiple concurrent but interacting parts.

Usage

from anyio import sleep
from concurrentor import Concurrentor, once, loop

class Application(Concurrentor):

    @enter
    async def run_once_at_enter(self):
        print("I run only once at the beginning.")

    @exit
    async def run_once_at_exit(self):
        print("I run only once at the end.")

    @loop
    async def run_repeatedly_one(self):
        print("I am called repeatedly.")
        await sleep(2)

    @loop
    async def run_repeatedly_two(self):
        print("I am called repeatedly, too.")
        await sleep(3)

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

concurrentor-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

concurrentor-0.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file concurrentor-0.1.0.tar.gz.

File metadata

  • Download URL: concurrentor-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for concurrentor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c249721906ab692851efd4bf2067b0e2ee5ea85af2c3ec93a67488f47ff8473f
MD5 5f90dd27e3899d885b36b867d15a3c38
BLAKE2b-256 bd9090a9d0d545eeea1471b076009bfc483c6374d480739c221eb9ff40028c83

See more details on using hashes here.

File details

Details for the file concurrentor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for concurrentor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f001e9ac7afe36166c5e5c9ff401b073a5bdcd984d06cf25f197debb362e06f
MD5 06f837778809810b92ba047114dcb78a
BLAKE2b-256 a8f320fad4e467f3b297405e2b0100f3207df3669f3bd12ff62e61f3882313a8

See more details on using hashes here.

Supported by

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