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
EntityField
classes available:post_processor
The
post_processor
argument 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.entities
in therespond
method.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
ability
classes are now available by exact name on theapp
instanceThe
app
instance in Pyttman apps now has allAbility
classes available by their exact name, as defined in thesettings.py
file. This is useful for scenarios where you want to access thestorage
object 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_STDOUT
didn't work, and logs were not written to STDOUT: #86