Gramex 1.82 release notes

Gramex 1.82 allows revoking API keys, setting session cookie paths, and Bootstrap 5 support in g1.

Revoke API keys and OTPs

Gramex allows creating an API key using handler.apikey(), like this:

user = {id: 'user@example.com'}       # Ensure there's an 'id' key
expiry = 24 * 60 * 60                 # Expires in 24 hours
key = handler.apikey(expire=expiry, user=user)  # Create key as specified user

To revoke an API key created this way, you can now use:

handler.revoke_apikey(key)

You can also revoke an OTP using:

handler.revoke_apikey(otp)

As part of the session settings, you can add a Cookie Path e.g. cookiepath: /app/path.

This restricts the cookie to /app/path and its subdirectories, and ensures that the cookie does not leak to other applications on the same server.

Bootstrap 5 support in G1

g1 components such as FormHandler used Bootstrap 4 classes and attributes, e.g. data-dismiss="modal".

g1 0.18.0 enhances such components to work both with Bootstrap 4 and Bootstrap 5.

Bug fixes

Backward compatibility & security

Gramex 1.82 is backward compatible with previous releases unless the release notes say otherwise. Automated builds test this.

Every Gramex release is tested for security vulnerabilities using the following tools.

  1. Bandit tests for back-end Python vulnerabilities. See Bandit results
  2. npm-audit tests for front-end JavaScript vulnerabilities. See npm-audit results
  3. Snyk for front-end and back-end vulnerabilities. See Synk results
  4. ClamAV for anti-virus scans. See ClamAV results

Statistics

The Gramex code base has:

How to install

See the Gramex installation and upgrade instructions.