polyswarm-api 3.13.0__tar.gz → 3.13.2__tar.gz
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.
- {polyswarm-api-3.13.0/src/polyswarm_api.egg-info → polyswarm-api-3.13.2}/PKG-INFO +1 -1
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/setup.py +1 -1
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/__init__.py +1 -1
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/api.py +3 -2
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/core.py +2 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/exceptions.py +4 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/resources.py +1 -7
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2/src/polyswarm_api.egg-info}/PKG-INFO +1 -1
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/LICENSE +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/MANIFEST.in +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/README.md +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/requirements.txt +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/setup.cfg +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api/settings.py +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api.egg-info/SOURCES.txt +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api.egg-info/dependency_links.txt +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api.egg-info/requires.txt +0 -0
- {polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api.egg-info/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@ with open('README.md', 'r') as readme:
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name='polyswarm-api',
|
|
12
|
-
version='3.13.
|
|
12
|
+
version='3.13.2',
|
|
13
13
|
description='Client library to simplify interacting with the PolySwarm consumer API',
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type='text/markdown',
|
|
@@ -996,14 +996,15 @@ class PolyswarmAPI:
|
|
|
996
996
|
sandbox_task_id=sandbox_task_id,
|
|
997
997
|
template_id=template_id,
|
|
998
998
|
template_metadata=template_metadata,
|
|
999
|
+
community=self.community,
|
|
999
1000
|
**kwargs).result()
|
|
1000
1001
|
return report
|
|
1001
1002
|
|
|
1002
1003
|
def report_get(self, id, **kwargs):
|
|
1003
|
-
return resources.ReportTask.get(self, id=id, **kwargs).result()
|
|
1004
|
+
return resources.ReportTask.get(self, id=id, community=self.community, **kwargs).result()
|
|
1004
1005
|
|
|
1005
1006
|
def report_download(self, report_id, folder):
|
|
1006
|
-
report =
|
|
1007
|
+
report = self.report_get(id=report_id)
|
|
1007
1008
|
if report.state == 'PENDING':
|
|
1008
1009
|
raise exceptions.InvalidValueException('Report is in PENDING state, wait for completion first')
|
|
1009
1010
|
if report.state == 'FAILED':
|
|
@@ -148,6 +148,8 @@ class PolyswarmRequest(object):
|
|
|
148
148
|
raise exceptions.UsageLimitsExceededException(self, message)
|
|
149
149
|
elif self.status_code == 404:
|
|
150
150
|
raise exceptions.NotFoundException(self, self._result)
|
|
151
|
+
elif self.status_code == 422:
|
|
152
|
+
raise exceptions.FailedInstanceException(self, self._result)
|
|
151
153
|
else:
|
|
152
154
|
raise exceptions.RequestException(self, self._bad_status_message())
|
|
153
155
|
elif self.status_code == 204:
|
|
@@ -31,11 +31,6 @@ class Engine(core.BaseJsonResource):
|
|
|
31
31
|
self.id = str(content['id'])
|
|
32
32
|
self.name = content['name']
|
|
33
33
|
|
|
34
|
-
try:
|
|
35
|
-
self.address = content['address'].lower()
|
|
36
|
-
except:
|
|
37
|
-
self.address = None
|
|
38
|
-
|
|
39
34
|
account_number = content.get('accountNumber')
|
|
40
35
|
self.account_number = str(account_number) if account_number else None
|
|
41
36
|
|
|
@@ -67,10 +62,9 @@ class Engine(core.BaseJsonResource):
|
|
|
67
62
|
return self.id == other.id if isinstance(other, Engine) else False
|
|
68
63
|
|
|
69
64
|
def __repr__(self):
|
|
70
|
-
return '{}(name={},
|
|
65
|
+
return '{}(name={}, status={}, engine_type={})'.format(
|
|
71
66
|
self.__class__.__name__,
|
|
72
67
|
self.name,
|
|
73
|
-
self.address,
|
|
74
68
|
self.status,
|
|
75
69
|
self.engine_type,
|
|
76
70
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyswarm-api-3.13.0 → polyswarm-api-3.13.2}/src/polyswarm_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|