Skip to content

Instantly share code, notes, and snippets.

@sethbunke
Last active January 28, 2021 12:59
Show Gist options
  • Select an option

  • Save sethbunke/e901232e838a53cd1fe0becbf852c0e6 to your computer and use it in GitHub Desktop.

Select an option

Save sethbunke/e901232e838a53cd1fe0becbf852c0e6 to your computer and use it in GitHub Desktop.
Simple Way to Restart Python Flask on File Change During Development
export FLASK_DEBUG=1
export FLASK_APP=name-of-your-python-file-here.py
flask run
@PetNamedEr
Copy link
Copy Markdown

Nice!

@SamsonNegedu
Copy link
Copy Markdown

Thanks for this.

@nobodhi
Copy link
Copy Markdown

nobodhi commented Jan 25, 2019

Excellent thanks.

@ayoubbenaissa
Copy link
Copy Markdown

works nicely :D

@ofw24
Copy link
Copy Markdown

ofw24 commented Oct 28, 2020

I've tried this but I am trying to restart on a .db file change and this hasn't worked for me. Is there a similar method that will work for .db file changes? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment