Skip to content

Commit

Permalink
[oss gateway util] generate correct structure for python gateway_oss_…
Browse files Browse the repository at this point in the history
…util
  • Loading branch information
dreamph666 authored and yndu13 committed Sep 27, 2024
1 parent 1a150d8 commit e324487
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 1 deletion.
5 changes: 5 additions & 0 deletions alibabacloud-gateway-oss/util/python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
runtime/
.idea/
.vscode/
__pycache__/
.pytest_cache/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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

74 changes: 74 additions & 0 deletions alibabacloud-gateway-oss/util/python/setup.py
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
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"
)
)

0 comments on commit e324487

Please sign in to comment.