Tips & Tricks

Reuse code

Duplicated Python code is a common problem. Here are suggestions to reduce that.

  1. Use loops to avoid duplication
  2. Group common code into functions
  3. Look up values to handle variations
  4. Store data in data files, not Python files

Gramex Tips

Below is the list of tips for Gramex use that have been shared via email as well

  1. 2017/06/29 - YAML Reuse Configurations
  2. 2017/07/05 - Cache and Open files in Gramex
  3. 2017/07/06 - Automatically fixing Python build errors
  4. 2017/07/10 - Function reloading
  5. 2017/07/11 - Using YAMLURL and YAMLPATH
  6. 2017/07/20 - Finding slow code
  7. 2017/07/21 - Websockets
  8. 2017/07/28 - Send email via command line
  9. 2017/08/08 - Testing build errors locally
  10. 2017/08/09 - Schedule tasks at periodic internal
  11. 2017/08/28 - File upload and processing
  12. 2017/08/31 - FormHandler: filtering data
  13. 2017/09/01 - Gramex offline install
  14. 2017/09/05 - Filter data using url
  15. 2017/09/06 - File download
  16. 2017/09/07 - Guide to anonymising confidential data
  17. 2017/09/11 - Serve multiple files using single URL
  18. 2017/09/18 - Automated email alerts in Gramex
  19. 2017/09/18 - Logins for apps on UAT
  20. 2017/09/19 - Cache calculations in Gramex
  21. 2017/09/20 - Customized errors in Gramex
  22. 2017/09/20 - Debugging CaptureHandler for screenshots
  23. 2017/09/21 - FormHandler: views instead of query
  24. 2017/10/09 - Conditions in Gramex
  25. 2017/10/09 - Windows IntegratedAuth - Kerberos authentication
  26. 2017/10/10 - FormHandler: enhancements
  27. 2017/10/17 - Conditional configurations in Gramex
  28. 2017/10/19 - YAML supports multi-line strings
  29. 2017/10/20 - Securing Gramex deployments
  30. 2017/10/25 - FormHandler: Database or File edits
  31. 2017/11/05 - Gramex Configurations
  32. 2017/11/07 - Initialize Gramex Projects
  33. 2017/12/21 - Gramex console shows handler name