@darabonba/python-generator 2.0.12 → 2.0.14

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 (124) hide show
  1. package/ChangeLog.md +3 -0
  2. package/lib/generator.js +51 -51
  3. package/lib/helper.js +45 -3
  4. package/package.json +1 -1
  5. package/tests/expected/complex/tea_python_tests/client.py +7 -5
  6. package/tests/expected/function/tea_python_tests/client.py +12 -0
  7. package/tests/expected/model/tea_python_tests/models/_my_model.py +36 -0
  8. package/tests/expected/websocket/tea_python_tests/client.py +20 -0
  9. package/tests/fixtures/complex/Darafile +5 -0
  10. package/tests/fixtures/complex/libraries/Darafile +4 -1
  11. package/tests/fixtures/complex/libraries/import.dara +1 -0
  12. package/tests/fixtures/complex/main.dara +1 -0
  13. package/tests/fixtures/function/Darafile +7 -1
  14. package/tests/fixtures/function/main.dara +8 -0
  15. package/tests/fixtures/model/Darafile +8 -0
  16. package/tests/fixtures/model/main.dara +4 -0
  17. package/tests/fixtures/websocket/.libraries.json +3 -0
  18. package/tests/fixtures/websocket/Darafile +9 -0
  19. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/Teafile +21 -0
  20. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/main.tea +1 -0
  21. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/utils.dara +1 -0
  22. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/websocketUtils.dara +9 -0
  23. package/tests/fixtures/websocket/main.dara +8 -0
  24. package/tests/main.tests.js +10 -0
  25. package/tests/output/alias/setup.py +0 -83
  26. package/tests/output/alias/tea_python_tests/client.py +0 -35
  27. package/tests/output/annotation/setup.py +0 -79
  28. package/tests/output/annotation/tea_python_tests/__init__.py +0 -1
  29. package/tests/output/annotation/tea_python_tests/client.py +0 -93
  30. package/tests/output/annotation/tea_python_tests/models/__init__.py +0 -9
  31. package/tests/output/annotation/tea_python_tests/models/_test.py +0 -38
  32. package/tests/output/api/setup.py +0 -79
  33. package/tests/output/api/tea_python_tests/__init__.py +0 -1
  34. package/tests/output/api/tea_python_tests/client.py +0 -106
  35. package/tests/output/builtin/setup.py +0 -79
  36. package/tests/output/builtin/tea_python_tests/__init__.py +0 -1
  37. package/tests/output/builtin/tea_python_tests/client.py +0 -687
  38. package/tests/output/comment/setup.py +0 -79
  39. package/tests/output/comment/tea_python_tests/__init__.py +0 -1
  40. package/tests/output/comment/tea_python_tests/client.py +0 -289
  41. package/tests/output/comment/tea_python_tests/models/__init__.py +0 -13
  42. package/tests/output/comment/tea_python_tests/models/_test_1.py +0 -103
  43. package/tests/output/comment/tea_python_tests/models/_test_2.py +0 -58
  44. package/tests/output/comment/tea_python_tests/models/_test_3.py +0 -64
  45. package/tests/output/complex/setup.py +0 -79
  46. package/tests/output/complex/tea_python_tests/__init__.py +0 -1
  47. package/tests/output/complex/tea_python_tests/client.py +0 -1170
  48. package/tests/output/complex/tea_python_tests/exceptions/__init__.py +0 -11
  49. package/tests/output/complex/tea_python_tests/exceptions/_err_1.py +0 -24
  50. package/tests/output/complex/tea_python_tests/exceptions/_err_2.py +0 -22
  51. package/tests/output/complex/tea_python_tests/models/__init__.py +0 -17
  52. package/tests/output/complex/tea_python_tests/models/_complex_request.py +0 -574
  53. package/tests/output/complex/tea_python_tests/models/_response.py +0 -34
  54. package/tests/output/const/setup.py +0 -79
  55. package/tests/output/const/tea_python_tests/__init__.py +0 -1
  56. package/tests/output/const/tea_python_tests/client.py +0 -12
  57. package/tests/output/empty/setup.py +0 -79
  58. package/tests/output/empty/tea_python_tests/__init__.py +0 -1
  59. package/tests/output/empty/tea_python_tests/client.py +0 -8
  60. package/tests/output/exec/setup.py +0 -79
  61. package/tests/output/exec/tea_python_tests/__init__.py +0 -1
  62. package/tests/output/exec/tea_python_tests/exec_client.py +0 -22
  63. package/tests/output/function/setup.py +0 -79
  64. package/tests/output/function/tea_python_tests/__init__.py +0 -1
  65. package/tests/output/function/tea_python_tests/client.py +0 -65
  66. package/tests/output/import/setup.py +0 -80
  67. package/tests/output/import/tea_python_tests/__init__.py +0 -1
  68. package/tests/output/import/tea_python_tests/client.py +0 -30
  69. package/tests/output/map/setup.py +0 -79
  70. package/tests/output/map/tea_python_tests/__init__.py +0 -1
  71. package/tests/output/map/tea_python_tests/client.py +0 -39
  72. package/tests/output/model/setup.py +0 -79
  73. package/tests/output/model/tea_python_tests/__init__.py +0 -1
  74. package/tests/output/model/tea_python_tests/client.py +0 -8
  75. package/tests/output/model/tea_python_tests/exceptions/__init__.py +0 -9
  76. package/tests/output/model/tea_python_tests/exceptions/_main_file.py +0 -29
  77. package/tests/output/model/tea_python_tests/models/__init__.py +0 -31
  78. package/tests/output/model/tea_python_tests/models/_class.py +0 -23
  79. package/tests/output/model/tea_python_tests/models/_m.py +0 -56
  80. package/tests/output/model/tea_python_tests/models/_main_file.py +0 -73
  81. package/tests/output/model/tea_python_tests/models/_model.py +0 -33
  82. package/tests/output/model/tea_python_tests/models/_my_model.py +0 -750
  83. package/tests/output/modelConfig/setup.py +0 -79
  84. package/tests/output/modelConfig/tea_python_tests/__init__.py +0 -1
  85. package/tests/output/modelConfig/tea_python_tests/client.py +0 -8
  86. package/tests/output/modelConfig/tea_python_tests/exceptions/__init__.py +0 -9
  87. package/tests/output/modelConfig/tea_python_tests/exceptions/_main_file.py +0 -29
  88. package/tests/output/modelConfig/tea_python_tests/models/__init__.py +0 -31
  89. package/tests/output/modelConfig/tea_python_tests/models/_class.py +0 -23
  90. package/tests/output/modelConfig/tea_python_tests/models/_m.py +0 -56
  91. package/tests/output/modelConfig/tea_python_tests/models/_main_file.py +0 -73
  92. package/tests/output/modelConfig/tea_python_tests/models/_model.py +0 -33
  93. package/tests/output/modelConfig/tea_python_tests/models/_my_model.py +0 -750
  94. package/tests/output/multi/setup.py +0 -79
  95. package/tests/output/multi/tea_python_tests/__init__.py +0 -1
  96. package/tests/output/multi/tea_python_tests/api.py +0 -93
  97. package/tests/output/multi/tea_python_tests/api_models/__init__.py +0 -9
  98. package/tests/output/multi/tea_python_tests/api_models/_test_model_dir_2.py +0 -35
  99. package/tests/output/multi/tea_python_tests/client.py +0 -39
  100. package/tests/output/multi/tea_python_tests/exceptions/__init__.py +0 -11
  101. package/tests/output/multi/tea_python_tests/exceptions/_err.py +0 -38
  102. package/tests/output/multi/tea_python_tests/lib/util.py +0 -18
  103. package/tests/output/multi/tea_python_tests/model/user.py +0 -27
  104. package/tests/output/multi/tea_python_tests/model/user_exceptions/__init__.py +0 -13
  105. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err.py +0 -22
  106. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_1.py +0 -54
  107. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_2.py +0 -18
  108. package/tests/output/multi/tea_python_tests/model/user_models/__init__.py +0 -11
  109. package/tests/output/multi/tea_python_tests/model/user_models/_base_info.py +0 -73
  110. package/tests/output/multi/tea_python_tests/model/user_models/_info.py +0 -82
  111. package/tests/output/multi/tea_python_tests/models/__init__.py +0 -11
  112. package/tests/output/multi/tea_python_tests/models/_test_model_dir.py +0 -84
  113. package/tests/output/statements/setup.py +0 -79
  114. package/tests/output/statements/tea_python_tests/__init__.py +0 -1
  115. package/tests/output/statements/tea_python_tests/client.py +0 -86
  116. package/tests/output/super/setup.py +0 -79
  117. package/tests/output/super/tea_python_tests/__init__.py +0 -1
  118. package/tests/output/super/tea_python_tests/client.py +0 -16
  119. package/tests/output/typedef/setup.py +0 -80
  120. package/tests/output/typedef/tea_python_tests/__init__.py +0 -1
  121. package/tests/output/typedef/tea_python_tests/client.py +0 -74
  122. package/tests/output/typedef/tea_python_tests/models/__init__.py +0 -9
  123. package/tests/output/typedef/tea_python_tests/models/_m.py +0 -45
  124. /package/tests/{output/alias → expected/websocket}/tea_python_tests/__init__.py +0 -0
