• [IMP] unload declaration type callback



Break the compatibility with the previous version of anyblok

  • cache, classmethod_cache, hybrid_method and listen replace:

    from anyblok import Declarations
    cache = Declarations.cache
    classmethod_cache = Declarations.classmethod_cache
    hybrid_method = Declarations.hybrid_method
    addListener = Declarations.addListener


    from anyblok.declarations import (cache, classmethod_cache,
                                      hybrid_method, listen)


    The listener can declare SQLAlchemy event

  • declaration of the foreign key replace:

    class MyClass:
        myfield = Integer(foreign_key=(Model.System.Blok, 'name'))
        myotherfield = Integer(foreign_key=('Model.System.Blok', 'name'))


    class MyClass:
        myfield = Integer(foreign_key=Model.System.Blok.use('name'))
        myotherfield = Integer(foreign_key="Model.System.Blok=>name")
  • [IMP] add pop behaviour on Model.System.Parameter
  • [REF] Load configuration befoare load bloks, to use Configuration during the declaration
  • [FIX] all must return InstrumentedList, also when the result is empty
  • [FIX] to_dict must not cast column
  • [REF] add third entry in foreign key declaration to add options
  • [IMP] ModelAttribute used to declarate the need of specific attribute and get the attribute or the foreign key from this attribute
  • [IMP] ModelAttributeAdapter, get a ModelAttribute from ModelAttribute or str
  • [IMP] ModelRepr, Speudo representation of a Model
  • [IMP] ModelAdapter, get a ModelRepr from ModelRepr or str
  • [IMP] ModelMapper and ModelAttributeMapper
  • [REF] Event, the declaration of an event can be an anyblok or a sqlalchemy event
  • [REF] the foreign key must be declared with ModelAttribute
  • [REF] Use Adapter for Model and attribute in relation ship
  • [REF] hybrid_method, cache and classmethod_cache are now only impotable decorator function
  • [IMP] in column the default can be a classmethod name
  • [REF] replace all the field (prefix, suffic, ...) by a formater field. It is a python formater string
  • [IMP] Sequence column
  • [IMP] add the default system or user configuration file



Field Function change, fexp is required if you need filter

  • [FIX] Field.Function, fexp is now a class method
  • [REF] reduce flake8 complexity
  • [REF] refactor field function
  • [FIX] inherit relation ship from another model, thank Simon ANDRÉ for the bug report
  • [REF] table/mapper args definition
  • [REF] Refactor Field, Column, RelationShip use now polymophic inherit
  • [FIX] Foreign key constraint, allow to add and drop constraint on more than one foreign key
  • [ADD] update-all-bloks option
  • [ADD] pre / post migration
  • [REF] UML Diagram is now with autodoc script
  • [REF] SQL Diagram is now with autodoc script
  • [REF] Add extend key word in configuration file to extend an existing configuration



