Scheduled event driven library for Python Coders
Project description
KTimer
scheduled-event-driven-framework-based-on-milliseconds
This framework require ksubscribe library.
This framework uses Singleton Desing Pattern
This framework build a new thread to run framework's functions. Because of that you should use desctructor of the KTimer.
Framework's functions are mentioned in below
def __init__(self):
Run _publishEventBasedOnTimer() function in the new thread.
def _createScheduledEvent(self, subscriber,eventName:str, msTimePeriod:int):
If function returns True, scheduled event is created.
If function returns False, scheduled event is not created.
def _subscribeScheduledEvent(self, subscriber,eventName:str):
If function returns True, subscriber subscribes succesfully.
If function returns False, subscriber does not subscribe succesfully.
def _removeScheduledEvent(self,eventName:str):
If function returns True, scheduled event is removed successfully.
If function returns False, scheduled event is not removed successfully.
def _publishEventBasedOnTimer(self):
Main function that publish the events
def _removeSubscriberFromScheduledEvent(self,subscriber,eventName:str):
If function returns True, subscriber is removed from schedule event's subscriber list successfully.
If function returns False, subscriber is not removed from schedule event's subscriber list successfully.
def _stopThread(self):
Help to stop thread that run _publishEventBasedOnTimer() function.
def __del__(self):
Destructor.
Framework training repo : link
If you have any question, send mail to me
Project details
Release history Release notifications | RSS feed
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
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 KTimer-1.0.2.tar.gz.
File metadata
- Download URL: KTimer-1.0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7166e333e2013199467d1dc53c2fb2eb7341b083f4e81688dc206bb01a43f4f9
|
|
| MD5 |
36aaff3af87464f0ad4c5a3a18f9eb9b
|
|
| BLAKE2b-256 |
a8461d29c6975d87143e41b1583c29e21c8e5deeada41a03c1b06308b2f41eb5
|
File details
Details for the file KTimer-1.0.2-py3-none-any.whl.
File metadata
- Download URL: KTimer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99e21e813b2b688f5b64d55af57141a9d113d1f3a6fd0e1b8609204ae2b9035a
|
|
| MD5 |
92f371ab26876d8d2be69c389d6e0b93
|
|
| BLAKE2b-256 |
17cb8fae7c49f55065676821f1df4cfe2542f9d98d8a5a89c1ddce57a2d23490
|