Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2019 19:09
What would you like to do?
import json
from my_utils.os_utils import subprocess_execute
from import hello_world
import pandas as pd
def run(event=dict(), context=dict()):
''' Function to be called by serverless lambda
# make a dummy df to ensure pandas available to the lambda function
df = pd.DataFrame(data=['this is a dataframe'],columns=['message'])
# call something from my_dev package
# print out results of ls
print(subprocess_execute('ls -la'))
# run shell command to print out results of pip freeze
print(subprocess_execute('pip freeze'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment