From 9e359d5866d94fa9d4b88cbe5c840fa3385e29b8 Mon Sep 17 00:00:00 2001 From: Mario Apra Date: Wed, 26 Jun 2024 23:17:53 +0100 Subject: [PATCH] feat: Add __main__.py for running the package from the command line --- awslimitchecker/__main__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 awslimitchecker/__main__.py diff --git a/awslimitchecker/__main__.py b/awslimitchecker/__main__.py new file mode 100644 index 00000000..f7b5c80a --- /dev/null +++ b/awslimitchecker/__main__.py @@ -0,0 +1,20 @@ +# The idea of this file is to enable running the package with +# `python -m awslimitchecker` or `python -m awslimitchecker [args]`. +# This enables debugging the package when installed in editable mode +# (`pip install -e .`) and running the package from the command line. + +import sys + +from . import runner + + +def main(args=None): + if args is None: + args = sys.argv[1:] + # Parse arguments and run your package's main functionality + print("Running awslimitchecker with arguments:", args) + runner.console_entry_point() + + +if __name__ == "__main__": + main()