From c7b8649f103e3e5bb8460998b434897716ab2683 Mon Sep 17 00:00:00 2001 From: Sriram Madapusi Vasudevan <3770774+TheSriram@users.noreply.github.com> Date: Thu, 14 Feb 2019 07:10:01 -0800 Subject: [PATCH] feat: allow sam to be invoked as a module (#987) --- .pylintrc | 2 +- samcli/__main__.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 samcli/__main__.py diff --git a/.pylintrc b/.pylintrc index c0987c591e..1d864729c6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -9,7 +9,7 @@ # Add files or directories to the blacklist. They should be base names, not # paths. -ignore=compat.py +ignore=compat.py, __main__.py # Pickle collected data for later comparisons. persistent=yes diff --git a/samcli/__main__.py b/samcli/__main__.py new file mode 100644 index 0000000000..6b8d9261ce --- /dev/null +++ b/samcli/__main__.py @@ -0,0 +1,10 @@ +""" +Invokable Module for CLI + +python -m samcli +""" + +from samcli.cli.main import cli + +if __name__ == "__main__": + cli()