This section contains a few ipyaggrid key architecture decisions and thier reasons.
# In, Down, Up, Out
To make the data path clear we have added the following suffixes to data variables. Each corresponds to a step on the path:
_in: Python variable, data input by the Python user
_out: Python variable, data made available to the Python user, built from
This sequence of variables on the data sync path make the ipyaggrid easy to use, hopefully , and simpler to debug and understand.
The variables naturally hidden to the Python user typically start with
_, the others not.
As a consequence, the 4 variables containing grid data are:
However in the case of a
list changing one key/value or element is not enough to trigger the sync, as explained in the ipywidget issue 786. For this reason we have added the
_grid_data_up and then
However there is a bug in ipywidgets, explained in the trailets issue 496, that prevents syncing a
dict in some cases. The traitlets PR 466 should solve this problem. In the meantime we have added a
counter key/value in the
grid_data_out variable to always trigger the update. See file grid.py.
ipyaggrid approach is to wrap ag-Grid as transparently as possible in order to:
- provide unlimited access to all ag-Grid features
- Pay attention to the origin of the notebooks you run - to the same extent you visit potentially malicious websites
- Get into the habit of running Jupyter in a Private mode
When working with the
DOMWidgetModel, it is necessary to extend the serializers from
DOMWidgetModel.serializers. Otherwise the layout, which needs a proper
serializer, will not have it and you will probably get an error.
For compatibility with Python gzip, use
# Time Zones
In order to display a date in the same way irrespective of which time zone the user sits, we have created a Cell Renderer for dates that counter the changes performed automatically by the browser. See function
dateFormatter in helpersBuiltin.js.