Skip to content

Commit 00b5966

Browse files
committed
2 parents 16fa78a + 7e6de1e commit 00b5966

File tree

11 files changed

+548
-11
lines changed

11 files changed

+548
-11
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/22.4)
1+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/22.5)
22

33

44
# Python SDK for Spreadsheet Processing in Cloud
@@ -21,13 +21,9 @@ Python Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate M
2121
- Convert worksheets to PDF, XPS & SVG formats.
2222
- Inter-convert files to popular Excel formats.
2323

24-
## Feature & Enhancements in Version 22.4
25-
26-
- Export API adds extended query parameters.
27-
- Convert API adds extended query parameters.
28-
- SaveAs API adds extended query parameters.
29-
- Get Workbook API adds extended query parameters.
24+
## Feature & Enhancements in Version 22.5
3025

26+
- Add a new API for getting barcode description.
3127

3228

3329

TestData/Book1.xlsx

19.4 KB
Binary file not shown.

asposecellscloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from .models.access_token_response import AccessTokenResponse
2929
from .models.area import Area
3030
from .models.auto_fitter_options import AutoFitterOptions
31+
from .models.barcode_response import BarcodeResponse
32+
from .models.barcode_response_list import BarcodeResponseList
3133
from .models.batch_convert_request import BatchConvertRequest
3234
from .models.border import Border
3335
from .models.calculation_options import CalculationOptions

asposecellscloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
8383
self.host = host
8484
self.cookie = cookie
8585
# Set default User-Agent.
86-
self.user_agent = 'Swagger-Codegen/22.4/python'
86+
self.user_agent = 'Swagger-Codegen/22.5/python'
8787

8888
@property
8989
def user_agent(self):

