Simple task library using asyncio.
Project description
docs |
|
|---|---|
package |
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.2.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robot_tasks-0.2.2.tar.gz.
File metadata
- Download URL: robot_tasks-0.2.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c7c77f8820f5065deead7e1fd107ad401cab4809cfc8cbb19a0947389e63a20
|
|
| MD5 |
36e5b6fa299859aabb602ead9eacf57e
|
|
| BLAKE2b-256 |
a561e11331a9c4a7d96532f9207a54d6071a67a765543e522c5f2f80ace38517
|
File details
Details for the file robot_tasks-0.2.2-py3-none-any.whl.
File metadata
- Download URL: robot_tasks-0.2.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6301af12923ddb6a044e6a60533aa141dc62fd301e3489324dc05b6eeb16c5c6
|
|
| MD5 |
de6314beccf03fb9138394f143c284ac
|
|
| BLAKE2b-256 |
68d22d38012aaa14a490b5b01bc5d396934050a027f7694cfff9317d91c7be6d
|