From e32448710742ffaf2fa920fb5a2af063622baed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=97=AE?= Date: Wed, 18 Sep 2024 13:43:29 +0800 Subject: [PATCH] [oss gateway util] generate correct structure for python gateway_oss_util --- .../util/python/.gitignore | 5 ++ .../alibabacloud_gateway_oss_util/__init__.py | 1 + .../client.py | 5 +- .../structs.py | 0 alibabacloud-gateway-oss/util/python/setup.py | 74 +++++++++++++++++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 alibabacloud-gateway-oss/util/python/.gitignore create mode 100644 alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/__init__.py rename alibabacloud-gateway-oss/util/python/{ => alibabacloud_gateway_oss_util}/client.py (99%) rename alibabacloud-gateway-oss/util/python/{ => alibabacloud_gateway_oss_util}/structs.py (100%) create mode 100644 alibabacloud-gateway-oss/util/python/setup.py diff --git a/alibabacloud-gateway-oss/util/python/.gitignore b/alibabacloud-gateway-oss/util/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/alibabacloud-gateway-oss/util/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/__init__.py b/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/__init__.py new file mode 100644 index 00000000..f102a9ca --- /dev/null +++ b/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.1" diff --git a/alibabacloud-gateway-oss/util/python/client.py b/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/client.py similarity index 99% rename from alibabacloud-gateway-oss/util/python/client.py rename to alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/client.py index 6a686e6c..a2831001 100644 --- a/alibabacloud-gateway-oss/util/python/client.py +++ b/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/client.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +# -*- coding: utf-8 -*- # import alibabacloud_tea_xml.client from Tea.model import TeaModel @@ -219,7 +221,7 @@ def __parse_xml_impl(t, m): for dc in [Client.__parse_xml_impl(c, mc) for c in children]: for k, v in dc.items(): dd[k].append(v) - d = {t.tag: {k: v[0] if len(v) == 1 and not isinstance(mc[k], list) else v for k, v in dd.items()} if k in mc} + d = {t.tag: {k: v[0] if len(v) == 1 and not isinstance(mc[k], list) else v for k, v in dd.items() if k in mc}} if t.attrib: d[t.tag].update(('@' + k, v) for k, v in t.attrib.items()) @@ -293,3 +295,4 @@ def to_xml(body): Client.__get_xml_factory(elem, dic[k]) result_xml += bytes.decode(ElementTree.tostring(elem), encoding="utf-8") return result_xml + diff --git a/alibabacloud-gateway-oss/util/python/structs.py b/alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/structs.py similarity index 100% rename from alibabacloud-gateway-oss/util/python/structs.py rename to alibabacloud-gateway-oss/util/python/alibabacloud_gateway_oss_util/structs.py diff --git a/alibabacloud-gateway-oss/util/python/setup.py b/alibabacloud-gateway-oss/util/python/setup.py new file mode 100644 index 00000000..bb90153b --- /dev/null +++ b/alibabacloud-gateway-oss/util/python/setup.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for alibabacloud_gateway_oss_util. + +Created on 26/09/2024 + +@author: Alibaba Cloud SDK +""" + +PACKAGE = "alibabacloud_gateway_oss_util" +NAME = "alibabacloud_gateway_oss_util" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud OSS Util Library for Python" +AUTHOR = "Alibaba Cloud SDK" +AUTHOR_EMAIL = "sdk-team@alibabacloud.com" +URL = "https://github.com/aliyun/alibabacloud-gateway" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["alibabacloud","gateway","oss","util"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +)