Gramex 1.39 Release Notes

PyNode

Gramex can allows you to run JavaScript code via node.js using gramex.pynode.node. Using Gramex FunctionHandlers you can run JavaScript code in node.js. Here is a simple example:

from gramex.pynode import node
from tornado.gen import coroutine, Return

@coroutine
def total(handler):
    result = yield node.js('return Math.abs(x + y)', x=5, y=-10)    # Run code in JS
    raise Return(result)

This returns the result:

{ "error": null, "result": 5 }

See the documentation.

UI Components

MapViewer

Mapviewer tutorial covers g1.mapviewer usage with examples. g1.mapviewer is an abstraction over Leaflet that can create common GIS applications using configurations.

MapViewer

FormHandler

Logviewer

Logviewer documentation now has a section describing how logviewer.db is created. And, covers in detail how metrics are calculated, in particular session relation calculations and scenarios.

Developer Updates

Bug fixes

Stats

Upgrade

To upgrade Gramex, run:

pip install --verbose gramex==1.39

To upgrade apps dependencies, run:

gramex setup --all

This downloads Chromium and other front-end dependencies. That may take time.