amsdal 0.4.13__cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.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/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1334 -0
- amsdal/__about__.py +4 -0
- amsdal/__about__.pyi +1 -0
- amsdal/__init__.py +23 -0
- amsdal/__init__.pyi +9 -0
- amsdal/__migrations__/0000_initial.py +217 -0
- amsdal/__migrations__/0001_datetime_type.py +18 -0
- amsdal/__migrations__/0002_fixture_order.py +44 -0
- amsdal/__migrations__/0003_schema_type_in_class_meta.py +44 -0
- amsdal/cloud/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/__init__.pyi +0 -0
- amsdal/cloud/client.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/client.pyi +57 -0
- amsdal/cloud/constants.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/constants.pyi +13 -0
- amsdal/cloud/enums.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/enums.pyi +68 -0
- amsdal/cloud/models/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/models/__init__.pyi +0 -0
- amsdal/cloud/models/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/models/base.pyi +247 -0
- amsdal/cloud/services/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/__init__.pyi +0 -0
- amsdal/cloud/services/actions/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/__init__.pyi +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_allowlist_ip.pyi +19 -0
- amsdal/cloud/services/actions/add_basic_auth.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_basic_auth.pyi +21 -0
- amsdal/cloud/services/actions/add_dependency.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_dependency.pyi +19 -0
- amsdal/cloud/services/actions/add_secret.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/add_secret.pyi +20 -0
- amsdal/cloud/services/actions/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/base.pyi +122 -0
- amsdal/cloud/services/actions/create_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_deploy.pyi +41 -0
- amsdal/cloud/services/actions/create_env.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_env.pyi +19 -0
- amsdal/cloud/services/actions/create_session.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/create_session.pyi +17 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_allowlist_ip.pyi +19 -0
- amsdal/cloud/services/actions/delete_basic_auth.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_basic_auth.pyi +20 -0
- amsdal/cloud/services/actions/delete_dependency.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_dependency.pyi +21 -0
- amsdal/cloud/services/actions/delete_env.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_env.pyi +21 -0
- amsdal/cloud/services/actions/delete_secret.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/delete_secret.pyi +21 -0
- amsdal/cloud/services/actions/destroy_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/destroy_deploy.pyi +18 -0
- amsdal/cloud/services/actions/expose_db.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/expose_db.pyi +22 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +21 -0
- amsdal/cloud/services/actions/get_monitoring_info.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/get_monitoring_info.pyi +21 -0
- amsdal/cloud/services/actions/list_dependencies.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_dependencies.pyi +21 -0
- amsdal/cloud/services/actions/list_deploys.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_deploys.pyi +19 -0
- amsdal/cloud/services/actions/list_envs.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_envs.pyi +20 -0
- amsdal/cloud/services/actions/list_secrets.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/list_secrets.pyi +22 -0
- amsdal/cloud/services/actions/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/manager.pyi +278 -0
- amsdal/cloud/services/actions/signup_action.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/signup_action.pyi +20 -0
- amsdal/cloud/services/actions/update_deploy.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/actions/update_deploy.pyi +19 -0
- amsdal/cloud/services/auth/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/__init__.pyi +0 -0
- amsdal/cloud/services/auth/base.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/base.pyi +6 -0
- amsdal/cloud/services/auth/credentials.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/credentials.pyi +30 -0
- amsdal/cloud/services/auth/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/manager.pyi +26 -0
- amsdal/cloud/services/auth/signup_service.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/signup_service.pyi +32 -0
- amsdal/cloud/services/auth/token.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/cloud/services/auth/token.pyi +27 -0
- amsdal/configs/__init__.py +0 -0
- amsdal/configs/__init__.pyi +0 -0
- amsdal/configs/constants.py +33 -0
- amsdal/configs/constants.pyi +22 -0
- amsdal/configs/main.py +258 -0
- amsdal/configs/main.pyi +173 -0
- amsdal/context/__init__.py +0 -0
- amsdal/context/__init__.pyi +0 -0
- amsdal/context/manager.py +69 -0
- amsdal/context/manager.pyi +50 -0
- amsdal/contrib/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/contrib/__init__.pyi +0 -0
- amsdal/contrib/app_config.py +7 -0
- amsdal/contrib/app_config.pyi +6 -0
- amsdal/contrib/auth/__init__.py +0 -0
- amsdal/contrib/auth/__init__.pyi +0 -0
- amsdal/contrib/auth/app.py +27 -0
- amsdal/contrib/auth/app.pyi +15 -0
- amsdal/contrib/auth/decorators/__init__.py +35 -0
- amsdal/contrib/auth/decorators/__init__.pyi +6 -0
- amsdal/contrib/auth/errors.py +7 -0
- amsdal/contrib/auth/errors.pyi +4 -0
- amsdal/contrib/auth/fixtures/basic_permissions.json +64 -0
- amsdal/contrib/auth/lifecycle/__init__.py +0 -0
- amsdal/contrib/auth/lifecycle/__init__.pyi +0 -0
- amsdal/contrib/auth/lifecycle/consumer.py +394 -0
- amsdal/contrib/auth/lifecycle/consumer.pyi +108 -0
- amsdal/contrib/auth/migrations/0000_initial.py +84 -0
- amsdal/contrib/auth/models/__init__.py +0 -0
- amsdal/contrib/auth/models/__init__.pyi +0 -0
- amsdal/contrib/auth/models/login_session.py +118 -0
- amsdal/contrib/auth/models/login_session.pyi +37 -0
- amsdal/contrib/auth/models/permission.py +23 -0
- amsdal/contrib/auth/models/permission.pyi +18 -0
- amsdal/contrib/auth/models/user.py +106 -0
- amsdal/contrib/auth/models/user.pyi +46 -0
- amsdal/contrib/auth/settings.py +36 -0
- amsdal/contrib/auth/settings.pyi +26 -0
- amsdal/contrib/frontend_configs/__init__.py +0 -0
- amsdal/contrib/frontend_configs/__init__.pyi +0 -0
- amsdal/contrib/frontend_configs/app.py +24 -0
- amsdal/contrib/frontend_configs/app.pyi +19 -0
- amsdal/contrib/frontend_configs/constants.py +1 -0
- amsdal/contrib/frontend_configs/constants.pyi +1 -0
- amsdal/contrib/frontend_configs/conversion/__init__.py +5 -0
- amsdal/contrib/frontend_configs/conversion/__init__.pyi +3 -0
- amsdal/contrib/frontend_configs/conversion/convert.py +286 -0
- amsdal/contrib/frontend_configs/conversion/convert.pyi +22 -0
- amsdal/contrib/frontend_configs/lifecycle/__init__.py +0 -0
- amsdal/contrib/frontend_configs/lifecycle/__init__.pyi +0 -0
- amsdal/contrib/frontend_configs/lifecycle/consumer.py +306 -0
- amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +98 -0
- amsdal/contrib/frontend_configs/migrations/0000_initial.py +256 -0
- amsdal/contrib/frontend_configs/models/__init__.py +0 -0
- amsdal/contrib/frontend_configs/models/__init__.pyi +0 -0
- amsdal/contrib/frontend_configs/models/frontend_activator_config.py +22 -0
- amsdal/contrib/frontend_configs/models/frontend_activator_config.pyi +12 -0
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator.py +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator.pyi +7 -0
- amsdal/contrib/frontend_configs/models/frontend_config_control_action.py +54 -0
- amsdal/contrib/frontend_configs/models/frontend_config_control_action.pyi +32 -0
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator.py +21 -0
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator.pyi +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_option.py +12 -0
- amsdal/contrib/frontend_configs/models/frontend_config_option.pyi +8 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.py +17 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.pyi +8 -0
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option.py +13 -0
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option.pyi +9 -0
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask.py +14 -0
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask.pyi +10 -0
- amsdal/contrib/frontend_configs/models/frontend_config_validator.py +28 -0
- amsdal/contrib/frontend_configs/models/frontend_config_validator.pyi +15 -0
- amsdal/contrib/frontend_configs/models/frontend_control_config.py +87 -0
- amsdal/contrib/frontend_configs/models/frontend_control_config.pyi +35 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config.py +14 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config.pyi +9 -0
- amsdal/contrib/frontend_configs/utils.py +29 -0
- amsdal/contrib/frontend_configs/utils.pyi +17 -0
- amsdal/errors.py +31 -0
- amsdal/errors.pyi +12 -0
- amsdal/fixtures/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/fixtures/__init__.pyi +0 -0
- amsdal/fixtures/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/fixtures/manager.pyi +170 -0
- amsdal/fixtures/utils.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/fixtures/utils.pyi +9 -0
- amsdal/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/manager.pyi +265 -0
- amsdal/mixins/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/mixins/__init__.pyi +0 -0
- amsdal/mixins/class_versions_mixin.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/mixins/class_versions_mixin.pyi +12 -0
- amsdal/models/__init__.py +19 -0
- amsdal/models/__init__.pyi +9 -0
- amsdal/models/core/__init__.py +0 -0
- amsdal/models/core/__init__.pyi +0 -0
- amsdal/models/core/class_object.py +37 -0
- amsdal/models/core/class_object.pyi +24 -0
- amsdal/models/core/class_object_meta.py +26 -0
- amsdal/models/core/class_object_meta.pyi +15 -0
- amsdal/models/core/class_property.py +20 -0
- amsdal/models/core/class_property.pyi +11 -0
- amsdal/models/core/class_property_meta.py +15 -0
- amsdal/models/core/class_property_meta.pyi +10 -0
- amsdal/models/core/file.py +156 -0
- amsdal/models/core/file.pyi +104 -0
- amsdal/models/core/fixture.py +25 -0
- amsdal/models/core/fixture.pyi +14 -0
- amsdal/models/core/option.py +11 -0
- amsdal/models/core/option.pyi +8 -0
- amsdal/models/core/validator.py +12 -0
- amsdal/models/core/validator.pyi +8 -0
- amsdal/models/types/__init__.py +0 -0
- amsdal/models/types/__init__.pyi +0 -0
- amsdal/models/types/object.py +26 -0
- amsdal/models/types/object.pyi +16 -0
- amsdal/py.typed +0 -0
- amsdal/queryset/__init__.py +21 -0
- amsdal/queryset/__init__.pyi +6 -0
- amsdal/schemas/__init__.py +0 -0
- amsdal/schemas/__init__.pyi +0 -0
- amsdal/schemas/core/class_object/model.json +31 -0
- amsdal/schemas/core/class_object/properties/display_name.py +9 -0
- amsdal/schemas/core/class_object_meta/model.json +59 -0
- amsdal/schemas/core/class_property/model.json +22 -0
- amsdal/schemas/core/class_property_meta/model.json +23 -0
- amsdal/schemas/core/file/hooks/pre_create.py +24 -0
- amsdal/schemas/core/file/hooks/pre_update.py +24 -0
- amsdal/schemas/core/file/model.json +23 -0
- amsdal/schemas/core/file/properties/from_file.py +34 -0
- amsdal/schemas/core/file/properties/mimetype.py +13 -0
- amsdal/schemas/core/file/properties/str.py +6 -0
- amsdal/schemas/core/file/properties/to_file.py +24 -0
- amsdal/schemas/core/file/properties/validate_data.py +32 -0
- amsdal/schemas/core/fixture/model.json +35 -0
- amsdal/schemas/core/option/model.json +19 -0
- amsdal/schemas/core/validator/model.json +19 -0
- amsdal/schemas/interfaces.py +25 -0
- amsdal/schemas/interfaces.pyi +20 -0
- amsdal/schemas/manager.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/schemas/manager.py +0 -0
- amsdal/schemas/manager.pyi +0 -0
- amsdal/schemas/mixins/__init__.py +0 -0
- amsdal/schemas/mixins/__init__.pyi +0 -0
- amsdal/schemas/mixins/check_dependencies_mixin.py +125 -0
- amsdal/schemas/mixins/check_dependencies_mixin.pyi +45 -0
- amsdal/schemas/mixins/verify_schemas_mixin.py +96 -0
- amsdal/schemas/mixins/verify_schemas_mixin.pyi +33 -0
- amsdal/schemas/repository.py +84 -0
- amsdal/schemas/repository.pyi +22 -0
- amsdal/schemas/types/anything/model.json +7 -0
- amsdal/schemas/types/array/model.json +7 -0
- amsdal/schemas/types/binary/model.json +7 -0
- amsdal/schemas/types/boolean/model.json +17 -0
- amsdal/schemas/types/date/model.json +7 -0
- amsdal/schemas/types/datetime/model.json +7 -0
- amsdal/schemas/types/dictionary/model.json +8 -0
- amsdal/schemas/types/number/model.json +8 -0
- amsdal/schemas/types/object/model.json +53 -0
- amsdal/schemas/types/string/model.json +8 -0
- amsdal/schemas/utils.py +16 -0
- amsdal/schemas/utils.pyi +10 -0
- amsdal/services/__init__.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/services/__init__.pyi +0 -0
- amsdal/services/transaction_execution.cpython-312-x86_64-linux-gnu.so +0 -0
- amsdal/services/transaction_execution.pyi +93 -0
- amsdal/transactions/__init__.py +13 -0
- amsdal/transactions/__init__.pyi +4 -0
- amsdal/utils/__init__.py +0 -0
- amsdal/utils/__init__.pyi +0 -0
- amsdal/utils/contrib_paths.py +23 -0
- amsdal/utils/contrib_paths.pyi +14 -0
- amsdal/utils/rollback/__init__.py +440 -0
- amsdal/utils/rollback/__init__.pyi +38 -0
- amsdal/utils/tests/__init__.py +0 -0
- amsdal/utils/tests/enums.py +18 -0
- amsdal/utils/tests/factories.py +49 -0
- amsdal/utils/tests/helpers.py +499 -0
- amsdal-0.4.13.dist-info/METADATA +369 -0
- amsdal-0.4.13.dist-info/RECORD +269 -0
- amsdal-0.4.13.dist-info/WHEEL +6 -0
- amsdal-0.4.13.dist-info/licenses/LICENSE.txt +107 -0
- amsdal-0.4.13.dist-info/top_level.txt +1 -0
amsdal/__about__.py
ADDED
amsdal/__about__.pyi
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
__version__: str
|
amsdal/__init__.py
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# SPDX-FileCopyrightText: 2023-present
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: TODO
|
4
|
+
from amsdal_data.aliases.using import DEFAULT_DB_ALIAS
|
5
|
+
from amsdal_data.aliases.using import LAKEHOUSE_DB_ALIAS
|
6
|
+
from amsdal_models.classes.helpers.reference_loader import ReferenceLoader
|
7
|
+
from amsdal_utils.config.manager import AmsdalConfigManager
|
8
|
+
from amsdal_utils.models.data_models.metadata import Metadata
|
9
|
+
from amsdal_utils.models.data_models.reference import Reference
|
10
|
+
from amsdal_utils.models.enums import Versions
|
11
|
+
|
12
|
+
from amsdal.context.manager import AmsdalContextManager
|
13
|
+
|
14
|
+
__all__ = [
|
15
|
+
'DEFAULT_DB_ALIAS',
|
16
|
+
'LAKEHOUSE_DB_ALIAS',
|
17
|
+
'AmsdalConfigManager',
|
18
|
+
'AmsdalContextManager',
|
19
|
+
'Metadata',
|
20
|
+
'Reference',
|
21
|
+
'ReferenceLoader',
|
22
|
+
'Versions',
|
23
|
+
]
|
amsdal/__init__.pyi
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
from amsdal.context.manager import AmsdalContextManager as AmsdalContextManager
|
2
|
+
from amsdal_data.aliases.using import DEFAULT_DB_ALIAS as DEFAULT_DB_ALIAS, LAKEHOUSE_DB_ALIAS as LAKEHOUSE_DB_ALIAS
|
3
|
+
from amsdal_models.classes.helpers.reference_loader import ReferenceLoader as ReferenceLoader
|
4
|
+
from amsdal_utils.config.manager import AmsdalConfigManager as AmsdalConfigManager
|
5
|
+
from amsdal_utils.models.data_models.metadata import Metadata as Metadata
|
6
|
+
from amsdal_utils.models.data_models.reference import Reference as Reference
|
7
|
+
from amsdal_utils.models.enums import Versions as Versions
|
8
|
+
|
9
|
+
__all__ = ['DEFAULT_DB_ALIAS', 'LAKEHOUSE_DB_ALIAS', 'AmsdalConfigManager', 'AmsdalContextManager', 'Metadata', 'Reference', 'ReferenceLoader', 'Versions']
|
@@ -0,0 +1,217 @@
|
|
1
|
+
from amsdal_models.migration import migrations
|
2
|
+
from amsdal_utils.models.enums import ModuleType
|
3
|
+
|
4
|
+
|
5
|
+
class Migration(migrations.Migration):
|
6
|
+
operations: list[migrations.Operation] = [
|
7
|
+
migrations.CreateClass(
|
8
|
+
module_type=ModuleType.TYPE,
|
9
|
+
class_name='Object',
|
10
|
+
new_schema={
|
11
|
+
'title': 'Object',
|
12
|
+
'properties': {
|
13
|
+
'title': {'type': 'string', 'title': 'Title'},
|
14
|
+
'type': {'type': 'string', 'title': 'Type'},
|
15
|
+
'default': {'type': 'anything', 'title': 'Default'},
|
16
|
+
'properties': {
|
17
|
+
'type': 'dictionary',
|
18
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
|
19
|
+
'title': 'Properties',
|
20
|
+
},
|
21
|
+
'required': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Required'},
|
22
|
+
'unique': {
|
23
|
+
'type': 'array',
|
24
|
+
'items': {'type': 'array', 'items': {'type': 'string'}},
|
25
|
+
'title': 'Unique Fields',
|
26
|
+
},
|
27
|
+
'custom_code': {'type': 'string', 'title': 'Custom Code'},
|
28
|
+
'meta_class': {'type': 'string', 'title': 'Meta Class'},
|
29
|
+
},
|
30
|
+
},
|
31
|
+
),
|
32
|
+
migrations.CreateClass(
|
33
|
+
module_type=ModuleType.TYPE,
|
34
|
+
class_name='Binary',
|
35
|
+
new_schema={'title': 'Binary', 'properties': {}, 'meta_class': 'TypeMeta'},
|
36
|
+
),
|
37
|
+
migrations.CreateClass(
|
38
|
+
module_type=ModuleType.TYPE,
|
39
|
+
class_name='Dictionary',
|
40
|
+
new_schema={'title': 'Dictionary', 'properties': {}, 'meta_class': 'TypeMeta'},
|
41
|
+
),
|
42
|
+
migrations.CreateClass(
|
43
|
+
module_type=ModuleType.TYPE,
|
44
|
+
class_name='Anything',
|
45
|
+
new_schema={'title': 'Anything', 'properties': {}, 'meta_class': 'TypeMeta'},
|
46
|
+
),
|
47
|
+
migrations.CreateClass(
|
48
|
+
module_type=ModuleType.TYPE,
|
49
|
+
class_name='String',
|
50
|
+
new_schema={'title': 'String', 'default': '', 'properties': {}, 'meta_class': 'TypeMeta'},
|
51
|
+
),
|
52
|
+
migrations.CreateClass(
|
53
|
+
module_type=ModuleType.TYPE,
|
54
|
+
class_name='Array',
|
55
|
+
new_schema={'title': 'Array', 'properties': {}, 'meta_class': 'TypeMeta'},
|
56
|
+
),
|
57
|
+
migrations.CreateClass(
|
58
|
+
module_type=ModuleType.TYPE,
|
59
|
+
class_name='Number',
|
60
|
+
new_schema={'title': 'Number', 'properties': {}, 'meta_class': 'TypeMeta'},
|
61
|
+
),
|
62
|
+
migrations.CreateClass(
|
63
|
+
module_type=ModuleType.TYPE,
|
64
|
+
class_name='Boolean',
|
65
|
+
new_schema={
|
66
|
+
'title': 'Boolean',
|
67
|
+
'properties': {},
|
68
|
+
'options': [{'key': 'true', 'value': True}, {'key': 'false', 'value': False}],
|
69
|
+
'meta_class': 'TypeMeta',
|
70
|
+
},
|
71
|
+
),
|
72
|
+
migrations.CreateClass(
|
73
|
+
module_type=ModuleType.CORE,
|
74
|
+
class_name='Option',
|
75
|
+
new_schema={
|
76
|
+
'title': 'Option',
|
77
|
+
'required': ['key', 'value'],
|
78
|
+
'properties': {
|
79
|
+
'key': {'type': 'string', 'title': 'Key'},
|
80
|
+
'value': {'type': 'string', 'title': 'Value Type'},
|
81
|
+
},
|
82
|
+
'meta_class': 'TypeMeta',
|
83
|
+
},
|
84
|
+
),
|
85
|
+
migrations.CreateClass(
|
86
|
+
module_type=ModuleType.CORE,
|
87
|
+
class_name='Validator',
|
88
|
+
new_schema={
|
89
|
+
'title': 'Validator',
|
90
|
+
'required': ['name', 'data'],
|
91
|
+
'properties': {
|
92
|
+
'name': {'type': 'string', 'title': 'Validator Name'},
|
93
|
+
'data': {'type': 'anything', 'title': 'Validator Data'},
|
94
|
+
},
|
95
|
+
'meta_class': 'TypeMeta',
|
96
|
+
},
|
97
|
+
),
|
98
|
+
migrations.CreateClass(
|
99
|
+
module_type=ModuleType.CORE,
|
100
|
+
class_name='ClassPropertyMeta',
|
101
|
+
new_schema={
|
102
|
+
'title': 'ClassPropertyMeta',
|
103
|
+
'properties': {
|
104
|
+
'title': {'type': 'string', 'title': 'Title'},
|
105
|
+
'default': {'type': 'anything', 'title': 'Default'},
|
106
|
+
'options': {'type': 'array', 'items': {'type': 'Option'}, 'title': 'Options'},
|
107
|
+
},
|
108
|
+
'meta_class': 'TypeMeta',
|
109
|
+
},
|
110
|
+
),
|
111
|
+
migrations.CreateClass(
|
112
|
+
module_type=ModuleType.CORE,
|
113
|
+
class_name='ClassProperty',
|
114
|
+
new_schema={
|
115
|
+
'title': 'ClassProperty',
|
116
|
+
'required': ['type'],
|
117
|
+
'properties': {
|
118
|
+
'type': {'type': 'string', 'title': 'Type'},
|
119
|
+
'items': {
|
120
|
+
'type': 'dictionary',
|
121
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
|
122
|
+
'title': 'Items',
|
123
|
+
},
|
124
|
+
'db_field': {
|
125
|
+
'type': 'array',
|
126
|
+
'items': {'type': 'string'},
|
127
|
+
'title': 'DB Fields',
|
128
|
+
},
|
129
|
+
},
|
130
|
+
'meta_class': 'TypeMeta',
|
131
|
+
},
|
132
|
+
),
|
133
|
+
migrations.CreateClass(
|
134
|
+
module_type=ModuleType.CORE,
|
135
|
+
class_name='ClassObject',
|
136
|
+
new_schema={
|
137
|
+
'title': 'ClassObject',
|
138
|
+
'properties': {
|
139
|
+
'table_name': {'type': 'string', 'title': 'Table Name'},
|
140
|
+
'properties': {
|
141
|
+
'type': 'dictionary',
|
142
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'ClassProperty'}},
|
143
|
+
'title': 'Properties',
|
144
|
+
},
|
145
|
+
'primary_key': {
|
146
|
+
'type': 'array',
|
147
|
+
'items': {'type': 'string'},
|
148
|
+
'title': 'Primary key fields',
|
149
|
+
},
|
150
|
+
'indexed': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Indexed'},
|
151
|
+
'unique': {
|
152
|
+
'type': 'array',
|
153
|
+
'items': {'type': 'array', 'items': {'type': 'string'}},
|
154
|
+
'title': 'Unique Fields',
|
155
|
+
},
|
156
|
+
'required': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Required'},
|
157
|
+
'meta_class': {'type': 'string', 'default': 'ClassObject', 'title': 'Meta Class'},
|
158
|
+
},
|
159
|
+
'custom_code': '@property # type: ignore[misc]\ndef display_name(self) -> str: # type: ignore[no-untyped-def]\n return self.title',
|
160
|
+
},
|
161
|
+
),
|
162
|
+
migrations.CreateClass(
|
163
|
+
module_type=ModuleType.CORE,
|
164
|
+
class_name='ClassObjectMeta',
|
165
|
+
new_schema={
|
166
|
+
'title': 'ClassObjectMeta',
|
167
|
+
'required': ['title', 'type'],
|
168
|
+
'properties': {
|
169
|
+
'title': {'type': 'string', 'title': 'Title'},
|
170
|
+
'type': {'type': 'string', 'title': 'Type'},
|
171
|
+
'default': {'type': 'anything', 'title': 'Default'},
|
172
|
+
'properties': {
|
173
|
+
'type': 'dictionary',
|
174
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'ClassPropertyMeta'}},
|
175
|
+
'title': 'Properties',
|
176
|
+
},
|
177
|
+
'custom_code': {'type': 'string', 'title': 'Custom Code'},
|
178
|
+
},
|
179
|
+
},
|
180
|
+
),
|
181
|
+
migrations.CreateClass(
|
182
|
+
module_type=ModuleType.CORE,
|
183
|
+
class_name='Fixture',
|
184
|
+
new_schema={
|
185
|
+
'title': 'Fixture',
|
186
|
+
'required': ['data', 'external_id'],
|
187
|
+
'properties': {
|
188
|
+
'class_name': {'type': 'string', 'title': 'Class Name'},
|
189
|
+
'external_id': {'type': 'string', 'title': 'External ID'},
|
190
|
+
'data': {
|
191
|
+
'type': 'dictionary',
|
192
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
|
193
|
+
'title': 'Data',
|
194
|
+
},
|
195
|
+
},
|
196
|
+
"primary_key": ["partition_key"],
|
197
|
+
"table_name": "Fixture",
|
198
|
+
'unique': [['external_id']],
|
199
|
+
},
|
200
|
+
),
|
201
|
+
migrations.CreateClass(
|
202
|
+
module_type=ModuleType.CORE,
|
203
|
+
class_name='File',
|
204
|
+
new_schema={
|
205
|
+
'title': 'File',
|
206
|
+
'required': ['filename', 'data'],
|
207
|
+
'properties': {
|
208
|
+
'filename': {'type': 'string', 'title': 'Filename'},
|
209
|
+
'data': {'type': 'binary', 'title': 'Data'},
|
210
|
+
'size': {'type': 'number', 'title': 'Size'},
|
211
|
+
},
|
212
|
+
"primary_key": ["partition_key"],
|
213
|
+
"table_name": "File",
|
214
|
+
'custom_code': "def pre_update(self): # type: ignore[no-untyped-def]\n self.size = len(self.data or b'')\n\ndef pre_create(self) -> None: # type: ignore[no-untyped-def]\n self.size = len(self.data or b'')\n\nfrom pathlib import Path\nfrom typing import BinaryIO\n\n\ndef to_file(self, file_or_path: Path | BinaryIO) -> None: # type: ignore[no-untyped-def]\n if isinstance(file_or_path, Path):\n if file_or_path.is_dir():\n file_or_path = file_or_path / self.name\n file_or_path.write_bytes(self.data) # type: ignore[union-attr]\n else:\n file_or_path.write(self.data)\n file_or_path.seek(0)\n\nfrom pathlib import Path\nfrom typing import BinaryIO\n\n\n@classmethod # type: ignore[misc, no-untyped-def]\ndef from_file(\n cls,\n file_or_path: Path | BinaryIO,\n) -> 'File': # type: ignore[name-defined] # noqa: F821\n if isinstance(file_or_path, Path):\n if file_or_path.is_dir():\n msg = f'{file_or_path} is a directory'\n raise ValueError(msg)\n\n data = file_or_path.read_bytes()\n filename = file_or_path.name\n else:\n file_or_path.seek(0)\n data = file_or_path.read()\n filename = Path(file_or_path.name).name\n\n return cls(data=data, filename=filename)\n\nimport base64\n\nfrom pydantic import field_validator\n\n\n@field_validator('data') # type: ignore[misc]\n@classmethod\ndef data_base64_decode(cls, v: bytes) -> bytes: # type: ignore[no-untyped-def] # noqa: ARG001\n is_base64: bool = False\n\n try:\n is_base64 = base64.b64encode(base64.b64decode(v)) == v\n except Exception:\n ...\n\n if is_base64:\n return base64.b64decode(v)\n\n return v\n\n@property # type: ignore[misc]\ndef mimetype(self) -> str | None: # type: ignore[no-untyped-def]\n import mimetypes\n\n return mimetypes.guess_type(self.filename)[0]",
|
215
|
+
},
|
216
|
+
),
|
217
|
+
]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
from amsdal_utils.models.enums import ModuleType
|
2
|
+
|
3
|
+
from amsdal_models.migration import migrations
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
operations: list[migrations.Operation] = [
|
8
|
+
migrations.CreateClass(
|
9
|
+
module_type=ModuleType.TYPE,
|
10
|
+
class_name='Date',
|
11
|
+
new_schema={'title': 'Date', 'properties': {}, 'meta_class': 'TypeMeta'},
|
12
|
+
),
|
13
|
+
migrations.CreateClass(
|
14
|
+
module_type=ModuleType.TYPE,
|
15
|
+
class_name='Datetime',
|
16
|
+
new_schema={'title': 'Datetime', 'properties': {}, 'meta_class': 'TypeMeta'},
|
17
|
+
),
|
18
|
+
]
|
@@ -0,0 +1,44 @@
|
|
1
|
+
from amsdal_models.migration import migrations
|
2
|
+
from amsdal_utils.models.enums import ModuleType
|
3
|
+
|
4
|
+
|
5
|
+
class Migration(migrations.Migration):
|
6
|
+
operations: list[migrations.Operation] = [
|
7
|
+
migrations.UpdateClass(
|
8
|
+
module_type=ModuleType.CORE,
|
9
|
+
class_name='Fixture',
|
10
|
+
old_schema={
|
11
|
+
'title': 'Fixture',
|
12
|
+
'required': ['data', 'external_id'],
|
13
|
+
'properties': {
|
14
|
+
'class_name': {'type': 'string', 'title': 'Class Name'},
|
15
|
+
'external_id': {'type': 'string', 'title': 'External ID'},
|
16
|
+
'data': {
|
17
|
+
'type': 'dictionary',
|
18
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
|
19
|
+
'title': 'Data',
|
20
|
+
},
|
21
|
+
},
|
22
|
+
"primary_key": ["partition_key"],
|
23
|
+
"table_name": "Fixture",
|
24
|
+
'unique': [['external_id']],
|
25
|
+
},
|
26
|
+
new_schema={
|
27
|
+
'title': 'Fixture',
|
28
|
+
'required': ['data', 'external_id'],
|
29
|
+
'properties': {
|
30
|
+
'class_name': {'type': 'string', 'title': 'Class Name'},
|
31
|
+
'order': {'type': 'number', 'title': 'Order'},
|
32
|
+
'external_id': {'type': 'string', 'title': 'External ID'},
|
33
|
+
'data': {
|
34
|
+
'type': 'dictionary',
|
35
|
+
'items': {'key': {'type': 'string'}, 'value': {'type': 'anything'}},
|
36
|
+
'title': 'Data',
|
37
|
+
},
|
38
|
+
},
|
39
|
+
"primary_key": ["partition_key"],
|
40
|
+
"table_name": "Fixture",
|
41
|
+
'unique': [['external_id']],
|
42
|
+
},
|
43
|
+
),
|
44
|
+
]
|
@@ -0,0 +1,44 @@
|
|
1
|
+
from amsdal_models.migration import migrations
|
2
|
+
from amsdal_utils.models.enums import ModuleType
|
3
|
+
|
4
|
+
|
5
|
+
class Migration(migrations.Migration):
|
6
|
+
operations: list[migrations.Operation] = [
|
7
|
+
migrations.UpdateClass(
|
8
|
+
module_type=ModuleType.CORE,
|
9
|
+
class_name='ClassObjectMeta',
|
10
|
+
old_schema={
|
11
|
+
"title": "ClassObjectMeta",
|
12
|
+
"type": "object",
|
13
|
+
"properties": {
|
14
|
+
"title": {"title": "Title", "type": "string"},
|
15
|
+
"type": {"title": "Type", "type": "string"},
|
16
|
+
"default": {"title": "Default", "type": "anything"},
|
17
|
+
"properties": {
|
18
|
+
"title": "Properties",
|
19
|
+
"type": "dictionary",
|
20
|
+
"items": {"key": {"type": "string"}, "value": {"type": "ClassPropertyMeta"}},
|
21
|
+
},
|
22
|
+
"custom_code": {"title": "Custom Code", "type": "string"},
|
23
|
+
},
|
24
|
+
"required": ["title", "type"],
|
25
|
+
},
|
26
|
+
new_schema={
|
27
|
+
"title": "ClassObjectMeta",
|
28
|
+
"type": "object",
|
29
|
+
"properties": {
|
30
|
+
"title": {"title": "Title", "type": "string"},
|
31
|
+
"type": {"title": "Type", "type": "string"},
|
32
|
+
"default": {"title": "Default", "type": "anything"},
|
33
|
+
"class_schema_type": {"title": "Schema Type", "type": "string"},
|
34
|
+
"properties": {
|
35
|
+
"title": "Properties",
|
36
|
+
"type": "dictionary",
|
37
|
+
"items": {"key": {"type": "string"}, "value": {"type": "ClassPropertyMeta"}},
|
38
|
+
},
|
39
|
+
"custom_code": {"title": "Custom Code", "type": "string"},
|
40
|
+
},
|
41
|
+
"required": ["title", "type"],
|
42
|
+
},
|
43
|
+
),
|
44
|
+
]
|
Binary file
|
File without changes
|
Binary file
|
amsdal/cloud/client.pyi
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
import httpx
|
2
|
+
from amsdal.cloud.constants import BASE_AUTH_URL as BASE_AUTH_URL
|
3
|
+
from amsdal.errors import AmsdalAuthConnectionError as AmsdalAuthConnectionError
|
4
|
+
from typing import Any, Protocol
|
5
|
+
|
6
|
+
class HttpFunction(Protocol):
|
7
|
+
"""
|
8
|
+
Protocol for HTTP function callables.
|
9
|
+
|
10
|
+
This protocol defines the structure for callables that perform HTTP requests, ensuring they accept a URL and
|
11
|
+
additional keyword arguments.
|
12
|
+
"""
|
13
|
+
def __call__(self, url: str, **kwargs: Any) -> httpx.Response: ...
|
14
|
+
|
15
|
+
class AuthClientService:
|
16
|
+
"""
|
17
|
+
Service to handle HTTP requests for authentication.
|
18
|
+
|
19
|
+
This class provides functionality to perform HTTP GET and POST requests to the authentication server,
|
20
|
+
handling connection errors and setting default timeouts.
|
21
|
+
"""
|
22
|
+
DEFAULT_TIMEOUT: int
|
23
|
+
def _default_handler(self, calling_function: HttpFunction, path: str, **kwargs: Any) -> httpx.Response: ...
|
24
|
+
def post(self, path: str, **kwargs: Any) -> httpx.Response:
|
25
|
+
"""
|
26
|
+
Sends an HTTP POST request to the specified path.
|
27
|
+
|
28
|
+
This method constructs the full URL using the base authentication URL and the provided path,
|
29
|
+
sets a default timeout, and sends an HTTP POST request.
|
30
|
+
|
31
|
+
Args:
|
32
|
+
path (str): The path to append to the base authentication URL.
|
33
|
+
**kwargs (Any): Additional keyword arguments to pass to the `httpx.post` function.
|
34
|
+
|
35
|
+
Returns:
|
36
|
+
httpx.Response: The response from the HTTP POST request.
|
37
|
+
|
38
|
+
Raises:
|
39
|
+
AmsdalAuthConnectionError: If there is a connection error.
|
40
|
+
"""
|
41
|
+
def get(self, path: str, **kwargs: Any) -> httpx.Response:
|
42
|
+
"""
|
43
|
+
Sends an HTTP GET request to the specified path.
|
44
|
+
|
45
|
+
This method constructs the full URL using the base authentication URL and the provided path,
|
46
|
+
sets a default timeout, and sends an HTTP GET request.
|
47
|
+
|
48
|
+
Args:
|
49
|
+
path (str): The path to append to the base authentication URL.
|
50
|
+
**kwargs (Any): Additional keyword arguments to pass to the `httpx.get` function.
|
51
|
+
|
52
|
+
Returns:
|
53
|
+
httpx.Response: The response from the HTTP GET request.
|
54
|
+
|
55
|
+
Raises:
|
56
|
+
AmsdalAuthConnectionError: If there is a connection error.
|
57
|
+
"""
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from _typeshed import Incomplete
|
2
|
+
from pydantic_settings import BaseSettings
|
3
|
+
|
4
|
+
class Settings(BaseSettings):
|
5
|
+
model_config: Incomplete
|
6
|
+
AMSDAL_SANDBOX_ENVIRONMENT: bool | None
|
7
|
+
|
8
|
+
JWT_PUBLIC_KEY: str
|
9
|
+
ENCRYPT_PUBLIC_KEY: str
|
10
|
+
cloud_settings: Incomplete
|
11
|
+
SYNC_KEY: bytes
|
12
|
+
AMSDAL_ENV_SUBDOMAIN: Incomplete
|
13
|
+
BASE_AUTH_URL: Incomplete
|
Binary file
|
amsdal/cloud/enums.pyi
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class AuthType(Enum):
|
4
|
+
"""
|
5
|
+
Enumeration for authentication types.
|
6
|
+
|
7
|
+
This enum defines the types of authentication methods available.
|
8
|
+
|
9
|
+
Attributes:
|
10
|
+
CREDENTIALS: Authentication using credentials.
|
11
|
+
TOKEN: Authentication using a token.
|
12
|
+
"""
|
13
|
+
CREDENTIALS = ...
|
14
|
+
TOKEN = ...
|
15
|
+
|
16
|
+
class DeployType(str, Enum):
|
17
|
+
"""
|
18
|
+
Enumeration for deployment types.
|
19
|
+
|
20
|
+
This enum defines the types of deployment methods available.
|
21
|
+
|
22
|
+
Attributes:
|
23
|
+
lakehouse_only: Deployment only to the lakehouse.
|
24
|
+
include_state_db: Deployment including the state database.
|
25
|
+
"""
|
26
|
+
lakehouse_only = 'lakehouse_only'
|
27
|
+
include_state_db = 'include_state_db'
|
28
|
+
|
29
|
+
class StateOption(str, Enum):
|
30
|
+
"""
|
31
|
+
Enumeration for state options.
|
32
|
+
|
33
|
+
This enum defines the types of state database options available.
|
34
|
+
|
35
|
+
Attributes:
|
36
|
+
sqlite: State database using SQLite.
|
37
|
+
postgres: State database using PostgreSQL.
|
38
|
+
"""
|
39
|
+
sqlite = 'sqlite'
|
40
|
+
postgres = 'postgres'
|
41
|
+
|
42
|
+
class LakehouseOption(str, Enum):
|
43
|
+
"""
|
44
|
+
Enumeration for lakehouse options.
|
45
|
+
|
46
|
+
This enum defines the types of lakehouse options available.
|
47
|
+
|
48
|
+
Attributes:
|
49
|
+
spark: Lakehouse option using Spark.
|
50
|
+
postgres: Lakehouse option using PostgreSQL.
|
51
|
+
postgres_immutable: Lakehouse option using immutable PostgreSQL.
|
52
|
+
"""
|
53
|
+
spark = 'spark'
|
54
|
+
postgres = 'postgres'
|
55
|
+
postgres_immutable = 'postgres-immutable'
|
56
|
+
|
57
|
+
class ResponseStatus(str, Enum):
|
58
|
+
"""
|
59
|
+
Enumeration for response statuses.
|
60
|
+
|
61
|
+
This enum defines the types of response statuses available.
|
62
|
+
|
63
|
+
Attributes:
|
64
|
+
success: Indicates a successful response.
|
65
|
+
error: Indicates an error response.
|
66
|
+
"""
|
67
|
+
success = 'success'
|
68
|
+
error = 'error'
|
Binary file
|
File without changes
|
Binary file
|