Naive timed execution of custom handlers in multiple threads
Project description
Naive Python Runner
What does it do?
naivepyrunner is library to schedule a small amount of timed tasks that may need to perform repeatedly. It does not claim to always choose the right execution order of those tasks to minimize the overall delay if it is running under limited ressources, but it does try to do so.
How does it work?
Why is it naive?
The runner assumes that the list with yet to execute tasks does not change while calculating the optimal position for the task. This may lead to not optimal positioning
Installation
Install it via pip
:
pip install naivepyrunner -U
Clone this repo and build it yourself:
pip install wheel -U
# clone via https
git clone https://github.com/henningjanssen/naivepyrunner.git
# or via ssh
git clone git@github.com:henningjanssen/naivepyrunner.git
cd naivepyrunner
# install via pip
pip install .
# or register as developed package
python setup.py develop
# or build the package and place it with your packages
make
Docker
Build it
# build it yourself
docker build -t naivepyrunner .
docker run -v$PWD:/app naivepyrunner python myapp.py
# or use the prebuilt container
docker run -v$PWD:/app henningj/naivepyrunner python myapp.py
Extend your Dockerfile:
FROM henningj/naivepyrunner:latest
[...]
python myapp.py
Usage
License
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
Built Distribution
File details
Details for the file naivepyrunner-0.2.0.tar.gz
.
File metadata
- Download URL: naivepyrunner-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f2a58a93bf556f2d85edcbcb8fbfb6b92cc75b3fd9ddff22e5cb3ef27170945 |
|
MD5 | dd80abdeaf91a6772fbb237224fa6956 |
|
BLAKE2b-256 | 786afc0ec70826c8816d5b9ac683ad2dc3887bf5fce06c45ae6f03015dcbbebd |
File details
Details for the file naivepyrunner-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: naivepyrunner-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2085baa85b86efbfeaaf7b133b39841c746dfd436b6c98d5df53c330dd824d89 |
|
MD5 | 23a76a629c73671c2b27f4b99f4b225a |
|
BLAKE2b-256 | c30dfd772c4eaf8a56beda49c3daa1e857f78938cae72632f58bfb453d519635 |