@darabonba/python-generator 2.0.13 → 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 (112) hide show
  1. package/ChangeLog.md +2 -2
  2. package/lib/generator.js +1 -1
  3. package/package.json +1 -1
  4. package/tests/expected/websocket/tea_python_tests/client.py +20 -0
  5. package/tests/fixtures/websocket/.libraries.json +3 -0
  6. package/tests/fixtures/websocket/Darafile +9 -0
  7. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/Teafile +21 -0
  8. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/main.tea +1 -0
  9. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/utils.dara +1 -0
  10. package/tests/fixtures/websocket/libraries/alibabacloud_OpenApiV2_0.1.27/websocketUtils.dara +9 -0
  11. package/tests/fixtures/websocket/main.dara +8 -0
  12. package/tests/main.tests.js +10 -0
  13. package/tests/output/alias/setup.py +0 -83
  14. package/tests/output/alias/tea_python_tests/client.py +0 -35
  15. package/tests/output/annotation/setup.py +0 -79
  16. package/tests/output/annotation/tea_python_tests/__init__.py +0 -1
  17. package/tests/output/annotation/tea_python_tests/client.py +0 -93
  18. package/tests/output/annotation/tea_python_tests/models/__init__.py +0 -9
  19. package/tests/output/annotation/tea_python_tests/models/_test.py +0 -38
  20. package/tests/output/api/setup.py +0 -79
  21. package/tests/output/api/tea_python_tests/__init__.py +0 -1
  22. package/tests/output/api/tea_python_tests/client.py +0 -106
  23. package/tests/output/builtin/setup.py +0 -79
  24. package/tests/output/builtin/tea_python_tests/__init__.py +0 -1
  25. package/tests/output/builtin/tea_python_tests/client.py +0 -687
  26. package/tests/output/comment/setup.py +0 -79
  27. package/tests/output/comment/tea_python_tests/__init__.py +0 -1
  28. package/tests/output/comment/tea_python_tests/client.py +0 -289
  29. package/tests/output/comment/tea_python_tests/models/__init__.py +0 -13
  30. package/tests/output/comment/tea_python_tests/models/_test_1.py +0 -103
  31. package/tests/output/comment/tea_python_tests/models/_test_2.py +0 -58
  32. package/tests/output/comment/tea_python_tests/models/_test_3.py +0 -64
  33. package/tests/output/complex/setup.py +0 -79
  34. package/tests/output/complex/tea_python_tests/__init__.py +0 -1
  35. package/tests/output/complex/tea_python_tests/client.py +0 -1172
  36. package/tests/output/complex/tea_python_tests/exceptions/__init__.py +0 -11
  37. package/tests/output/complex/tea_python_tests/exceptions/_err_1.py +0 -24
  38. package/tests/output/complex/tea_python_tests/exceptions/_err_2.py +0 -22
  39. package/tests/output/complex/tea_python_tests/models/__init__.py +0 -17
  40. package/tests/output/complex/tea_python_tests/models/_complex_request.py +0 -574
  41. package/tests/output/complex/tea_python_tests/models/_response.py +0 -34
  42. package/tests/output/const/setup.py +0 -79
  43. package/tests/output/const/tea_python_tests/__init__.py +0 -1
  44. package/tests/output/const/tea_python_tests/client.py +0 -12
  45. package/tests/output/empty/setup.py +0 -79
  46. package/tests/output/empty/tea_python_tests/__init__.py +0 -1
  47. package/tests/output/empty/tea_python_tests/client.py +0 -8
  48. package/tests/output/exec/setup.py +0 -79
  49. package/tests/output/exec/tea_python_tests/__init__.py +0 -1
  50. package/tests/output/exec/tea_python_tests/exec_client.py +0 -22
  51. package/tests/output/function/setup.py +0 -79
  52. package/tests/output/function/tea_python_tests/__init__.py +0 -1
  53. package/tests/output/function/tea_python_tests/client.py +0 -77
  54. package/tests/output/import/setup.py +0 -80
  55. package/tests/output/import/tea_python_tests/__init__.py +0 -1
  56. package/tests/output/import/tea_python_tests/client.py +0 -30
  57. package/tests/output/map/setup.py +0 -79
  58. package/tests/output/map/tea_python_tests/__init__.py +0 -1
  59. package/tests/output/map/tea_python_tests/client.py +0 -39
  60. package/tests/output/model/setup.py +0 -79
  61. package/tests/output/model/tea_python_tests/__init__.py +0 -1
  62. package/tests/output/model/tea_python_tests/client.py +0 -8
  63. package/tests/output/model/tea_python_tests/exceptions/__init__.py +0 -9
  64. package/tests/output/model/tea_python_tests/exceptions/_main_file.py +0 -29
  65. package/tests/output/model/tea_python_tests/models/__init__.py +0 -31
  66. package/tests/output/model/tea_python_tests/models/_class.py +0 -23
  67. package/tests/output/model/tea_python_tests/models/_m.py +0 -56
  68. package/tests/output/model/tea_python_tests/models/_main_file.py +0 -73
  69. package/tests/output/model/tea_python_tests/models/_model.py +0 -33
  70. package/tests/output/model/tea_python_tests/models/_my_model.py +0 -786
  71. package/tests/output/modelConfig/setup.py +0 -79
  72. package/tests/output/modelConfig/tea_python_tests/__init__.py +0 -1
  73. package/tests/output/modelConfig/tea_python_tests/client.py +0 -8
  74. package/tests/output/modelConfig/tea_python_tests/exceptions/__init__.py +0 -9
  75. package/tests/output/modelConfig/tea_python_tests/exceptions/_main_file.py +0 -29
  76. package/tests/output/modelConfig/tea_python_tests/models/__init__.py +0 -31
  77. package/tests/output/modelConfig/tea_python_tests/models/_class.py +0 -23
  78. package/tests/output/modelConfig/tea_python_tests/models/_m.py +0 -56
  79. package/tests/output/modelConfig/tea_python_tests/models/_main_file.py +0 -73
  80. package/tests/output/modelConfig/tea_python_tests/models/_model.py +0 -33
  81. package/tests/output/modelConfig/tea_python_tests/models/_my_model.py +0 -750
  82. package/tests/output/multi/setup.py +0 -79
  83. package/tests/output/multi/tea_python_tests/__init__.py +0 -1
  84. package/tests/output/multi/tea_python_tests/api.py +0 -93
  85. package/tests/output/multi/tea_python_tests/api_models/__init__.py +0 -9
  86. package/tests/output/multi/tea_python_tests/api_models/_test_model_dir_2.py +0 -35
  87. package/tests/output/multi/tea_python_tests/client.py +0 -39
  88. package/tests/output/multi/tea_python_tests/exceptions/__init__.py +0 -11
  89. package/tests/output/multi/tea_python_tests/exceptions/_err.py +0 -38
  90. package/tests/output/multi/tea_python_tests/lib/util.py +0 -18
  91. package/tests/output/multi/tea_python_tests/model/user.py +0 -27
  92. package/tests/output/multi/tea_python_tests/model/user_exceptions/__init__.py +0 -13
  93. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err.py +0 -22
  94. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_1.py +0 -54
  95. package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_2.py +0 -18
  96. package/tests/output/multi/tea_python_tests/model/user_models/__init__.py +0 -11
  97. package/tests/output/multi/tea_python_tests/model/user_models/_base_info.py +0 -73
  98. package/tests/output/multi/tea_python_tests/model/user_models/_info.py +0 -82
  99. package/tests/output/multi/tea_python_tests/models/__init__.py +0 -11
  100. package/tests/output/multi/tea_python_tests/models/_test_model_dir.py +0 -84
  101. package/tests/output/statements/setup.py +0 -79
  102. package/tests/output/statements/tea_python_tests/__init__.py +0 -1
  103. package/tests/output/statements/tea_python_tests/client.py +0 -86
  104. package/tests/output/super/setup.py +0 -79
  105. package/tests/output/super/tea_python_tests/__init__.py +0 -1
  106. package/tests/output/super/tea_python_tests/client.py +0 -16
  107. package/tests/output/typedef/setup.py +0 -80
  108. package/tests/output/typedef/tea_python_tests/__init__.py +0 -1
  109. package/tests/output/typedef/tea_python_tests/client.py +0 -74
  110. package/tests/output/typedef/tea_python_tests/models/__init__.py +0 -9
  111. package/tests/output/typedef/tea_python_tests/models/_m.py +0 -45
  112. /package/tests/{output/alias → expected/websocket}/tea_python_tests/__init__.py +0 -0
