A configuration engine for Python frameworks
Dectate is a powerful configuration engine for Python frameworks.
It is used by Morepath.
Breaking changes: previously you defined new directives using the App.directive directive. This would lead to import confusion: you have to import the modules that define directives before you can actually use them, even though you’ve already imported your app class.
In this version of Dectate we’ve changed the way you define directives. Instead of:
class MyApp(dectate.App): pass @MyApp.directive('foo') class FooAction(dectate.Action): ...
You now write this:
class FooAction(directive.Action) ... class MyApp(dectate.App): foo = directive(FooAction)
So, you define the directives directly on the app class that needs them.
Uses of private_action_class should be replaced by an underscored directive definition:
class MyApp(dectate.App): _my_private_thing = directive(PrivateAction)
Use the same Git ignore file used in other Morepath projects.
If you set the app_class_arg class attribute to True on an action, then an app_class is passed along to perform, identifier, etc. This way you can affect the app class directly instead of just its underlying configuration in the config attribute.
Similarly if you set the app_class_arg attribute True on a factory class, it is passed in.
Add a clean method to the App class. You can override this to introduce your own cleanup policy for aspects of the class that are not contained in the config attribute.
We now use virtualenv and pip instead of buildout to set up the development environment. The development documentation has been updated accordingly.
Include doctests in Tox and Travis.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|dectate-0.13-py2.py3-none-any.whl (36.7 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Dec 23, 2016|
|dectate-0.13.tar.gz (51.8 kB) Copy SHA256 Checksum SHA256||–||Source||Dec 23, 2016|