asposecellscloud/apis/cells_api.py

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12203,6 +12203,132 @@ def cells_page_setup_post_page_setup_with_http_info(self, name, sheet_name, **kw
1220312203
_preload_content=params.get('_preload_content', True),
1220412204
_request_timeout=params.get('_request_timeout'),
1220512205
collection_formats=collection_formats)
12206+
def cells_picture_get_extract_barcodes(self, name, sheet_name, picture_index, **kwargs):
12207+
"""
12208+
Get chart area border info.
12209+
This method makes a synchronous HTTP request by default. To make an
12210+
asynchronous HTTP request, please define a `callback` function
12211+
to be invoked when receiving the response.
12212+
>>> def callback_function(response):
12213+
>>> pprint(response)
12214+
>>>
12215+
>>> thread = api.cells_picture_get_extract_barcodes(name, sheet_name, picture_index, callback=callback_function)
12216+
12217+
:param callback function: The callback function
12218+
for asynchronous request. (optional)
12219+
:param str name: Workbook name. (required)
12220+
:param str sheet_name: Worksheet name. (required)
12221+
:param int picture_index: The picture index. (required)
12222+
:param str folder: Workbook folder.
12223+
:param str storage_name: storage name.
12224+
:return: BarcodeResponseList
12225+
If the method is called asynchronously,
12226+
returns the request thread.
12227+
"""
12228+
kwargs['_return_http_data_only'] = True
12229+
self.check_access_token()
12230+
if kwargs.get('callback'):
12231+
return self.cells_picture_get_extract_barcodes_with_http_info(name, sheet_name, picture_index, **kwargs)
12232+
else:
12233+
(data) = self.cells_picture_get_extract_barcodes_with_http_info(name, sheet_name, picture_index, **kwargs)
12234+
return data
12235+
12236+
def cells_picture_get_extract_barcodes_with_http_info(self, name, sheet_name, picture_index, **kwargs):
12237+
"""
12238+
Get chart area border info.
12239+
This method makes a synchronous HTTP request by default. To make an
12240+
asynchronous HTTP request, please define a `callback` function
12241+
to be invoked when receiving the response.
12242+
>>> def callback_function(response):
12243+
>>> pprint(response)
12244+
>>>
12245+
>>> thread = api.cells_picture_get_extract_barcodes_with_http_info(name, sheet_name, picture_index, callback=callback_function)
12246+
12247+
:param callback function: The callback function
12248+
for asynchronous request. (optional)
12249+
:param str name: Workbook name. (required)
12250+
:param str sheet_name: Worksheet name. (required)
12251+
:param int picture_index: The picture index. (required)
12252+
:param str folder: Workbook folder.
12253+
:param str storage_name: storage name.
12254+
:return: BarcodeResponseList
12255+
If the method is called asynchronously,
12256+
returns the request thread.
12257+
"""
12258+
12259+
all_params = ['name', 'sheet_name', 'picture_index', 'folder', 'storage_name']
12260+
all_params.append('callback')
12261+
all_params.append('_return_http_data_only')
12262+
all_params.append('_preload_content')
12263+
all_params.append('_request_timeout')
12264+
12265+
params = locals()
12266+
for key, val in iteritems(params['kwargs']):
12267+
if key not in all_params:
12268+
raise TypeError(
12269+
"Got an unexpected keyword argument '%s'"
12270+
" to method cells_picture_get_extract_barcodes" % key
12271+
)
12272+
params[key] = val
12273+
del params['kwargs']
12274+
# verify the required parameter 'name' is set
12275+
if ('name' not in params) or (params['name'] is None):
12276+
raise ValueError("Missing the required parameter `name` when calling `cells_picture_get_extract_barcodes`")
12277+
# verify the required parameter 'sheet_name' is set
12278+
if ('sheet_name' not in params) or (params['sheet_name'] is None):
12279+
raise ValueError("Missing the required parameter `sheet_name` when calling `cells_picture_get_extract_barcodes`")
12280+
# verify the required parameter 'picture_index' is set
12281+
if ('picture_index' not in params) or (params['picture_index'] is None):
12282+
raise ValueError("Missing the required parameter `picture_index` when calling `cells_picture_get_extract_barcodes`")
12283+
12284+
12285+
collection_formats = {}
12286+
12287+
path_params = {}
12288+
if 'name' in params:
12289+
path_params['name'] = params['name']
12290+
if 'sheet_name' in params:
12291+
path_params['sheetName'] = params['sheet_name']
12292+
if 'picture_index' in params:
12293+
path_params['pictureIndex'] = params['picture_index']
12294+
12295+
query_params = []
12296+
if 'folder' in params:
12297+
query_params.append(('folder', params['folder']))
12298+
if 'storage_name' in params:
12299+
query_params.append(('storageName', params['storage_name']))
12300+
12301+
header_params = {}
12302+
12303+
form_params = []
12304+
local_var_files = {}
12305+
12306+
body_params = None
12307+
# HTTP header `Accept`
12308+
header_params['Accept'] = self.api_client.\
12309+
select_header_accept(['application/json'])
12310+
12311+
# HTTP header `Content-Type`
12312+
header_params['Content-Type'] = self.api_client.\
12313+
select_header_content_type(['application/json'])
12314+
12315+
# Authentication setting
12316+
auth_settings = []
12317+
12318+
return self.api_client.call_api('/cells/{name}/worksheets/{sheetName}/pictures/{pictureIndex}/recognize', 'GET',
12319+
path_params,
12320+
query_params,
12321+
header_params,
12322+
body=body_params,
12323+
post_params=form_params,
12324+
files=local_var_files,
12325+
response_type='BarcodeResponseList',
12326+
auth_settings=auth_settings,
12327+
callback=params.get('callback'),
12328+
_return_http_data_only=params.get('_return_http_data_only'),
12329+
_preload_content=params.get('_preload_content', True),
12330+
_request_timeout=params.get('_request_timeout'),
12331+
collection_formats=collection_formats)
1220612332

