V 1.3.2
🌟 News
-
Removed clutter from log entries
The log entries from Pyttman are now cleaner, without as much clutter for each log entry.
-
New argment to
EntityFieldclasses available:post_processorThe
post_processorargument allows you to define a function which will be called on the value of the entity after it has been parsed. This is useful for scenarios where you want to clean up the value of the entity, or perform other operations on it before it is stored inmessage.entitiesin therespondmethod.class SomeIntent(Intent): """ In this example, the name will be stripped of any leading or trailing whitespace. """ name = StringEntityField(default="", post_processor=lambda x: x.strip())
-
All
abilityclasses are now available by exact name on theappinstanceThe
appinstance in Pyttman apps now has allAbilityclasses available by their exact name, as defined in thesettings.pyfile. This is useful for scenarios where you want to access thestorageobject of an ability, or other properties of the ability.# ability.py class SomeAbility(Ability): pass # settings.py ABILITIES = [ "some_ability.SomeAbility" ] # any file in the project from pyttman import app
🐛 Splatted bugs and corrected issues
- Fixed a bug where
LOG_TO_STDOUTdidn't work, and logs were not written to STDOUT: #86