playground-ls-cli 4.14.1.dev8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. playground_ls_cli-4.14.1.dev8/.github/workflows/tests-cli.yml +128 -0
  2. playground_ls_cli-4.14.1.dev8/.gitignore +124 -0
  3. playground_ls_cli-4.14.1.dev8/Makefile +40 -0
  4. playground_ls_cli-4.14.1.dev8/PKG-INFO +95 -0
  5. playground_ls_cli-4.14.1.dev8/README.md +39 -0
  6. playground_ls_cli-4.14.1.dev8/bin/localstack +23 -0
  7. playground_ls_cli-4.14.1.dev8/localstack_cli/__init__.py +0 -0
  8. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/__init__.py +10 -0
  9. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/console.py +11 -0
  10. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/core_plugin.py +12 -0
  11. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/exceptions.py +19 -0
  12. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/localstack.py +951 -0
  13. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/lpm.py +138 -0
  14. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/main.py +22 -0
  15. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/plugin.py +39 -0
  16. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/plugins.py +134 -0
  17. playground_ls_cli-4.14.1.dev8/localstack_cli/cli/profiles.py +65 -0
  18. playground_ls_cli-4.14.1.dev8/localstack_cli/config.py +1689 -0
  19. playground_ls_cli-4.14.1.dev8/localstack_cli/constants.py +165 -0
  20. playground_ls_cli-4.14.1.dev8/localstack_cli/logging/__init__.py +0 -0
  21. playground_ls_cli-4.14.1.dev8/localstack_cli/logging/format.py +194 -0
  22. playground_ls_cli-4.14.1.dev8/localstack_cli/logging/setup.py +142 -0
  23. playground_ls_cli-4.14.1.dev8/localstack_cli/packages/__init__.py +25 -0
  24. playground_ls_cli-4.14.1.dev8/localstack_cli/packages/api.py +418 -0
  25. playground_ls_cli-4.14.1.dev8/localstack_cli/packages/core.py +416 -0
  26. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/__init__.py +0 -0
  27. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/__init__.py +0 -0
  28. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/__init__.py +1 -0
  29. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/auth.py +213 -0
  30. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/dns_utils.py +55 -0
  31. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/entitlements.py +117 -0
  32. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/extensions/__init__.py +3 -0
  33. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/extensions/__main__.py +106 -0
  34. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/extensions/autoinstall.py +63 -0
  35. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/extensions/bootstrap.py +97 -0
  36. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/extensions/repository.py +374 -0
  37. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/licensingv2.py +1259 -0
  38. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/__init__.py +0 -0
  39. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/api_types.py +17 -0
  40. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/constants.py +26 -0
  41. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/remotes/__init__.py +0 -0
  42. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/remotes/api.py +75 -0
  43. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/remotes/configs.py +69 -0
  44. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods/remotes/params.py +86 -0
  45. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/bootstrap/pods_client.py +834 -0
  46. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/__init__.py +0 -0
  47. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/auth.py +226 -0
  48. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/aws.py +16 -0
  49. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/cli.py +99 -0
  50. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/click_utils.py +21 -0
  51. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/cloud_pods.py +465 -0
  52. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/diff_view.py +41 -0
  53. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/ephemeral.py +199 -0
  54. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/extensions.py +492 -0
  55. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/iam.py +180 -0
  56. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/license.py +90 -0
  57. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/localstack.py +118 -0
  58. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/replicator.py +378 -0
  59. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/state.py +183 -0
  60. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/cli/tree_view.py +235 -0
  61. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/config.py +556 -0
  62. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/constants.py +54 -0
  63. playground_ls_cli-4.14.1.dev8/localstack_cli/pro/core/plugins.py +169 -0
  64. playground_ls_cli-4.14.1.dev8/localstack_cli/runtime/__init__.py +6 -0
  65. playground_ls_cli-4.14.1.dev8/localstack_cli/runtime/exceptions.py +7 -0
  66. playground_ls_cli-4.14.1.dev8/localstack_cli/runtime/hooks.py +73 -0
  67. playground_ls_cli-4.14.1.dev8/localstack_cli/testing/__init__.py +1 -0
  68. playground_ls_cli-4.14.1.dev8/localstack_cli/testing/config.py +4 -0
  69. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/__init__.py +0 -0
  70. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/__init__.py +12 -0
  71. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/cli.py +67 -0
  72. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/client.py +111 -0
  73. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/events.py +30 -0
  74. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/logger.py +48 -0
  75. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/metadata.py +250 -0
  76. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/publisher.py +160 -0
  77. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/analytics/service_request_aggregator.py +133 -0
  78. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/archives.py +271 -0
  79. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/batching.py +258 -0
  80. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/bootstrap.py +1418 -0
  81. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/checksum.py +313 -0
  82. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/collections.py +554 -0
  83. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/common.py +229 -0
  84. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/container_networking.py +142 -0
  85. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/container_utils/__init__.py +0 -0
  86. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/container_utils/container_client.py +1585 -0
  87. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/container_utils/docker_cmd_client.py +987 -0
  88. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/container_utils/docker_sdk_client.py +1018 -0
  89. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/crypto.py +294 -0
  90. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/docker_utils.py +272 -0
  91. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/files.py +327 -0
  92. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/functions.py +92 -0
  93. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/http.py +326 -0
  94. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/json.py +219 -0
  95. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/net.py +516 -0
  96. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/no_exit_argument_parser.py +19 -0
  97. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/numbers.py +49 -0
  98. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/objects.py +235 -0
  99. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/patch.py +260 -0
  100. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/platform.py +77 -0
  101. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/run.py +514 -0
  102. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/server/__init__.py +0 -0
  103. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/server/tcp_proxy.py +108 -0
  104. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/serving.py +187 -0
  105. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/ssl.py +71 -0
  106. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/strings.py +245 -0
  107. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/sync.py +267 -0
  108. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/threads.py +163 -0
  109. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/time.py +81 -0
  110. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/urls.py +21 -0
  111. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/venv.py +100 -0
  112. playground_ls_cli-4.14.1.dev8/localstack_cli/utils/xml.py +41 -0
  113. playground_ls_cli-4.14.1.dev8/localstack_cli/version.py +34 -0
  114. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/PKG-INFO +95 -0
  115. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/SOURCES.txt +250 -0
  116. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/dependency_links.txt +1 -0
  117. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/entry_points.txt +17 -0
  118. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/requires.txt +40 -0
  119. playground_ls_cli-4.14.1.dev8/playground_ls_cli.egg-info/top_level.txt +1 -0
  120. playground_ls_cli-4.14.1.dev8/plux.ini +15 -0
  121. playground_ls_cli-4.14.1.dev8/pyproject.toml +104 -0
  122. playground_ls_cli-4.14.1.dev8/setup.cfg +4 -0
  123. playground_ls_cli-4.14.1.dev8/tests/__init__.py +0 -0
  124. playground_ls_cli-4.14.1.dev8/tests/bootstrap/__init__.py +0 -0
  125. playground_ls_cli-4.14.1.dev8/tests/bootstrap/extensions/__init__.py +0 -0
  126. playground_ls_cli-4.14.1.dev8/tests/bootstrap/extensions/test_extension_install.py +52 -0
  127. playground_ls_cli-4.14.1.dev8/tests/cli/__init__.py +2 -0
  128. playground_ls_cli-4.14.1.dev8/tests/cli/conftest.py +10 -0
  129. playground_ls_cli-4.14.1.dev8/tests/cli/test_cli.py +336 -0
  130. playground_ls_cli-4.14.1.dev8/tests/cli/test_cli_pro.py +223 -0
  131. playground_ls_cli-4.14.1.dev8/tests/conftest.py +7 -0
  132. playground_ls_cli-4.14.1.dev8/tests/integration/__init__.py +0 -0
  133. playground_ls_cli-4.14.1.dev8/tests/integration/cli/__init__.py +0 -0
  134. playground_ls_cli-4.14.1.dev8/tests/integration/cli/test_cli.py +336 -0
  135. playground_ls_cli-4.14.1.dev8/tests/integration/cli/test_lpm.py +120 -0
  136. playground_ls_cli-4.14.1.dev8/tests/integration/replicator/__init__.py +0 -0
  137. playground_ls_cli-4.14.1.dev8/tests/integration/replicator/core/__init__.py +0 -0
  138. playground_ls_cli-4.14.1.dev8/tests/integration/replicator/core/test_replicator_cli.py +146 -0
  139. playground_ls_cli-4.14.1.dev8/tests/unit/__init__.py +0 -0
  140. playground_ls_cli-4.14.1.dev8/tests/unit/cli/__init__.py +0 -0
  141. playground_ls_cli-4.14.1.dev8/tests/unit/cli/test_profiles.py +148 -0
  142. playground_ls_cli-4.14.1.dev8/tests/unit/pro/__init__.py +0 -0
  143. playground_ls_cli-4.14.1.dev8/tests/unit/pro/test_cli.py +68 -0
  144. playground_ls_cli-4.14.1.dev8/tests/unit/pro/test_grace_period.py +101 -0
  145. playground_ls_cli-4.14.1.dev8/tests/unit/replicator/__init__.py +0 -0
  146. playground_ls_cli-4.14.1.dev8/tests/unit/replicator/test_profile_loading.py +136 -0
@@ -0,0 +1,128 @@
1
+ name: CLI Tests
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ PYTEST_LOGLEVEL:
7
+ type: choice
8
+ description: Loglevel for PyTest
9
+ options:
10
+ - DEBUG
11
+ - INFO
12
+ - WARNING
13
+ default: WARNING
14
+ publish_to_pypi:
15
+ type: boolean
16
+ description: Publish to PyPI after tests pass
17
+ default: false
18
+ pull_request:
19
+ paths:
20
+ - '**'
21
+ - '!README.md'
22
+ - '!.gitignore'
23
+ push:
24
+ branches:
25
+ - main
26
+ - release/*
27
+ tags:
28
+ - 'v[0-9]+.[0-9]+.[0-9]+'
29
+
30
+ concurrency:
31
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
32
+ cancel-in-progress: true
33
+
34
+ env:
35
+ PYTEST_LOGLEVEL: "${{ inputs.PYTEST_LOGLEVEL || 'WARNING' }}"
36
+
37
+ permissions:
38
+ contents: read
39
+
40
+ jobs:
41
+ cli-tests:
42
+ runs-on: ubuntu-latest
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
47
+ timeout-minutes: 15
48
+ steps:
49
+ - name: Checkout
50
+ uses: actions/checkout@v6
51
+ with:
52
+ fetch-depth: 0
53
+
54
+ - name: Set up Python
55
+ uses: actions/setup-python@v6
56
+ with:
57
+ python-version: ${{ matrix.python-version }}
58
+
59
+ - name: Login to Docker Hub
60
+ uses: docker/login-action@v3
61
+ with:
62
+ username: ${{ secrets.DOCKERHUB_PULL_USERNAME }}
63
+ password: ${{ secrets.DOCKERHUB_PULL_TOKEN }}
64
+
65
+ - name: Pull Docker images
66
+ run: |
67
+ docker pull localstack/localstack-pro
68
+
69
+ - name: Install dependencies
70
+ run: |
71
+ python -m pip install --upgrade pip setuptools wheel
72
+ python -m pip install -e ".[test]"
73
+
74
+ - name: Run CLI smoke tests
75
+ run: |
76
+ # Sanity check CLI invocation
77
+ exit_code=0; DEBUG=0 localstack || exit_code=$?; [ "$exit_code" -eq "2" ]
78
+ exit_code=0; DEBUG=1 localstack || exit_code=$?; [ "$exit_code" -eq "2" ]
79
+ # Check Pro CLI plugin is loaded
80
+ DEBUG=1 localstack 2>&1 | grep "Advanced:" || echo "Pro commands not available (expected without auth)"
81
+
82
+ - name: Run CLI tests
83
+ env:
84
+ LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
85
+ run: |
86
+ python -m pytest tests/cli/ \
87
+ --log-cli-level=${{ env.PYTEST_LOGLEVEL }} \
88
+ -v -s
89
+
90
+ - name: Run unit tests
91
+ env:
92
+ LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
93
+ run: |
94
+ python -m pytest tests/unit/ \
95
+ --log-cli-level=${{ env.PYTEST_LOGLEVEL }} \
96
+ -v -s
97
+
98
+ publish:
99
+ if: >-
100
+ (github.event.inputs.publish_to_pypi == 'true' && github.ref == 'refs/heads/main') ||
101
+ startsWith(github.ref, 'refs/tags/v')
102
+ needs: cli-tests
103
+ runs-on: ubuntu-latest
104
+ environment: pypi
105
+ permissions:
106
+ contents: read
107
+ id-token: write
108
+ steps:
109
+ - name: Checkout
110
+ uses: actions/checkout@v6
111
+ with:
112
+ fetch-depth: 0
113
+
114
+ - name: Set up Python
115
+ uses: actions/setup-python@v6
116
+ with:
117
+ python-version: "3.12"
118
+
119
+ - name: Install build dependencies
120
+ run: |
121
+ python -m pip install --upgrade pip
122
+ python -m pip install build twine
123
+
124
+ - name: Build package
125
+ run: python -m build
126
+
127
+ - name: Publish to PyPI
128
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,124 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Django stuff:
54
+ *.log
55
+ local_settings.py
56
+
57
+ # Flask stuff:
58
+ instance/
59
+ .webassets-cache
60
+
61
+ # Scrapy stuff:
62
+ .scrapy
63
+
64
+ # Sphinx documentation
65
+ docs/_build/
66
+
67
+ # PyBuilder
68
+ target/
69
+
70
+ # Jupyter Notebook
71
+ .ipynb_checkpoints
72
+
73
+ # IPython
74
+ profile_default/
75
+ ipython_config.py
76
+
77
+ # pyenv
78
+ .python-version
79
+
80
+ # celery beat schedule file
81
+ celerybeat-schedule
82
+
83
+ # SageMath parsed files
84
+ *.sage.py
85
+
86
+ # Environments
87
+ .env
88
+ .venv
89
+ env/
90
+ venv/
91
+ ENV/
92
+ env.bak/
93
+ venv.bak/
94
+
95
+ # Spyder project settings
96
+ .spyderproject
97
+ .spyproject
98
+
99
+ # Rope project settings
100
+ .ropeproject
101
+
102
+ # mkdocs documentation
103
+ /site
104
+
105
+ # mypy
106
+ .mypy_cache/
107
+ .dmypy.json
108
+ dmypy.json
109
+
110
+ # Pyre type checker
111
+ .pyre/
112
+
113
+ # IDE
114
+ .idea/
115
+ .vscode/
116
+ *.swp
117
+ *.swo
118
+ *~
119
+
120
+ # LocalStack specific
121
+ localstack_cli/version.py
122
+
123
+ # Claude
124
+ .claude/
@@ -0,0 +1,40 @@
1
+ .PHONY: install test test-unit test-integration lint clean entrypoints
2
+
3
+ VENV_DIR ?= .venv
4
+ PYTHON ?= python3
5
+
6
+ venv:
7
+ $(PYTHON) -m venv $(VENV_DIR)
8
+ $(VENV_DIR)/bin/pip install --upgrade pip setuptools wheel
9
+
10
+ install: venv
11
+ $(VENV_DIR)/bin/pip install -e ".[dev]"
12
+ $(VENV_DIR)/bin/python -m plux entrypoints
13
+ $(VENV_DIR)/bin/pip install -e .
14
+
15
+ test: install
16
+ $(VENV_DIR)/bin/pytest tests/ -v --log-cli-level=WARNING
17
+
18
+ test-unit: install
19
+ $(VENV_DIR)/bin/pytest tests/unit/ -v --log-cli-level=WARNING
20
+
21
+ test-cli: install
22
+ $(VENV_DIR)/bin/pytest tests/cli/ -v --log-cli-level=WARNING
23
+
24
+ lint: install
25
+ $(VENV_DIR)/bin/ruff check localstack_cli tests
26
+ $(VENV_DIR)/bin/ruff format --check localstack_cli tests
27
+
28
+ format: install
29
+ $(VENV_DIR)/bin/ruff check --fix localstack_cli tests
30
+ $(VENV_DIR)/bin/ruff format localstack_cli tests
31
+
32
+ entrypoints: install
33
+ $(VENV_DIR)/bin/python -m plux entrypoints
34
+ @test -s plux.ini || (echo "Entrypoints not created correctly!" && exit 1)
35
+
36
+ clean:
37
+ rm -rf $(VENV_DIR)
38
+ rm -rf build dist *.egg-info
39
+ find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
40
+ find . -type f -name "*.pyc" -delete
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: playground-ls-cli
3
+ Version: 4.14.1.dev8
4
+ Summary: The LocalStack Command Line Interface
5
+ Author-email: LocalStack Contributors <info@localstack.cloud>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://localstack.cloud
8
+ Project-URL: Documentation, https://docs.localstack.cloud
9
+ Project-URL: Repository, https://github.com/localstack/localstack.git
10
+ Project-URL: Issues, https://github.com/localstack/localstack/issues
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Internet
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: asn1crypto
21
+ Requires-Dist: cachetools>=5.0
22
+ Requires-Dist: click>=8.2.0
23
+ Requires-Dist: cryptography
24
+ Requires-Dist: dnslib>=0.9.10
25
+ Requires-Dist: dnspython>=1.16.0
26
+ Requires-Dist: docker>=6.1.1
27
+ Requires-Dist: plux>=1.14.0
28
+ Requires-Dist: psutil>=5.4.8
29
+ Requires-Dist: python-dotenv>=0.19.1
30
+ Requires-Dist: pyyaml>=5.1
31
+ Requires-Dist: rich>=12.3.0
32
+ Requires-Dist: requests>=2.20.0
33
+ Requires-Dist: semver>=2.10
34
+ Requires-Dist: tabulate
35
+ Requires-Dist: packaging
36
+ Requires-Dist: pyotp>=2.9.0
37
+ Requires-Dist: PyJWT[crypto]>=1.7.0
38
+ Requires-Dist: python-dateutil>=2.8
39
+ Requires-Dist: windows-curses; platform_system == "Windows"
40
+ Provides-Extra: test
41
+ Requires-Dist: pytest>=7.4.2; extra == "test"
42
+ Requires-Dist: pytest-httpserver>=1.1.2; extra == "test"
43
+ Requires-Dist: pytest-tinybird>=0.5.0; extra == "test"
44
+ Requires-Dist: boto3; extra == "test"
45
+ Requires-Dist: jsonpatch; extra == "test"
46
+ Requires-Dist: xmltodict; extra == "test"
47
+ Requires-Dist: cbor2; extra == "test"
48
+ Requires-Dist: hypercorn; extra == "test"
49
+ Requires-Dist: flask; extra == "test"
50
+ Requires-Dist: rolo; extra == "test"
51
+ Provides-Extra: dev
52
+ Requires-Dist: playground-ls-cli[test]; extra == "dev"
53
+ Requires-Dist: libcst; extra == "dev"
54
+ Requires-Dist: ruff>=0.3.3; extra == "dev"
55
+ Requires-Dist: pre-commit>=3.5.0; extra == "dev"
56
+
57
+ # LocalStack CLI
58
+
59
+ The command-line interface for [LocalStack](https://localstack.cloud), a cloud service emulator that runs on your laptop or in your CI environment.
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ pip install localstack-cli-standalone
65
+ ```
66
+
67
+ Requires Docker to be installed and running.
68
+
69
+ ## Usage
70
+
71
+ Start LocalStack:
72
+
73
+ ```bash
74
+ localstack start
75
+ ```
76
+
77
+ Check service status:
78
+
79
+ ```bash
80
+ localstack status services
81
+ ```
82
+
83
+ Stop LocalStack:
84
+
85
+ ```bash
86
+ localstack stop
87
+ ```
88
+
89
+ ## Documentation
90
+
91
+ For full documentation, visit [docs.localstack.cloud](https://docs.localstack.cloud).
92
+
93
+ ## License
94
+
95
+ Apache License 2.0
@@ -0,0 +1,39 @@
1
+ # LocalStack CLI
2
+
3
+ The command-line interface for [LocalStack](https://localstack.cloud), a cloud service emulator that runs on your laptop or in your CI environment.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install localstack-cli-standalone
9
+ ```
10
+
11
+ Requires Docker to be installed and running.
12
+
13
+ ## Usage
14
+
15
+ Start LocalStack:
16
+
17
+ ```bash
18
+ localstack start
19
+ ```
20
+
21
+ Check service status:
22
+
23
+ ```bash
24
+ localstack status services
25
+ ```
26
+
27
+ Stop LocalStack:
28
+
29
+ ```bash
30
+ localstack stop
31
+ ```
32
+
33
+ ## Documentation
34
+
35
+ For full documentation, visit [docs.localstack.cloud](https://docs.localstack.cloud).
36
+
37
+ ## License
38
+
39
+ Apache License 2.0
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import glob
4
+ import os
5
+ import sys
6
+
7
+ PARENT_FOLDER = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
8
+ venv_dir = os.path.join(PARENT_FOLDER, ".venv")
9
+ insert_pos = min(len(sys.path), 2)
10
+ if os.path.isdir(venv_dir):
11
+ for path in glob.glob(os.path.join(venv_dir, "lib/python*/site-packages")):
12
+ sys.path.insert(insert_pos, path)
13
+ sys.path.insert(insert_pos, PARENT_FOLDER)
14
+
15
+
16
+ def main():
17
+ from localstack_cli.cli import main
18
+
19
+ main.main()
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()
@@ -0,0 +1,10 @@
1
+ from .console import console
2
+ from .plugin import LocalstackCli, LocalstackCliPlugin
3
+
4
+ name = "cli"
5
+
6
+ __all__ = [
7
+ "console",
8
+ "LocalstackCli",
9
+ "LocalstackCliPlugin",
10
+ ]
@@ -0,0 +1,11 @@
1
+ from rich.console import Console
2
+
3
+ BANNER = r"""
4
+ __ _______ __ __
5
+ / / ____ _________ _/ / ___// /_____ ______/ /__
6
+ / / / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
7
+ / /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
8
+ /_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|
9
+ """
10
+
11
+ console = Console()
@@ -0,0 +1,12 @@
1
+ """Core CLI plugin that registers community CLI commands."""
2
+ from localstack_cli.cli.plugin import LocalstackCli, LocalstackCliPlugin
3
+
4
+
5
+ class CoreCliPlugin(LocalstackCliPlugin):
6
+ """Plugin that registers core CLI commands."""
7
+
8
+ name = "core"
9
+
10
+ def attach(self, cli: LocalstackCli) -> None:
11
+ # Core commands are already on the main group, nothing to add
12
+ pass
@@ -0,0 +1,19 @@
1
+ import typing as t
2
+ from gettext import gettext
3
+
4
+ import click
5
+ from click import ClickException, echo
6
+ from click._compat import get_text_stderr
7
+
8
+
9
+ class CLIError(ClickException):
10
+ """A ClickException with a red error message"""
11
+
12
+ def format_message(self) -> str:
13
+ return click.style(f"❌ Error: {self.message}", fg="red")
14
+
15
+ def show(self, file: t.IO[t.Any] | None = None) -> None:
16
+ if file is None:
17
+ file = get_text_stderr()
18
+
19
+ echo(gettext(self.format_message()), file=file)