Last active
          June 5, 2017 09:05 
        
      - 
      
- 
        Save pmarques/c45b137defa9fe2a808ad8b5bafde089 to your computer and use it in GitHub Desktop. 
    Lambda function to print python installed packages
  
        
  
    
      This file contains hidden or 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 pip | |
| def lambda_handler(event, context): | |
| installed_packages = pip.get_installed_distributions() | |
| installed_packages_list = sorted(["%s==%s" % (pkg.key, pkg.version) for pkg in installed_packages]) | |
| print("\n".join(installed_packages_list)) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment