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 robot.hummingbird import Hummingbird
from robot.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.2.1.tar.gz (6.8 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.2.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robot_tasks-0.2.1.tar.gz
  • Upload date:
  • Size: 6.8 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.2.1.tar.gz
Algorithm Hash digest
SHA256 76ca3b9f87f659753691073106904bc0739f3414493ddf711cbcf6f7c142e5b6
MD5 73e3e053d05bb890521293cccfabb814
BLAKE2b-256 f873314a8e2c871ff4590e8af9cd3937f56e46cf684c095d14da02b7b6ba92e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robot_tasks-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65e5f14d2b40be8ff67bd90d775db7ede0cad57c70cabb64bc55497d8018bdda
MD5 d4b056ff9dd3ada995e4d1d63780b917
BLAKE2b-256 090c5ae1281131690e1480ea067166247bc18056625bb83af789ccbba423be79

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