Gramex 1.33 Release Notes

Quickstart tutorial

Gramex now has a quickstart tutorial that explains how to create a Gramex application, step-by-step.

Sanddance

Gramex now includes g1 0.6.0. This features a sanddance component. It moves elements smoothly based on pre-defined and custom layouts.

Here’s a sample script:

FormHandler charts

FormHandler now supports Vega-Lite and Vegam charts, which are easier to create. Read the documentation.

Here’s an example:

Add roles to users

All auth handlers support lookup attributes. This lets you add a roles (or any other additional information) to any user using any auth mechanism.

For example, a user logs may in via LDAP, but the project adds a new “role” column for the user. This is maintained in a database or local file, and will be editable via the admin module in the next release.

See the documentation.

Screenshot alerts as user

Smart alerts can email dashboard screenshots. Gramex alerts sends a request to CaptureHandler, which passes the request to the dashboard.

By specifying a user: object in the configuration, alerts can now take a screenshot logging in as a specific user. (Currently, there are a few limitations. Only one user is supported per alert. This requires two Gramex instances. Both problems will be addressed soon.)

(To achieve this, CaptureHandler has been modified to pass on any custom HTTP headers sent y the browser directly to the dashboard.)

Admin module

An early version of the admin module is available. Currently, this is read-only, but will soon have edit capability.

Admin page screenshot

Multi-process logging

The Gramex console and the saved gramex.log files show the port Gramex runs on.

Gramex console logs the port

Here, it is clear that the request came to port 9988. This is useful when multiple Gramex instances are logging into the same gramex.log – which makes it easier to identify which instance served the page. (It is also useful when multiple terminal windows are running Gramex, and you don’t know which instance is running on which port.)

This release also fixes a bug that allows multiple Gramex instances to log to the same file without the file getting locked for backup.

Other enhancements

Stats

TODO

Upgrade

To upgrade Gramex, run:

pip install --verbose gramex==1.33

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