Custom Actions triggered by Parsed values in Python
<p>I am looking to build or more preferably use a framework to implement custom Assertions in python. I am listing below potential input that will be parsed to trigger the various assertions on retrieved data </p>

<pre><code>assertValue : [ SOME STRING A ]
    or
assertValue : [ SOME STRING B ]
    or
assertValue : [ SOME STRING C ]
</code></pre>

<p>So above, when the parsed value is <code>"SOME STRING A"</code>, I would want to trigger an appropriate assertion. For eg, if the provided value is <code>"NOT NULL"</code> I would assert that retrieved data does not have NULL values in it. </p>

<p>The goal for the framework is to provide flexibility to add support for different Assertions and the implementations it will trigger. I tried searching for any existing frameworks that i can use for this purpose in Python. I only found event driven frameworks like "PyDispatcher" or "Django Dispatch" , which i thought is a bit over kill for this. </p>

<p>Has anyone come across a similar need and used something successfully. Thanks much</p>

<p>Maybe you're looking for something along the lines of one of <a href="https://github.com/cucumber/cucumber/wiki/Python" rel="nofollow">Cucumber's Python ports? </a></p>

python event-triggers