---
title: Tips & Tricks
prefix: Tip
...

## Reuse code

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

1. [Use loops to avoid duplication](reuse-loops.md)
1. [Group common code into functions](reuse-functions.md)
1. [Look up values to handle variations](reuse-dicts.md)
1. [Store data in data files, not Python files](reuse-data-files.md)

## 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](yaml-reuse-configurations.md)
1. 2017/07/05 - [Cache and Open files in Gramex](gramex-cache-open.md)
1. 2017/07/06 - [Automatically fixing Python build errors](fixing-python-build-errors.md)
1. 2017/07/10 - [Function reloading](function-reloading.md)
1. 2017/07/11 - [Using YAMLURL and YAMLPATH](using-yamlurl-yamlpath.md)
1. 2017/07/20 - [Finding slow code](finding-slow-code.md)
1. 2017/07/21 - [Websockets](websockets.md)
1. 2017/07/28 - [Send email via command line](send-email-command-line.md)
1. 2017/08/08 - [Testing build errors locally](testing-build-errors-locally.md)
1. 2017/08/09 - [Schedule tasks at periodic internal](schedule-tasks.md)
1. 2017/08/28 - [File upload and processing](file-upload-processing.md)
1. 2017/08/31 - [FormHandler: filtering data](formhandler-filtering-data.md)
1. 2017/09/01 - [Gramex offline install](gramex-offline-install.md)
1. 2017/09/05 - [Filter data using url](filter-data-using-url.md)
1. 2017/09/06 - [File download](file-download.md)
1. 2017/09/07 - [Guide to anonymising confidential data](guide-to-anonymising-data.md)
1. 2017/09/11 - [Serve multiple files using single URL](serve-multiple-files-under-a-single-url.md)
1. 2017/09/18 - [Automated email alerts in Gramex](automated-email-alters-in-gramex.md)
1. 2017/09/18 - [Logins for apps on UAT](logins-for-apps-on-uat.md)
1. 2017/09/19 - [Cache calculations in Gramex](cache-calculations-in-gramex.md)
1. 2017/09/20 - [Customized errors in Gramex](customized-errors-in-gramex.md)
1. 2017/09/20 - [Debugging CaptureHandler for screenshots](debugging-capturehandler-for-screenshots.md)
1. 2017/09/21 - [FormHandler: views instead of query](views-instead-of-query-in-formhandler.md)
1. 2017/10/09 - [Conditions in Gramex](conditions-in-gramex-yaml.md)
1. 2017/10/09 - [Windows IntegratedAuth - Kerberos authentication](windows-integratedauth.md)
1. 2017/10/10 - [FormHandler: enhancements](formhandler-enhancements.md)
1. 2017/10/17 - [Conditional configurations in Gramex](conditional-configurations-in-gramex.md)
1. 2017/10/19 - [YAML supports multi-line strings](yaml-supports-multi-line-strings.md)
1. 2017/10/20 - [Securing Gramex deployments](securing-gramex-deployments.md)
1. 2017/10/25 - [FormHandler: Database or File edits](database-or-file-edits-via-formhandler.md)
1. 2017/11/05 - [Gramex Configurations](gramex-configurations.md)
1. 2017/11/07 - [Initialize Gramex Projects](initialize-gramex-projects.md)
1. 2017/12/21 - [Gramex console shows handler name](debug-console-shows-handler.md)