@@ -30,6 +30,7 @@ static function parse(c: class): void;
30
30
  static async function asyncFunc(): void;
31
31
 
32
32
  model Request = {
33
+ CORSRules: string,
33
34
  accesskey?: string(name='accesskey', description='accesskey'),
34
35
  region?: string(name='region', description='region'),
35
36
  instance: {
@@ -300,6 +300,7 @@ api Complex3(request: ComplexRequest, name: string): ComplexRequest {
300
300
  }
301
301
  var resp = __response;
302
302
  var req = new Source.Request{
303
+ CORSRules = "test",
303
304
  accesskey = request.accessKey,
304
305
  region = resp.statusMessage
305
306
  };
@@ -2,5 +2,11 @@
2
2
  "scope": "alibabacloud",
3
3
  "name": "main",
4
4
  "version": "0.0.1",
5
- "main": "./main.dara"
5
+ "main": "./main.dara",
6
+ "python": {
7
+ "keywords": [
8
+ "JWT",
9
+ "OAuth2"
10
+ ]
11
+ }
6
12
  }
@@ -34,4 +34,12 @@ static async function helloInterface(): void;
34
34
 
35
35
  async function aParams(): void {
36
36
  helloParams("a", "b");
37
+ }
38
+
39
+ async function testJWTWithOption(): void {
40
+ helloParams("a", "b");
41
+ }
42
+
43
+ async function testOAuth2forOption(): void {
44
+ helloParams("a", "b");
37
45
  }
@@ -5,5 +5,13 @@
5
5
  "main": "./main.dara",
6
6
  "libraries": {
7
7
  "Source": "darabonba:Import:*"
8
+ },
9
+ "python": {
10
+ "keywords": [
11
+ "CORS",
12
+ "XML",
13
+ "HTTP",
14
+ "OAuth2"
15
+ ]
8
16
  }
9
17
  }