1220712333
def cells_pictures_delete_worksheet_picture(self, name, sheet_name, picture_index, **kwargs):
1220812334
"""

asposecellscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ def to_debug_report(self):
254254
return "Python SDK Debug Report:\n"\
255255
"OS: {env}\n"\
256256
"Python Version: {pyversion}\n"\
257-
"Version of the API: 22.4\n"\
258-
"SDK Package Version: 22.4".\
257+
"Version of the API: 22.3\n"\
258+
"SDK Package Version: 22.5".\
259259
format(env=sys.platform, pyversion=sys.version)

asposecellscloud/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from .access_token_response import AccessTokenResponse
2929
from .area import Area
3030
from .auto_fitter_options import AutoFitterOptions
31+
from .barcode_response import BarcodeResponse
32+
from .barcode_response_list import BarcodeResponseList
3133
from .batch_convert_request import BatchConvertRequest
3234
from .border import Border
3335
from .calculation_options import CalculationOptions
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# coding: utf-8
2+
3+
"""
4+
Copyright (c) 2022 Aspose.Cells Cloud
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
"""
22+
23+
24+
from pprint import pformat
25+
from six import iteritems
26+
import re
27+
28+
29+
class BarcodeResponse(object):
30+
"""
31+
NOTE: This class is auto generated by the swagger code generator program.
32+
Do not edit the class manually.
33+
"""
34+
35+
36+
"""
37+
Attributes:
38+
swagger_types (dict): The key is attribute name
39+
and the value is attribute type.
40+
attribute_map (dict): The key is attribute name
41+
and the value is json key in definition.
42+
"""
43+
swagger_types = {
44+
'barcode_value': 'str',
45+
'barcode_type': 'str',
46+
'checksum': 'str'
47+
}
48+
49+
attribute_map = {
50+
'barcode_value': 'BarcodeValue',
51+
'barcode_type': 'BarcodeType',
52+
'checksum': 'Checksum'
53+
}
54+
55+
@staticmethod
56+
def get_swagger_types():
57+
return BarcodeResponse.swagger_types
58+
59+
@staticmethod
60+
def get_attribute_map():
61+
return BarcodeResponse.attribute_map
62+
63+
def get_from_container(self, attr):
64+
if attr in self.container:
65+
return self.container[attr]
66+
return None
67+
68+
def __init__(self, barcode_value=None, barcode_type=None, checksum=None, **kw):
69+
"""
70+
Associative dict for storing property values
71+
"""
72+
self.container = {}
73+
74+
"""
75+
BarcodeResponse - a model defined in Swagger
76+
"""
77+
78+
self.container['barcode_value'] = None
79+
self.container['barcode_type'] = None
80+
self.container['checksum'] = None
81+
82+
if barcode_value is not None:
83+
self.barcode_value = barcode_value
84+
if barcode_type is not None:
85+
self.barcode_type = barcode_type
86+
if checksum is not None:
87+
self.checksum = checksum
88+
89+
90+
@property
91+
def barcode_value(self):
92+
"""
93+
Gets the barcode_value of this BarcodeResponse.
94+
95+
:return: The barcode_value of this BarcodeResponse.
96+
:rtype: str
97+
"""
98+
return self.container['barcode_value']
99+
100+
@barcode_value.setter
101+
def barcode_value(self, barcode_value):
102+
"""
103+
Sets the barcode_value of this BarcodeResponse.
104+
105+
:param barcode_value: The barcode_value of this BarcodeResponse.
106+
:type: str
107+
"""
108+
109+
self.container['barcode_value'] = barcode_value
110+
111+
@property
112+
def barcode_type(self):
113+
"""
114+
Gets the barcode_type of this BarcodeResponse.
115+
116+
:return: The barcode_type of this BarcodeResponse.
117+
:rtype: str
118+
"""
119+
return self.container['barcode_type']
120+
121+
@barcode_type.setter
122+
def barcode_type(self, barcode_type):
123+
"""
124+
Sets the barcode_type of this BarcodeResponse.
125+
126+
:param barcode_type: The barcode_type of this BarcodeResponse.
127+
:type: str
128+
"""
129+
130+
self.container['barcode_type'] = barcode_type
131+
132+
@property
133+
def checksum(self):
134+
"""
135+
Gets the checksum of this BarcodeResponse.
136+
137+
:return: The checksum of this BarcodeResponse.
138+
:rtype: str
139+
"""
140+
return self.container['checksum']
141+
142+
@checksum.setter
143+
def checksum(self, checksum):
144+
"""
145+
Sets the checksum of this BarcodeResponse.
146+
147+
:param checksum: The checksum of this BarcodeResponse.
148+
:type: str
149+
"""
150+
151+
self.container['checksum'] = checksum
152+
153+
154+
def to_dict(self):
155+
"""
156+
Returns the model properties as a dict
157+
"""
158+
result = {}
159+
160+
for attr, _ in iteritems(self.get_swagger_types()):
161+
value = self.get_from_container(attr)
162+
if isinstance(value, list):
163+
result[attr] = list(map(
164+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
165+
value
166+
))
167+
elif hasattr(value, "to_dict"):
168+
result[attr] = value.to_dict()
169+
elif isinstance(value, dict):
170+
result[attr] = dict(map(
171+
lambda item: (item[0], item[1].to_dict())
172+
if hasattr(item[1], "to_dict") else item,
173+
value.items()
174+
))
175+
else:
176+
result[attr] = value
177+
178+
return result
179+
180+
def to_str(self):
181+
"""
182+
Returns the string representation of the model
183+
"""
184+
return pformat(self.to_dict())
185+
186+
def __repr__(self):
187+
"""
188+
For `print` and `pprint`
189+
"""
190+
return self.to_str()
191+
192+
def __eq__(self, other):
193+
"""
194+
Returns true if both objects are equal
195+
"""
196+
if not isinstance(other, BarcodeResponse):
197+
return False
198+
199+
return self.__dict__ == other.__dict__
200+
201+
def __ne__(self, other):
202+
"""
203+
Returns true if both objects are not equal
204+
"""
205+
return not self == other

0 commit comments

Comments
 (0)