Created
June 24, 2022 09:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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