@@ -28,6 +28,10 @@ model MyModel = {
28
28
  str: string
29
29
  },
30
30
  },
31
+ CORSRules: string,
32
+ CORSRulesCORSR: string,
33
+ XMLParserHTTPMessage: string,
34
+ TestOAuth2Name: string,
31
35
  stringfield: string,
32
36
  bytesfield: bytes,
33
37
  stringarrayfield: [ string ],
@@ -0,0 +1,3 @@
1
+ {
2
+ "alibabacloud:OpenApiV2:*": "libraries/alibabacloud_OpenApiV2_0.1.27"
3
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "scope": "darabonba",
3
+ "name": "websocket",
4
+ "version": "0.0.1",
5
+ "main": "./main.dara",
6
+ "libraries": {
7
+ "OpenApi": "alibabacloud:OpenApiV2:*"
8
+ }
9
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "scope": "alibabacloud",
3
+ "name": "OpenApiV2",
4
+ "version": "0.1.27",
5
+ "main": "./main.tea",
6
+ "exports": {
7
+ "OpenApiUtil": "./utils.dara",
8
+ "WebSocketUtils": "./websocketUtils.dara"
9
+ },
10
+ "releases": {
11
+ "python": "alibabacloud_tea_openapi:0.4.4"
12
+ },
13
+ "python": {
14
+ "package": "alibabacloud_tea_openapi",
15
+ "clientName": "client",
16
+ "exports": {
17
+ "OpenApiUtil": "Utils",
18
+ "WebSocketUtils": "Client"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,9 @@
1
+ @clientName("WebSocketClient")
2
+ @overwrite(false)
3
+
4
+ model WebSocketClient {
5
+ }
6
+
7
+ static function createWebSocketClient(client: any): WebSocketClient {
8
+ return client;
9
+ }
@@ -0,0 +1,8 @@
1
+ import OpenApi.WebSocketUtils;
2
+
3
+ init() {
4
+ }
5
+
6
+ static function wrapWebSocketClient(client: any): WebSocketUtils.WebSocketClient {
7
+ return WebSocketUtils.createWebSocketClient(client);
8
+ }
@@ -330,4 +330,14 @@ describe('Python Generator', function () {
330
330
  }
331
331
  });
332
332
  });
