Skip to main content

Simple task library using asyncio.

Project description

docs

Documentation Status

package

PyPI Package latest release PyPI Wheel Supported versions

Simple task library using asyncio.

  • Free software: MIT License

Installation

pip install robot-tasks

You can also install the in-development version with:

pip install https://github.com/fmorton/robot-tasks/archive/main.zip

Tasks Example with a Birdbrain Robot

from birdbrain import Hummingbird
from tasks import Tasks

async def task_1(bird):
  while True:
    print("task_1 running")

    await Tasks.yield_task(1.0)


async def task_2(bird):
  while True:
    print("task_2 running")

    await Tasks.yield_task(0.5)


bird = Hummingbird("A")

tasks = Tasks()

tasks.create_task(task_1(bird))
tasks.create_task(task_2(bird))

tasks.run()

Testing

To run all the tests run:

pytest

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

robot_tasks-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

robot_tasks-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robot_tasks-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for robot_tasks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e9084a8970183c9433e90d02f8fbc93eec6ea414c3bab02315a74d7377218eb
MD5 aaa14b81383d8971d246765ed970ed47
BLAKE2b-256 58f1f617346c2a145088a5b2c2aa8757330295869f37608a5e13a686da3b3487

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robot_tasks-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for robot_tasks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 486d6d3667ffbc99f528ae6429c15e28fee40510d9cbb6e4c827117d780f7b45
MD5 8fc8ee9cdb1ae3f3871a0ca6c0cd1126
BLAKE2b-256 24abc7c969954ee4e2e040918e7a95cb80083c54a34f303fdfdd16bde720ba18

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