Skip to content

Instantly share code, notes, and snippets.

@shauryashaurya
Forked from joshkehn/fabfile.py
Created July 25, 2023 01:00
Show Gist options
  • Save shauryashaurya/3b97c9f11a50e9c2563585c8ff3a832e to your computer and use it in GitHub Desktop.
Save shauryashaurya/3b97c9f11a50e9c2563585c8ff3a832e to your computer and use it in GitHub Desktop.
from fabric.api import local
import pip
def freeze ():
local("pip freeze > requirements.txt")
local("git add requirements.txt")
local("git commit -v")
def upgrade ():
for dist in pip.get_installed_distributions():
local("pip install --upgrade {0}".format(dist.project_name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment