-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add __main__.py for running the package from the command line
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |