amsdal_cli 0.5.4__py3-none-any.whl → 0.5.5__py3-none-any.whl
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.
- amsdal_cli/__about__.py +1 -1
- amsdal_cli/commands/callbacks.py +1 -1
- amsdal_cli/commands/cloud/dependency/sub_commands/dependency_list.py +1 -1
- amsdal_cli/commands/cloud/dependency/sub_commands/dependency_new.py +1 -1
- amsdal_cli/commands/cloud/deploy/sub_commands/deploy_list.py +1 -1
- amsdal_cli/commands/generate/sub_commands/generate_model.py +1 -1
- amsdal_cli/commands/plugin/command.py +3 -0
- amsdal_cli/commands/plugin/templates/.amsdal-cli +2 -2
- amsdal_cli/commands/plugin/templates/README.md +3 -2
- amsdal_cli/commands/plugin/templates/config.yml +20 -0
- amsdal_cli/commands/plugin/templates/pyproject.toml +16 -0
- amsdal_cli/commands/plugin/templates/src/__about__.py +1 -0
- amsdal_cli/commands/plugin/templates/src/__init__.py +0 -0
- amsdal_cli/utils/cli_config.py +1 -0
- {amsdal_cli-0.5.4.dist-info → amsdal_cli-0.5.5.dist-info}/METADATA +1 -1
- {amsdal_cli-0.5.4.dist-info → amsdal_cli-0.5.5.dist-info}/RECORD +19 -17
- amsdal_cli/commands/plugin/templates/plugin.yml +0 -20
- amsdal_cli/commands/plugin/templates/requirements.txt +0 -1
- {amsdal_cli-0.5.4.dist-info → amsdal_cli-0.5.5.dist-info}/WHEEL +0 -0
- {amsdal_cli-0.5.4.dist-info → amsdal_cli-0.5.5.dist-info}/entry_points.txt +0 -0
- {amsdal_cli-0.5.4.dist-info → amsdal_cli-0.5.5.dist-info}/licenses/LICENSE.txt +0 -0
amsdal_cli/__about__.py
CHANGED
amsdal_cli/commands/callbacks.py
CHANGED
|
@@ -94,7 +94,7 @@ def init_app_context(
|
|
|
94
94
|
try:
|
|
95
95
|
amsdal_config = AmsdalConfigManager().get_config()
|
|
96
96
|
except Exception:
|
|
97
|
-
AmsdalConfigManager().load_config(
|
|
97
|
+
AmsdalConfigManager().load_config(config.config_path)
|
|
98
98
|
|
|
99
99
|
amsdal_config = AmsdalConfigManager().get_config()
|
|
100
100
|
|
|
@@ -47,7 +47,7 @@ async def list_command(
|
|
|
47
47
|
|
|
48
48
|
manager.authenticate()
|
|
49
49
|
|
|
50
|
-
AmsdalConfigManager().load_config(
|
|
50
|
+
AmsdalConfigManager().load_config(cli_config.config_path)
|
|
51
51
|
|
|
52
52
|
try:
|
|
53
53
|
list_response = manager.cloud_actions_manager.list_deploys(list_all=list_all)
|
|
@@ -151,7 +151,7 @@ def generate_model(
|
|
|
151
151
|
models_package_path=output_path,
|
|
152
152
|
models_module_path=settings.USER_MODELS_MODULE,
|
|
153
153
|
object_schema=ObjectSchema(**json_schema),
|
|
154
|
-
module_type=ModuleType.USER,
|
|
154
|
+
module_type=ModuleType.CONTRIB if cli_config.is_plugin else ModuleType.USER,
|
|
155
155
|
dependencies=schema_repository.model_module_info, # type: ignore[arg-type]
|
|
156
156
|
indent_width=' ' * cli_config.indent,
|
|
157
157
|
)
|
|
@@ -137,11 +137,14 @@ def _create_example_model(output_path: Path, models_format: ModelsFormat, contex
|
|
|
137
137
|
# Create Python model
|
|
138
138
|
py_content = f"""from amsdal.types import BaseModel
|
|
139
139
|
from amsdal.types import Field
|
|
140
|
+
from amsdal_utils.models.enums import ModuleType
|
|
140
141
|
|
|
141
142
|
|
|
142
143
|
class ExampleModel(BaseModel):
|
|
143
144
|
\"\"\"Example model for {context['plugin_name']} plugin.\"\"\"
|
|
144
145
|
|
|
146
|
+
__module_type__ = ModuleType.CONTRIB
|
|
147
|
+
|
|
145
148
|
name: str = Field(..., index=True)
|
|
146
149
|
description: str = Field(default="")
|
|
147
150
|
is_active: bool = Field(default=True)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"config_path": "./
|
|
2
|
+
"config_path": "./config.yml",
|
|
3
3
|
"http_port": 8080,
|
|
4
4
|
"check_model_exists": true,
|
|
5
5
|
"json_indent": 4,
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
"application_name": "{{ ctx.plugin_name }}",
|
|
8
8
|
"models_format": "{{ ctx.models_format }}",
|
|
9
9
|
"is_plugin": true
|
|
10
|
-
}
|
|
10
|
+
}
|
|
@@ -6,7 +6,8 @@ This plugin provides custom models, properties, transactions, and hooks for the
|
|
|
6
6
|
|
|
7
7
|
- `src/models/` - Contains model definitions{% if ctx.models_format == 'json' %} in JSON format{% else %} in Python format{% endif %}
|
|
8
8
|
- `src/transactions/` - Contains transaction definitions
|
|
9
|
-
- `
|
|
9
|
+
- `pyproject.toml` - Plugin configuration file
|
|
10
|
+
- `config.yml` - Configuration for connections
|
|
10
11
|
|
|
11
12
|
## Installing this Plugin
|
|
12
13
|
|
|
@@ -46,4 +47,4 @@ amsdal generate hook --model ModelName on_create
|
|
|
46
47
|
|
|
47
48
|
## Testing
|
|
48
49
|
|
|
49
|
-
Test your plugin by integrating it with an AMSDAL application and running the application's test suite.
|
|
50
|
+
Test your plugin by integrating it with an AMSDAL application and running the application's test suite.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
application_name: {{ ctx.plugin_name_slugify }}
|
|
2
|
+
async_mode: {{ 'true' if ctx.is_async_mode else 'false' }}
|
|
3
|
+
connections:
|
|
4
|
+
- name: sqlite_history
|
|
5
|
+
backend: {{ ctx.historical_backend }}
|
|
6
|
+
credentials:
|
|
7
|
+
- db_path: ./warehouse/amsdal_historical.sqlite3
|
|
8
|
+
- check_same_thread: false
|
|
9
|
+
- name: sqlite_state
|
|
10
|
+
backend: {{ ctx.state_backend }}
|
|
11
|
+
credentials:
|
|
12
|
+
- db_path: ./warehouse/amsdal_state.sqlite3
|
|
13
|
+
- check_same_thread: false
|
|
14
|
+
- name: lock
|
|
15
|
+
backend: amsdal_data.lock.implementations.thread_lock.ThreadLock
|
|
16
|
+
resources_config:
|
|
17
|
+
lakehouse: sqlite_history
|
|
18
|
+
lock: lock
|
|
19
|
+
repository:
|
|
20
|
+
default: sqlite_state
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[tool.hatch.build.targets.wheel]
|
|
6
|
+
packages = ["src/"]
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "{{ ctx.plugin_name_slugify }}_amsdal_plugin"
|
|
10
|
+
version = "0.1.0"
|
|
11
|
+
description = "{{ ctx.plugin_name }} plugin for AMSDAL Framework"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"amsdal[cli]=={{ ctx.amsdal_version }}"
|
|
16
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.1.0'
|
|
File without changes
|
amsdal_cli/utils/cli_config.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
amsdal_cli/Third-Party Materials - AMSDAL Dependencies - License Notices.md,sha256=uHJlGG0D4tbpUi8cq-497NNO9ltQ67a5448k-T14HTw,68241
|
|
2
|
-
amsdal_cli/__about__.py,sha256=
|
|
2
|
+
amsdal_cli/__about__.py,sha256=EPO0yn5_cRRN4L7o2A8njb26ZvPG7OJ4hIGTxQSuB6o,124
|
|
3
3
|
amsdal_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
amsdal_cli/app.py,sha256=_ucuLT5ospf1ifFKEG0IMfVnxKjnvPUQ4iMhkvOfCrc,466
|
|
5
5
|
amsdal_cli/main.py,sha256=LtH-BD1eJrAUecjKzC8Gx7kYFUstOMH1erdeJUVqFB8,144
|
|
6
6
|
amsdal_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
amsdal_cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
amsdal_cli/commands/callbacks.py,sha256=
|
|
8
|
+
amsdal_cli/commands/callbacks.py,sha256=B6SXqOsV7c12c-PCrmk7WYosH4d3Nk-U0IZ0ZJrMyJg,4181
|
|
9
9
|
amsdal_cli/commands/api_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
amsdal_cli/commands/api_check/command.py,sha256=dKi37KfkRY6S2PBSeG2kopnZs8OvCkefQCkPx4ud_4Y,4193
|
|
11
11
|
amsdal_cli/commands/api_check/config.py,sha256=X398zfXddxHCJY4v3PBz6IyWsAsTXJRNNt07Nf_0ow8,6711
|
|
@@ -61,14 +61,14 @@ amsdal_cli/commands/cloud/dependency/app.py,sha256=m2pcB5z3257uU7pKt9XoOdQn7J3PU
|
|
|
61
61
|
amsdal_cli/commands/cloud/dependency/command.py,sha256=6nri04NBl4fy4FlrZyorY05samMbYU1-2j88m4t2FD4,272
|
|
62
62
|
amsdal_cli/commands/cloud/dependency/sub_commands/__init__.py,sha256=ZH89xFzDRJmV2e7MdCVDgaZ30B7jxRVUKTNzHAgTFeE,419
|
|
63
63
|
amsdal_cli/commands/cloud/dependency/sub_commands/dependency_delete.py,sha256=8IL5JE4-tBIStoHEteiBWo-Onsv8vLriy79ITSg18Hg,2849
|
|
64
|
-
amsdal_cli/commands/cloud/dependency/sub_commands/dependency_list.py,sha256=
|
|
65
|
-
amsdal_cli/commands/cloud/dependency/sub_commands/dependency_new.py,sha256=
|
|
64
|
+
amsdal_cli/commands/cloud/dependency/sub_commands/dependency_list.py,sha256=2wpRoKLLlOm_BU1NUbitPntCct7MrtsJakxtyXOE-RA,5299
|
|
65
|
+
amsdal_cli/commands/cloud/dependency/sub_commands/dependency_new.py,sha256=BknJ-5151EPVemDuTETBXnTRMMdgwVmOD9dt6698cSE,2993
|
|
66
66
|
amsdal_cli/commands/cloud/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
67
|
amsdal_cli/commands/cloud/deploy/app.py,sha256=_t2LVD8apbyvBrcWdNv1_nXtubng1hLW9fIV97_F8VU,222
|
|
68
68
|
amsdal_cli/commands/cloud/deploy/command.py,sha256=LIX07pTU55GUA9KmTiKDtoCj5Ytx9ZDC7XQsVYUYsh8,262
|
|
69
69
|
amsdal_cli/commands/cloud/deploy/sub_commands/__init__.py,sha256=I7MJEyceCIgCXP7JpX06nLvEA6HUkjj9LSDAb7VfTGo,353
|
|
70
70
|
amsdal_cli/commands/cloud/deploy/sub_commands/deploy_delete.py,sha256=pRLumeigF4e_Nod32p6XkgJsYxbB9H3WSxbv0IwA5Eo,3221
|
|
71
|
-
amsdal_cli/commands/cloud/deploy/sub_commands/deploy_list.py,sha256=
|
|
71
|
+
amsdal_cli/commands/cloud/deploy/sub_commands/deploy_list.py,sha256=ozr7tVbPrTnx_YscyAb1_ZockFfQQSwd6XDijrkZSWk,5534
|
|
72
72
|
amsdal_cli/commands/cloud/deploy/sub_commands/deploy_new.py,sha256=G28mt1cMv8js80FTtzxahCCWV8AVcu7BWe4w7Nqvp04,12748
|
|
73
73
|
amsdal_cli/commands/cloud/environments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
74
|
amsdal_cli/commands/cloud/environments/app.py,sha256=kkzf_kW2jpl3d44qWuIZB5C3uWXzpNpnTIvUpuuPJHE,238
|
|
@@ -115,7 +115,7 @@ amsdal_cli/commands/generate/enums.py,sha256=4Nvbe4aJEUOMkFqjNbr2xtnvzqrJEh2qDiw
|
|
|
115
115
|
amsdal_cli/commands/generate/sub_commands/__init__.py,sha256=WyZ4kE6IH9O_igOVJ31UQtqE12cCKyATi4E-qgslN3k,941
|
|
116
116
|
amsdal_cli/commands/generate/sub_commands/generate_frontend_config.py,sha256=SkEzx7-mWgrPINwPXGRmYO1SVA0RZojOd6BZFQRmG0Q,2574
|
|
117
117
|
amsdal_cli/commands/generate/sub_commands/generate_hook.py,sha256=C0Oy5VokM3BXPq33Kknjvtjwd7hdfSxQFKxJcHu_bgg,1738
|
|
118
|
-
amsdal_cli/commands/generate/sub_commands/generate_model.py,sha256=
|
|
118
|
+
amsdal_cli/commands/generate/sub_commands/generate_model.py,sha256=nscCBi-PRa_JWdZlMo7ij5Ukg2eEk5tqMhMiLOs1Jv4,5927
|
|
119
119
|
amsdal_cli/commands/generate/sub_commands/generate_modifier.py,sha256=NyN7vMTBGaQv6u815WT1lqAlqI4xP1AmIZWq5edZ-5g,1426
|
|
120
120
|
amsdal_cli/commands/generate/sub_commands/generate_permission.py,sha256=gfRhZsnNnd_m_HxdOCB8C22tbMkopg2FTKo-T68b13s,2824
|
|
121
121
|
amsdal_cli/commands/generate/sub_commands/generate_property.py,sha256=XrCjf48oEzuMPqsTuC5Qsn1WbIQzUVW8BNOmXssfUM8,1599
|
|
@@ -162,11 +162,13 @@ amsdal_cli/commands/new/templates/.amsdal/.dependencies,sha256=47DEQpj8HBSa-_TIm
|
|
|
162
162
|
amsdal_cli/commands/new/templates/.amsdal/.environment,sha256=DW5AeeNnA-vTfAByL1iR0osOKBHcEUsSkhUSOtzONgU,4
|
|
163
163
|
amsdal_cli/commands/new/templates/.amsdal/.secrets,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
164
164
|
amsdal_cli/commands/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
165
|
-
amsdal_cli/commands/plugin/command.py,sha256=
|
|
166
|
-
amsdal_cli/commands/plugin/templates/.amsdal-cli,sha256=
|
|
167
|
-
amsdal_cli/commands/plugin/templates/README.md,sha256=
|
|
168
|
-
amsdal_cli/commands/plugin/templates/
|
|
169
|
-
amsdal_cli/commands/plugin/templates/
|
|
165
|
+
amsdal_cli/commands/plugin/command.py,sha256=alrKEIjpy2stMIEqb0fUZ1STu9VroaaKDx03fEJKdgA,4588
|
|
166
|
+
amsdal_cli/commands/plugin/templates/.amsdal-cli,sha256=fhvckKLvaFEzt6ePdgre01vFkr-_AmWHVfJlD6rZZaQ,289
|
|
167
|
+
amsdal_cli/commands/plugin/templates/README.md,sha256=FMwYTXOJ0ZsrhY-wq-c3pH8OeT-oAckjK48s5kh9lW4,1231
|
|
168
|
+
amsdal_cli/commands/plugin/templates/config.yml,sha256=ZEjr5RA0iSG3Nwf_N11WFwpNI8xKbcqoEip_BZgtOtw,635
|
|
169
|
+
amsdal_cli/commands/plugin/templates/pyproject.toml,sha256=fIHM2_nj1Jcw9JqFo_eE22uAazvpuj1fLTcRDr88wpY,387
|
|
170
|
+
amsdal_cli/commands/plugin/templates/src/__about__.py,sha256=IMjkMO3twhQzluVTo8Z6rE7Eg-9U79_LGKMcsWLKBkY,22
|
|
171
|
+
amsdal_cli/commands/plugin/templates/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
172
|
amsdal_cli/commands/plugin/templates/src/models/__init__.py,sha256=93F5MjA9NayBY6wY_ypyf55KYER3eovgj5K0IM8w3Qs,49
|
|
171
173
|
amsdal_cli/commands/plugin/templates/src/transactions/__init__.py,sha256=NzpIjXV6XKtBiZoteisyuWYjZNebuh3EAZ3tzrkAFvU,55
|
|
172
174
|
amsdal_cli/commands/plugin/templates/src/transactions/example_transaction.py,sha256=4NZVRuZ2BXM-nREvGbZv7H36EbzQHGSWBGFaTYWc_E4,1293
|
|
@@ -210,7 +212,7 @@ amsdal_cli/config/main.py,sha256=leYnDJlzhzIAYWOH65QhPLu4zk3ii26ogMBWGYx3uqM,287
|
|
|
210
212
|
amsdal_cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
211
213
|
amsdal_cli/utils/alias_group.py,sha256=v0ninrhZGtZFuJtUH6ZZZ97Irs96nkmIBFm2gY1NdmU,991
|
|
212
214
|
amsdal_cli/utils/check_versions.py,sha256=4Q3GwY_0xgP_RV_ITuFSDigXds-f1QhqCqkUkn-CSMI,1475
|
|
213
|
-
amsdal_cli/utils/cli_config.py,sha256=
|
|
215
|
+
amsdal_cli/utils/cli_config.py,sha256=t1R-U6lh3xzKkBpTgd-Wg7scVeEmf-RAPaL_-DSDaPU,2772
|
|
214
216
|
amsdal_cli/utils/copier.py,sha256=nKo0-P1AhWIb7IjbndYr3Vnvd_avCa566iIbXLK_5a0,5122
|
|
215
217
|
amsdal_cli/utils/markdown_patch.py,sha256=RW58pJhRoUYW1fhId70hw8MD2DF-UqXTYfv7JrSGz5I,1816
|
|
216
218
|
amsdal_cli/utils/render_template.py,sha256=wVjw6K4JZDKz0VElC76Dkgme8di4yfhHIb6hVju9el4,645
|
|
@@ -221,8 +223,8 @@ amsdal_cli/utils/vcs/base.py,sha256=jC05ExJZDnyHAsW7_4IDf8gQcYgK4dXq3zNlFIX66T4,
|
|
|
221
223
|
amsdal_cli/utils/vcs/dummy.py,sha256=Lk8MT-b0YlHHUsiXsq5cvmPwcl4jTYdo8piN5_C8ORA,434
|
|
222
224
|
amsdal_cli/utils/vcs/enums.py,sha256=tYR9LN1IOr8BZFbSeX_vDlhn8fPl4IU-Yakii8lRDYs,69
|
|
223
225
|
amsdal_cli/utils/vcs/git.py,sha256=xHynbZcV6p2D3RFCwu1MGGpV9D7eK-pGUtO8kVexTQM,1269
|
|
224
|
-
amsdal_cli-0.5.
|
|
225
|
-
amsdal_cli-0.5.
|
|
226
|
-
amsdal_cli-0.5.
|
|
227
|
-
amsdal_cli-0.5.
|
|
228
|
-
amsdal_cli-0.5.
|
|
226
|
+
amsdal_cli-0.5.5.dist-info/METADATA,sha256=-0tbpUZNEWRSiaJW4Z7hbA3e1IDEI8ASUHFkrrIXhOY,57105
|
|
227
|
+
amsdal_cli-0.5.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
228
|
+
amsdal_cli-0.5.5.dist-info/entry_points.txt,sha256=GC-8LZsD3W--Pd9_gD4W3tw3ZZyPbSvkZ-qWc9Fx0NI,47
|
|
229
|
+
amsdal_cli-0.5.5.dist-info/licenses/LICENSE.txt,sha256=hG-541PFYfNJi9WRZi_hno91UyqNg7YLK8LR3vLblZA,27355
|
|
230
|
+
amsdal_cli-0.5.5.dist-info/RECORD,,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
plugin_name: {{ ctx.plugin_name_slugify }}
|
|
2
|
-
plugin_type: amsdal_plugin
|
|
3
|
-
version: "1.0.0"
|
|
4
|
-
async_mode: {{ 'true' if ctx.is_async_mode else 'false' }}
|
|
5
|
-
models_format: {{ ctx.models_format }}
|
|
6
|
-
|
|
7
|
-
description: "{{ ctx.plugin_name }} plugin for AMSDAL Framework"
|
|
8
|
-
|
|
9
|
-
# Plugin metadata
|
|
10
|
-
author: ""
|
|
11
|
-
license: ""
|
|
12
|
-
homepage: ""
|
|
13
|
-
|
|
14
|
-
# Dependencies (if any)
|
|
15
|
-
dependencies: []
|
|
16
|
-
|
|
17
|
-
# Plugin configuration
|
|
18
|
-
config:
|
|
19
|
-
models_directory: "src/models"
|
|
20
|
-
transactions_directory: "src/transactions"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
amsdal[cli]=={{ ctx.amsdal_version }}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|