Skip to content

Instantly share code, notes, and snippets.

@oeeckhoutte
Created June 24, 2022 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oeeckhoutte/060bfdad2108fad1c614ba90d7bddc1d to your computer and use it in GitHub Desktop.
Save oeeckhoutte/060bfdad2108fad1c614ba90d7bddc1d to your computer and use it in GitHub Desktop.
Basic and base sitecustomize file I am using in all my Python projects for fast development when communicating with external services
import os
CRED = '\033[91m'
CEND = '\033[0m'
def print_red(msg):
print(CRED + "#"*80 + CEND)
print(CRED + msg + CEND)
print(CRED + "#"*80 + CEND)
enable_cache: int = os.getenv('DEV_CACHE')
if enable_cache and enable_cache == "1":
import requests_cache
requests_cache.install_cache("dev_cache")
print_red("WARNING: Dev Cache is enabled")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment