vysion 2.0.4__py3-none-any.whl → 2.0.6__py3-none-any.whl

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.
vysion/client/client.py CHANGED
@@ -116,7 +116,7 @@ class BaseClient:
116
116
  query = "?" + urlencode(query_params_initialzed)
117
117
  return urljoin(base, query)
118
118
 
119
- def _make_request(self, url: str) -> VysionResponse:
119
+ def _make_request(self, url: str, expect_json: bool = True) -> VysionResponse:
120
120
  session = self.__get_session__()
121
121
  r = session.get(url)
122
122
 
@@ -132,7 +132,10 @@ class BaseClient:
132
132
 
133
133
  raise APIError(code, message)
134
134
 
135
- result = r.json()
135
+ if expect_json:
136
+ result = r.json()
137
+ else:
138
+ result = r
136
139
 
137
140
  return result
138
141
 
@@ -238,8 +241,8 @@ class Client(BaseClient):
238
241
  gte: datetime = None,
239
242
  ) -> VysionResponse[DocumentHit]:
240
243
  url = self._build_api_url__(
241
- "document/phone",
242
- country_code + "/" + phone_number,
244
+ "document/phone/" + country_code,
245
+ phone_number,
243
246
  page=page,
244
247
  lte=lte,
245
248
  gte=gte,
@@ -258,7 +261,7 @@ class Client(BaseClient):
258
261
  gte: datetime = None,
259
262
  ) -> VysionResponse[DocumentHit]:
260
263
  url = self._build_api_url__(
261
- "document/wallet", chain + "/" + address, page=page, lte=lte, gte=gte
264
+ "document/wallet/" + chain, address, page=page, lte=lte, gte=gte
262
265
  )
263
266
 
264
267
  result = VysionResponse[DocumentHit].model_validate(self._make_request(url))
@@ -268,7 +271,7 @@ class Client(BaseClient):
268
271
  def get_document_html(self, document_id: str) -> str:
269
272
  url = self._build_api_url__("html", document_id)
270
273
 
271
- result = requests.get(url)
274
+ result = self._make_request(url, expect_json=False)
272
275
 
273
276
  return result.text
274
277
 
vysion/version.py CHANGED
@@ -15,4 +15,4 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- __version__ = "2.0.4"
18
+ __version__ = "2.0.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vysion
3
- Version: 2.0.4
3
+ Version: 2.0.6
4
4
  Summary: The official Python client library for Vysion
5
5
  Home-page: https://vysion.ai
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Requires-Dist: pydantic (>=2.0.1,<3.0.0)
19
- Requires-Dist: pymisp (==2.4.194)
19
+ Requires-Dist: pymisp (>=2.4.194,<3.0.0)
20
20
  Requires-Dist: requests (>=2.28.1,<3.0.0)
21
21
  Requires-Dist: softenum (==1.0.1)
22
22
  Project-URL: Documentation, https://developers.vysion.ai
@@ -29,7 +29,7 @@ Welcome to the PyPi webpage for Vysion, our implementation as a Python library t
29
29
 
30
30
  You can request a demo for the web app or an API-key to use in this library at [vysion.ai](https://vysion.ai).
31
31
 
32
- Latest version: [2.0.4](https://pypi.org/project/vysion/)
32
+ Latest version: [2.0.6](https://pypi.org/project/vysion/)
33
33
 
34
34
  You can visit [the documentation](https://developers.vysion.ai/?python) for more information on the searches and requests performed with the library or directly on the API.
35
35
 
@@ -1,6 +1,6 @@
1
1
  vysion/__init__.py,sha256=yxJiM-S29q8GB3PBff9tV70P2nvydd8aKLEprLkXw5o,664
2
2
  vysion/client/__init__.py,sha256=aVHmBuetPdybp7TgcNzUx4HkxTjEuXYzSdDYiYfFQd0,630
3
- vysion/client/client.py,sha256=dsIpnA6nYS7NNNMWmD2H1YqB3pw949viOhBPLHdgycw,12568
3
+ vysion/client/client.py,sha256=r120ivh3ZQ4vdCs2mNCatfQVY51wSnGmJ68cxMp_NCg,12674
4
4
  vysion/client/error.py,sha256=-3NGr9ngTGSy-ctqk6S9eMBAvtY3lnjv9i0KiuRjd5g,1158
5
5
  vysion/dto/__init__.py,sha256=ct8JxVMfJ0APiOTgr9ju-JIuBlXOrPkx7n2qISSXUts,605
6
6
  vysion/dto/dto.py,sha256=kRwN3ElHt0GxM4bHuGgDa-IFRqVul0R3CBDfZBh7R-s,13058
@@ -15,8 +15,8 @@ vysion/model/enum/services.py,sha256=fUfZEO0RNNctU4Gzae5TV3c7BU5A_cEwaEb1tzqgcr0
15
15
  vysion/taxonomy/__init__.py,sha256=Bc364AYxRCyjIn26-XBPeEDCPe3Hma4r5RAI8R8eblU,635
16
16
  vysion/taxonomy/flavours.py,sha256=ubImHBE8v0zhzFy_2YozAQk2SzN1XDQwHAxb2RebtCo,2347
17
17
  vysion/taxonomy/taxonomy.py,sha256=mG6vHX5Eyp38AKyJBgfBDqdpEmDMbkv8TA8YUBzko54,12227
18
- vysion/version.py,sha256=cci_uY1R7ChLU2zVMFbT58fhHrAsSvCjLibG5zyrZy0,610
19
- vysion-2.0.4.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
20
- vysion-2.0.4.dist-info/METADATA,sha256=Swo1zlY2IdypM7grw53xvd-AdAdcPwGGOLeJvDOZbXM,2122
21
- vysion-2.0.4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
22
- vysion-2.0.4.dist-info/RECORD,,
18
+ vysion/version.py,sha256=JjgpfRARiFcR5QMLvZdV7VZ24MLg7NyK77vGjLvIs-c,610
19
+ vysion-2.0.6.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
20
+ vysion-2.0.6.dist-info/METADATA,sha256=iq3b0bZ5_0mjC57yC91scGC4HEjmiWIaGcL2d4FQY4Q,2129
21
+ vysion-2.0.6.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
22
+ vysion-2.0.6.dist-info/RECORD,,
File without changes