How to create a global variable for render_template()?

Solution
style_css_path = os.path.join(os.path.dirname(__file__), 'static', 'style.css')
style_css_mtime = int(os.stat(style_css_path).st_mtime)

@app.context_processor
def cache_busters():
    return {
        'style_css_mtime': style_css_mtime,
    }