@@ -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 19/12/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,12 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- class Client:
6
-
7
- def __init__(self):
8
- pass
9
-
10
- @staticmethod
11
- def hello() -> str:
12
- return f"'Hello' {'World!'}"
@@ -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 19/12/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,8 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- class Client:
6
-
7
- def __init__(self):
8
- pass
@@ -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 19/12/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,22 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # This file is auto-generated, don't edit it. Thanks.
3
- from __future__ import annotations
4
-
5
- import sys
6
-
7
- from typing import List
8
-
9
- class ExecClient:
10
-
11
- def __init__(self):
12
- pass
13
-
14
- @staticmethod
15
- def main(
16
- args: List[str],
17
- ) -> None:
18
- pass
19
-
20
-
21
- if __name__ == '__main__':
22
- ExecClient.main(sys.argv[1:])
@@ -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 19/12/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,77 +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 typing import Dict, List
6
-
7
- from darabonba.core import DaraCore
8
-
9
- class Client:
10
- def __init__(self):
11
- pass
12
-
13
- @staticmethod
14
- def hello() -> None:
15
- return
16
-
17
- @staticmethod
18
- def hello_map() -> Dict[str, str]:
19
- m = {}
20
- return DaraCore.merge({
21
- 'key': 'value',
22
- 'key-1': 'value-1',
23
- 'key-2': 'value-2',
24
- '': 'value-3',
25
- }, m)
26
-
27
- @staticmethod
28
- def hello_array_map() -> List[Dict[str, str]]:
29
- return [
30
- {
31
- 'key': 'value'
32
- }
33
- ]
34
-
35
- @staticmethod
36
- def hello_params(
37
- a: str,
38
- b: str,
39
- ) -> None:
40
- Client.hello_interface()
41
- Client.hello_array_map()
42
-
43
- @staticmethod
44
- async def hello_params_async(
45
- a: str,
46
- b: str,
47
- ) -> None:
48
- await Client.hello_interface_async()
49
- Client.hello_array_map()
50
-
51
- @staticmethod
52
- def hello_interface() -> None:
53
- # interface mode
54
- raise Exception('Un-implemented')
55
-
56
- @staticmethod
57
- async def hello_interface_async() -> None:
58
- # interface mode
59
- raise Exception('Un-implemented')
60
-
61
- def a_params(self) -> None:
62
- self.hello_params('a', 'b')
63
-
64
- async def a_params_async(self) -> None:
65
- await self.hello_params_async('a', 'b')
66
-
67
- def test_jwt_with_option(self) -> None:
68
- self.hello_params('a', 'b')
69
-
70
- async def test_jwt_with_option_async(self) -> None:
71
- await self.hello_params_async('a', 'b')
72
-
73
- def test_oauth2_for_option(self) -> None:
74
- self.hello_params('a', 'b')
75
-
76
- async def test_oauth2_for_option_async(self) -> None:
77
- await self.hello_params_async('a', 'b')
@@ -1,80 +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 19/12/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
- "alibabacloud_import==0.0.1rc1",
42
- "alibabacloud_local>=0.0.1, <1.0.0"
43
- ]
44
-
45
- LONG_DESCRIPTION = ''
46
- if os.path.exists('./README.md'):
47
- with open("README.md", encoding='utf-8') as fp:
48
- LONG_DESCRIPTION = fp.read()
49
-
50
- setup(
51
- name=NAME,
52
- version=VERSION,
53
- description=DESCRIPTION,
54
- long_description=LONG_DESCRIPTION,
55
- long_description_content_type='text/markdown',
56
- author=AUTHOR,
57
- author_email=AUTHOR_EMAIL,
58
- license="Apache License 2.0",
59
- url=URL,
60
- keywords=["tea","python","tests"],
61
- packages=find_packages(exclude=["tests*"]),
62
- include_package_data=True,
63
- platforms="any",
64
- install_requires=REQUIRES,
65
- python_requires=">=3.7",
66
- classifiers=(
67
- "Development Status :: 4 - Beta",
68
- "Intended Audience :: Developers",
69
- "License :: OSI Approved :: Apache Software License",
70
- "Programming Language :: Python",
71
- "Programming Language :: Python :: 3",
72
- "Programming Language :: Python :: 3.7",
73
- "Programming Language :: Python :: 3.8",
74
- "Programming Language :: Python :: 3.9",
75
- "Programming Language :: Python :: 3.10",
76
- "Programming Language :: Python :: 3.11",
77
- "Programming Language :: Python :: 3.12",
78
- "Topic :: Software Development"
79
- )
80
- )
@@ -1 +0,0 @@
1
- __version__ = "1.0.0"
@@ -1,30 +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 typing import List
6
-
7
- from Local import models as local_models
8
- from Source import models as source_models
9
- from Source.source_client import SourceClient
10
-
11
-
12
-
13
- class Client:
14
- _id: List[str] = None
15
- _str: str = None
16
- _model: local_models.Local = None
17
-
18
- def __init__(self):
19
- pass
20
-
21
- @staticmethod
22
- def sample(
23
- client: SourceClient,
24
- ) -> None:
25
- runtime = source_models.RuntimeObject()
26
- request = source_models.Request(
27
- accesskey = 'accesskey',
28
- region = 'region'
29
- )
30
- client.print(runtime)
@@ -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 19/12/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,39 +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 Source import models as source_models
7
- from Source.source_client import SourceClient
8
-
9
-
10
-
11
- class Client(SourceClient):
12
-
13
- def __init__(
14
- self,
15
- config: source_models.Config,
16
- ):
17
- super().__init__(config)
18
- a = {
19
- 'test': 'test'
20
- }
21
- c = {
22
- 'test': 'test'
23
- }
24
- self._endpoint_rule = 'central'
25
- self._endpoint_map = DaraCore.merge({
26
- 'ap-northeast-1': 'cusanalytic.aliyuncs.com',
27
- 'ap-south-1': 'cusanalytic.aliyuncs.com',
28
- 'ap-south-2-test': SourceClient.hello()
29
- }, a, c)
30
- b = {
31
- 'ap-northeast-1': {
32
- 'ap-south-1': 'cusanalytic.aliyuncs.com'
33
- },
34
- 'ap-south-2': SourceClient.hello()
35
- }
36
- self._endpoint_map.get('ap-northeast-1')
37
- self._endpoint_map['ap-northeast-1'] = ''
38
- self._endpoint_map[config.str_value] = 'str'
39
- self._endpoint_map.get(config.str_value)