Break the compatibility with the previous version of anyblok

  • [REF] Add the possibility to add a logging file by argparse
  • [ADD] No auto migration option
  • [ADD] Plugin for nose to run unit test of the installed bloks
  • [REF] The relation ship can be reference more than one foreign key
  • [IMP] Add define_table/mapper_args methods to fill __table/mapper_args__ class attribute need to configure SQLAlachemy models
  • [REF] Limit the commit in the registry only when the SQLA Session factory is recreated
  • [REF] Commit and re-create the SQLA Session Factory, at installation, only if the number of Session inheritance of the number of Query inheritance change, else keep the same session
  • [REF] Exception is not a Declarations type
  • [FIX] Reload fonctionnality in python 3.2
  • [REF] Remove the Declarations typs Field, Column, RelationShip, they are replaced by python import
  • [REF] rename ArgsParseManager by Configuration
  • [REF] rename reload_module_if_blok_is_reloaded by reload_module_if_blok_is_reloading method on blok
  • [REF] rename import_cfg_file by import_file method on blok
  • [REF] Consistency the argsparse configuration
  • [REF] refactor part_to_load, the entry points loaded is bloks
  • [IMP] Allow to define another column name in the table versus model
  • [FIX] add importer for import configuration file
  • [FIX] x2M importer without field just, external id


  • [IMP] When a new column is add, if the column have a default value, then this value will be added in all the entries where the value is null for this column
  • [REF] import_cfg_file remove the importer when import has done


  • [ADD] on migration script to indicate what is changed
  • [IMP] Add sequence facility in the declaration of Column
  • [ADD] ADD XML Importer


  • [FIX] createdb script


  • [IMP] doc
  • [REF] Use logging.config.configFile


  • [IMP] Update setup to add documentation files and blok’s README


  • [IMP] Update Doc
  • [FIX] Remove nullable column, the nullable constraint is removed not the column
  • [ADD] Formater, convert value 2 str or str 2 value, with or without mapping
  • [ADD] CSV Importer
  • [REF] CSV Exporter to use Formater


  • [IMP] CSV Exporter
  • [IMP] Exporter Model give external ID behaviour
  • [ADD] Sequence model (Model.System.Sequence)
  • [ADD] fields_description cached_classmethod with invalidation
  • [ADD] Parameter Model (Model.System.Parameter)
  • [FIX] environnement variable for test unitaire


  • [FIX] UNIT test createdb with prefix


  • [IMP] add enviroment variable for database information
  • [ADD] argsparse option install all bloks
  • [FIX] Python 3.2 need that bloks directory are python modules, add empty __init__ file


  • [FIX] Add all rst at the main path of all the bloks


  • [IMP] unittest on SQLBase
  • [IMP] add delete method on SQLBase to delete une entry from an instance of the model
  • [REF] rename get_primary_keys to get_mapping_primary_keys, cause of get_primary_keys already exist in SQLBase


  • [IMP] Add IPython support for interpreter
  • [REF] Update and Standardize the method to field the models (Field, Column, RelationShip) now all the type of the column go on the ftype and comme from the name of the class


  • [FIX] use the backref name to get the label of the remote relation ship
  • [FIX] add type information of the simple field


  • [FIX] In the parent / children relationship, where the pk is on a mixin or from inherit
  • [FIX] How to Environment
  • [FIX] Many2Many declared in Mixin
  • [IMP] Many2One can now declared than the local column must be unique ( only if the local column is not declared in the model)



This version can be not compatible with the version 0.2.2. Because in the foregn key model is a string you must replace the tablename by the registry name

  • [FIX] Allow to add a relationship on the same model, the main use is to add parent / children relation ship on a model, They are any difference with the declaration of ta relation ship on another model
  • [REF] standardize foreign_key and relation ship, if the str which replace the Model Declarations is now the registry name


  • [REF] Unittest
    • TestCase and DBTestCase are only used for framework

    • BlokTestCase is used:
      • by run_exit function to test all the installed bloks
      • at the installation of a blok if wanted



This version is not compatible with the version 0.1.3

  • [REF] Import and reload are more explicite

  • [ADD] IO:
    • Mapping: Link between Model instance and (Model, str key)
  • [ADD] Env in registry_base to access at EnvironmentManager without to import it at each time

  • [IMP] doc add how to on the environment


  • [FIX] setup long description, good for pypi but not for easy_install


  • [REFACTOR] Allow to declare Core components
  • [ADD] Howto declare Core / Type
  • [FIX] Model can only inherit simple python class, Mixin or Model
  • [FIX] Mixin inherit chained
  • [FIX] Flake8


  • [FIX] version, documentation, setup


Main version of AnyBlok. You can with this version

  • Create your own application
  • Connect to a database
  • Define bloks
  • Install, Update, Uninstall the blok
  • Define field types
  • Define Column types
  • Define Relationship types
  • Define Core
  • Define Mixin
  • Define Model (SQL or not)
  • Define SQL view
  • Define more than one Model on a specific table
  • Write unittest for your blok