Subscription library for Python Coders
Project description
ksubscribe
Python-Event-Based-Programming-Methodology
This is a library that help python coder to run event-based methodology.
You can subscribe an event from object to another object. Ksubscribe library is designed with Singleton design pattern. So, if you create more that one Ksubscribe object, the all object is actually same object.
!!!!
Subscriber class must have inform functions. You can see the examples in examples.
You can publish the event from subscriber like this
self.slaveEventObject = Ksubscribe()
def eventTwoSecond(self):
self.slaveEventObject._publish(eventName="everyTwoSecond")
The ksubscribe library has these function that is mentioned in below.
def _subscribeForAnEvent(self,subscriber,eventName:str)
def _createAnEvent(self, eventName:str)
def _publish(self,eventName:str,parameters=None)
def _removeAnEvent(self,eventName:str)
def _removeAllEvents(self):
```
<br/><br/>
You can check [example usage](https://github.com/bossman48/ksubscribe-example-usage#in-this-example-usage-of-ksubscribe-we-have-master-and-slave-class)
<br/><br/>
If you have any question, send mail to [me](kuzucu48@gmail.com)
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
ksubscribe-1.0.4.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for ksubscribe-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 618a35b438737f1623703f895471c431e6634e39b8d7768f4d5af04abccc9279 |
|
MD5 | 46916ab437b8d6572f04955a5243bca4 |
|
BLAKE2b-256 | f4f9720290ac64e6df66a23698feaae0ad5196e7a098fe6a79b1dc043ee6a1d9 |