333
+
334
+ it('websocket inner module import should use snake_case', function () {
335
+ check('websocket', 'tea_python_tests',
336
+ {
337
+ python: {
338
+ package: 'tea_python_tests',
339
+ clientName: 'client'
340
+ }
341
+ });
342
+ });
333
343
  });
@@ -1,83 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- Licensed to the Apache Software Foundation (ASF) under one
4
- or more contributor license agreements. See the NOTICE file
5
- distributed with this work for additional information
6
- regarding copyright ownership. The ASF licenses this file
7
- to you under the Apache License, Version 2.0 (the
8
- "License"); you may not use this file except in compliance
9
- with the License. You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing,
14
- software distributed under the License is distributed on an
15
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- KIND, either express or implied. See the License for the
17
- specific language governing permissions and limitations
18
- under the License.
19
- """
20
-
21
- import os
22
- from setuptools import setup, find_packages
23
-
24
- """
25
- setup module for tea-python-tests.
26
-
27
- Created on 13/08/2025
28
-
29
- @author: AlibabaCloud SDK Team
30
- """
31
-
32
- PACKAGE = "tea_python_tests"
33
- NAME = "tea-python-tests"
34
- DESCRIPTION = "Generate setup.py"
35
- AUTHOR = "AlibabaCloud SDK Team"
36
- AUTHOR_EMAIL = "sdkteam@alibabacloud.com"
37
- URL = "https://github.com/dara"
38
- VERSION = __import__(PACKAGE).__version__
39
- REQUIRES = [
40
- "darabonba-core>=1.0.0, <2.0.0",
41
- "source>=0.0.1, <1.0.0",
42
- "import>=1.1.2, <2.0.0",
43
- "alibabacloud_tea_util>=0.3.11, <1.0.0",
44
- "xxx1>=0.0.1, <1.0.0",
45
- "xxx2>=0.0.1, <1.0.0"
46
- ]
47
-
48
- LONG_DESCRIPTION = ''
49
- if os.path.exists('./README.md'):
50
- with open("README.md", encoding='utf-8') as fp:
51
- LONG_DESCRIPTION = fp.read()
52
-
53
- setup(
54
- name=NAME,
55
- version=VERSION,
56
- description=DESCRIPTION,
57
- long_description=LONG_DESCRIPTION,
58
- long_description_content_type='text/markdown',
59
- author=AUTHOR,
60
- author_email=AUTHOR_EMAIL,
61
- license="Apache License 2.0",
62
- url=URL,
63
- keywords=["tea","python","tests"],
64
- packages=find_packages(exclude=["tests*"]),
65
- include_package_data=True,
66
- platforms="any",
67
- install_requires=REQUIRES,
68
- python_requires=">=3.7",
69
- classifiers=(
70
- "Development Status :: 4 - Beta",
71
- "Intended Audience :: Developers",
72
- "License :: OSI Approved :: Apache Software License",
73
- "Programming Language :: Python",
74
- "Programming Language :: Python :: 3",
75
- "Programming Language :: Python :: 3.7",
76
- "Programming Language :: Python :: 3.8",
77
- "Programming Language :: Python :: 3.9",
78
- "Programming Language :: Python :: 3.10",
79
- "Programming Language :: Python :: 3.11",
80
- "Programming Language :: Python :: 3.12",
81
- "Topic :: Software Development"
82
- )
83
- )
@@ -1,35 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- from alias_source.source_client import SourceClient as AliasSourceSourceClient
6
- from alias_symbol import models as alias_symbol_models
7
- from alias_symbol.client import Client as AliasSymbolClient
8
- from Alias.alias_client import AliasClient
9
- from Import.client import Client as ImportClient
10
- from Source.client import Client as SourceClient
11
-
12
-
13
-
14
- class Client:
15
-
16
- def __init__(self):
17
- pass
18
-
19
- @staticmethod
20
- def empty_model() -> None:
21
- ImportClient.test()
22
- SourceClient.test()
23
- AliasClient.test()
24
- AliasSourceSourceClient.test()
25
- AliasSymbolClient.test()
26
- model = alias_symbol_models.TestModel()
27
-
28
- @staticmethod
29
- async def empty_model_async() -> None:
30
- ImportClient.test()
31
- await SourceClient.test_async()
32
- AliasClient.test()
33
- AliasSourceSourceClient.test()
34
- AliasSymbolClient.test()
35
- model = alias_symbol_models.TestModel()
@@ -1,79 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- Licensed to the Apache Software Foundation (ASF) under one
4
- or more contributor license agreements. See the NOTICE file
5
- distributed with this work for additional information
6
- regarding copyright ownership. The ASF licenses this file
7
- to you under the Apache License, Version 2.0 (the
8
- "License"); you may not use this file except in compliance
9
- with the License. You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing,
14
- software distributed under the License is distributed on an
15
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- KIND, either express or implied. See the License for the
17
- specific language governing permissions and limitations
18
- under the License.
19
- """
20
-
21
- import os
22
- from setuptools import setup, find_packages
23
-
24
- """
25
- setup module for tea_python_tests.
26
-
27
- Created on 13/08/2025
28
-
29
- @author: Alibaba
30
- """
31
-
32
- PACKAGE = "tea_python_tests"
33
- NAME = "tea_python_tests"
34
- DESCRIPTION = ""
35
- AUTHOR = "Alibaba"
36
- AUTHOR_EMAIL = "sdk-team@alibabacloud.com"
37
- URL = "https://github.com/"
38
- VERSION = __import__(PACKAGE).__version__
39
- REQUIRES = [
40
- "darabonba-core>=1.0.0, <2.0.0"
41
-
42
- ]
43
-
44
- LONG_DESCRIPTION = ''
45
- if os.path.exists('./README.md'):
46
- with open("README.md", encoding='utf-8') as fp:
47
- LONG_DESCRIPTION = fp.read()
48
-
49
- setup(
50
- name=NAME,
51
- version=VERSION,
52
- description=DESCRIPTION,
53
- long_description=LONG_DESCRIPTION,
54
- long_description_content_type='text/markdown',
55
- author=AUTHOR,
56
- author_email=AUTHOR_EMAIL,
57
- license="Apache License 2.0",
58
- url=URL,
59
- keywords=["tea","python","tests"],
60
- packages=find_packages(exclude=["tests*"]),
61
- include_package_data=True,
62
- platforms="any",
63
- install_requires=REQUIRES,
64
- python_requires=">=3.7",
65
- classifiers=(
66
- "Development Status :: 4 - Beta",
67
- "Intended Audience :: Developers",
68
- "License :: OSI Approved :: Apache Software License",
69
- "Programming Language :: Python",
70
- "Programming Language :: Python :: 3",
71
- "Programming Language :: Python :: 3.7",
72
- "Programming Language :: Python :: 3.8",
73
- "Programming Language :: Python :: 3.9",
74
- "Programming Language :: Python :: 3.10",
75
- "Programming Language :: Python :: 3.11",
76
- "Programming Language :: Python :: 3.12",
77
- "Topic :: Software Development"
78
- )
79
- )
@@ -1 +0,0 @@
1
- __version__ = "1.0.0"
@@ -1,93 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- from darabonba.core import DaraCore
6
- from darabonba.exceptions import UnretryableException
7
- from darabonba.policy.retry import RetryPolicyContext
8
- from darabonba.request import DaraRequest
9
-
10
- """
11
- * @remarks
12
- * top annotation
13
- """
14
- class Client:
15
- _a: str = None
16
- def __init__(self):
17
- pass
18
-
19
- """
20
- * @remarks
21
- * testAPI
22
- """
23
- def test_api(self) -> None:
24
- _runtime = {
25
- }
26
- _last_request = None
27
- _last_response = None
28
- _retries_attempted = 0
29
- _context = RetryPolicyContext(
30
- retries_attempted= _retries_attempted
31
- )
32
- while DaraCore.should_retry(_runtime.get('retryOptions'), _context):
33
- if _retries_attempted > 0:
34
- _backoff_time = DaraCore.get_backoff_time(_runtime.get('retryOptions'), _context)
35
- if _backoff_time > 0:
36
- DaraCore.sleep(_backoff_time)
37
- _retries_attempted = _retries_attempted + 1
38
- try:
39
- _request = DaraRequest()
40
- pass
41
- _last_request = _request
42
- _response = DaraCore.do_action(_request, _runtime)
43
- _last_response = _response
44
- return
45
- except Exception as e:
46
- _context = RetryPolicyContext(
47
- retries_attempted= _retries_attempted,
48
- http_request = _last_request,
49
- http_response = _last_response,
50
- exception = e
51
- )
52
- continue
53
- raise UnretryableException(_context)
54
-
55
- async def test_api_async(self) -> None:
56
- _runtime = {
57
- }
58
- _last_request = None
59
- _last_response = None
60
- _retries_attempted = 0
61
- _context = RetryPolicyContext(
62
- retries_attempted= _retries_attempted
63
- )
64
- while DaraCore.should_retry(_runtime.get('retryOptions'), _context):
65
- if _retries_attempted > 0:
66
- _backoff_time = DaraCore.get_backoff_time(_runtime.get('retryOptions'), _context)
67
- if _backoff_time > 0:
68
- DaraCore.sleep(_backoff_time)
69
- _retries_attempted = _retries_attempted + 1
70
- try:
71
- _request = DaraRequest()
72
- pass
73
- _last_request = _request
74
- _response = await DaraCore.async_do_action(_request, _runtime)
75
- _last_response = _response
76
- return
77
- except Exception as e:
78
- _context = RetryPolicyContext(
79
- retries_attempted= _retries_attempted,
80
- http_request = _last_request,
81
- http_response = _last_response,
82
- exception = e
83
- )
84
- continue
85
- raise UnretryableException(_context)
86
-
87
- @staticmethod
88
- def test_func() -> None:
89
- pass
90
-
91
- @staticmethod
92
- async def test_func_async() -> None:
93
- pass
@@ -1,9 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- from ._test import Test
6
-
7
- __all__ = [
8
- Test
9
- ]
@@ -1,38 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- from darabonba.model import DaraModel
6
-
7
- """
8
- * @remarks
9
- * TestModel
10
- """
11
- class Test(DaraModel):
12
- def __init__(
13
- self,
14
- test: str = None,
15
- ):
16
- # Alichange app id
17
- self.test = test
18
-
19
- def validate(self):
20
- self.validate_required(self.test, 'test')
21
-
22
- def to_map(self):
23
- result = dict()
24
- _map = super().to_map()
25
- if _map is not None:
26
- result = _map
27
- if self.test is not None:
28
- result['test'] = self.test
29
-
30
- return result
31
-
32
- def from_map(self, m: dict = None):
33
- m = m or dict()
34
- if m.get('test') is not None:
35
- self.test = m.get('test')
36
-
37
- return self
38
-
@@ -1,79 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- Licensed to the Apache Software Foundation (ASF) under one
4
- or more contributor license agreements. See the NOTICE file
5
- distributed with this work for additional information
6
- regarding copyright ownership. The ASF licenses this file
7
- to you under the Apache License, Version 2.0 (the
8
- "License"); you may not use this file except in compliance
9
- with the License. You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing,
14
- software distributed under the License is distributed on an
15
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- KIND, either express or implied. See the License for the
17
- specific language governing permissions and limitations
18
- under the License.
19
- """
20
-
21
- import os
22
- from setuptools import setup, find_packages
23
-
24
- """
25
- setup module for tea_python_tests.
26
-
27
- Created on 13/08/2025
28
-
29
- @author: Alibaba
30
- """
31
-
32
- PACKAGE = "tea_python_tests"
33
- NAME = "tea_python_tests"
34
- DESCRIPTION = ""
35
- AUTHOR = "Alibaba"
36
- AUTHOR_EMAIL = "sdk-team@alibabacloud.com"
37
- URL = "https://github.com/"
38
- VERSION = __import__(PACKAGE).__version__
39
- REQUIRES = [
40
- "darabonba-core>=1.0.0, <2.0.0"
41
-
42
- ]
43
-
44
- LONG_DESCRIPTION = ''
45
- if os.path.exists('./README.md'):
46
- with open("README.md", encoding='utf-8') as fp:
47
- LONG_DESCRIPTION = fp.read()
48
-
49
- setup(
50
- name=NAME,
51
- version=VERSION,
52
- description=DESCRIPTION,
53
- long_description=LONG_DESCRIPTION,
54
- long_description_content_type='text/markdown',
55
- author=AUTHOR,
56
- author_email=AUTHOR_EMAIL,
57
- license="Apache License 2.0",
58
- url=URL,
59
- keywords=["tea","python","tests"],
60
- packages=find_packages(exclude=["tests*"]),
61
- include_package_data=True,
62
- platforms="any",
63
- install_requires=REQUIRES,
64
- python_requires=">=3.7",
65
- classifiers=(
66
- "Development Status :: 4 - Beta",
67
- "Intended Audience :: Developers",
68
- "License :: OSI Approved :: Apache Software License",
69
- "Programming Language :: Python",
70
- "Programming Language :: Python :: 3",
71
- "Programming Language :: Python :: 3.7",
72
- "Programming Language :: Python :: 3.8",
73
- "Programming Language :: Python :: 3.9",
74
- "Programming Language :: Python :: 3.10",
75
- "Programming Language :: Python :: 3.11",
76
- "Programming Language :: Python :: 3.12",
77
- "Topic :: Software Development"
78
- )
79
- )
@@ -1 +0,0 @@
1
- __version__ = "1.0.0"