python-anvil 5.0.0b1__py3-none-any.whl → 5.0.0b2__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.
python_anvil/api.py CHANGED
@@ -392,24 +392,8 @@ class Anvil:
392
392
  )
393
393
 
394
394
  payload = mutation.create_payload()
395
-
396
- # FIXME: do something here to prevent or fix pydantic from converting
397
- # files into "SerializationIterator" objects
398
395
  variables = payload.model_dump(by_alias=True, exclude_none=True)
399
396
 
400
- # print('Files', variables["files"])
401
- # print('Each')
402
- for file_obj in variables["files"]:
403
- if (
404
- file_obj["file"]
405
- and file_obj["file"].__class__.__name__ == 'SerializationIterator'
406
- ):
407
- # print("FML1", file_obj["file"])
408
- # print("FML2", dir(file_obj["file"]))
409
-
410
- # TODO: how to get the value out of the iterator??????????
411
- file_obj["file"] = file_obj["file"]
412
-
413
397
  return self.mutate(mutation, variables=variables, upload_files=True, **kwargs)
414
398
 
415
399
  def generate_etch_signing_url(self, signer_eid: str, client_user_id: str, **kwargs):
python_anvil/models.py CHANGED
@@ -29,15 +29,8 @@ class FileCompatibleBaseModel(BaseModel):
29
29
  except StopIteration:
30
30
  # Create a BytesIO with the content
31
31
  bio = BytesIO(bytes(content))
32
- # Get the total length
33
- bio.seek(0, 2) # Seek to end
34
- total_length = bio.tell()
35
- bio.seek(0) # Reset to start
36
-
37
32
  # Create a BufferedReader with the content
38
33
  reader = BufferedReader(bio) # type: ignore[arg-type]
39
- # Add a length attribute that requests_toolbelt can use
40
- reader.len = total_length # type: ignore[attr-defined]
41
34
  return reader
42
35
 
43
36
  def _check_if_serialization_iterator(self, value):
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python_anvil
3
- Version: 5.0.0b1
3
+ Version: 5.0.0b2
4
4
  Summary: Anvil API
5
5
  Home-page: https://www.useanvil.com/
6
6
  License: MIT
7
7
  Keywords: anvil,api,pdf,signing
8
8
  Author: Anvil Foundry Inc.
9
9
  Author-email: developers@useanvil.com
10
- Requires-Python: >=3.8.0,<3.13
10
+ Requires-Python: >=3.8.0,<3.12
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Natural Language :: English
@@ -18,8 +18,6 @@ Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: 3.7
23
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
22
  Requires-Dist: click (>=8.0,<9.0)
25
23
  Requires-Dist: gql[requests] (==3.6.0b1)
@@ -27,7 +25,6 @@ Requires-Dist: pydantic (>=2.6.1,<3.0.0)
27
25
  Requires-Dist: ratelimit (>=2.2.1,<3.0.0)
28
26
  Requires-Dist: requests (>=2.28.2,<3.0.0)
29
27
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
30
- Requires-Dist: urllib3 (<2)
31
28
  Project-URL: Documentation, https://github.com/anvilco/python-anvil
32
29
  Project-URL: Repository, https://github.com/anvilco/python-anvil
33
30
  Description-Content-Type: text/markdown
@@ -60,7 +57,7 @@ General API documentation: [Anvil API docs](https://www.useanvil.com/docs)
60
57
 
61
58
  ## Requirements
62
59
 
63
- * Python 3.7.2+
60
+ * Python >=3.8
64
61
 
65
62
  ## Installation
66
63
 
@@ -1,5 +1,5 @@
1
1
  python_anvil/__init__.py,sha256=3btsaCAdyjTk4PbQ9j0VYAovX2VJpdOyfFYXj8d4Rts,332
2
- python_anvil/api.py,sha256=Oc_gnhtObGsX_wXAYmNEFOiQXsCrDtUbsIMvauQWJxY,14215
2
+ python_anvil/api.py,sha256=Ar_lT-lSnuwb9XIuxHZHCU6yhlSgZANdHwSayyFU8Vk,13588
3
3
  python_anvil/api_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  python_anvil/api_resources/base.py,sha256=tE2ZWVfdt41O_eXBTICl8JyLA-9UhY3G3N2Rlw2cWto,915
5
5
  python_anvil/api_resources/mutations/__init__.py,sha256=9JOe1MiowInNzCJmuRLBTkVZcT-mOzETMoL5S_E_Y84,177
@@ -14,7 +14,7 @@ python_anvil/cli.py,sha256=kSeWh8qU6p9of27y2U1JeQKuTNk15-dwAPcsKayY-P8,10340
14
14
  python_anvil/constants.py,sha256=MxuTbJf6PPa7_2P_SqyaXrqO0Nwo-8EwP6bA0FTvG7A,339
15
15
  python_anvil/exceptions.py,sha256=XhgeG6oGQ78_DZDrmsLGX7789ygQ78aIlpJZbhCfRhg,102
16
16
  python_anvil/http.py,sha256=kzGUWpbVYp81T0hHLzqJcJ2S05M2LmPqpQBArp9dFas,7012
17
- python_anvil/models.py,sha256=UTMaFw8nEptiQ-F2eHgDSqLJuVWsBzdDx1IMKc5WUU4,3251
17
+ python_anvil/models.py,sha256=6xz0KggSHQvHgUk4IOR17QwbEZxjuYsKOQO5w9Hc8yo,2957
18
18
  python_anvil/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
19
19
  python_anvil/tests/__init__.py,sha256=LURUPwwDqcFmVe1XvEzadPdXxro8RdEF-rTaMw-AfiI,34
20
20
  python_anvil/tests/conftest.py,sha256=Noz5CUwT-xh2CJNKsYyu_bUFaoMMKavOiAuhHzZeOp8,267
@@ -25,8 +25,8 @@ python_anvil/tests/test_http.py,sha256=4BLJ0A7HKWq-9_NKoUmHKiBwbNLasig6ppGMhYJIi
25
25
  python_anvil/tests/test_models.py,sha256=aAoL2EcJ6AGYU9DraIok4P6BCqNyWlMtwbyNbT8NwRY,8246
26
26
  python_anvil/tests/test_utils.py,sha256=VQ3u0WQd7Oa_aMRF-GibRKqAlo3Bf62tHH6auCBF5o4,1352
27
27
  python_anvil/utils.py,sha256=xKbrMV6RnPMz_5eEnD-N1uvUn9895yiUhjSIUUnh13w,1103
28
- python_anvil-5.0.0b1.dist-info/LICENSE.md,sha256=0Z9mdiVAIMBp50iEbXt4bDHqlnAwAfKbj9Yi2b6O8fo,1091
29
- python_anvil-5.0.0b1.dist-info/METADATA,sha256=8s068QOjslOHDqRtKPvtO2EKhKyIOLn0yL7dTSycNiY,3399
30
- python_anvil-5.0.0b1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
31
- python_anvil-5.0.0b1.dist-info/entry_points.txt,sha256=nf_xgj2f9K2Zascpk2MtOP-CT2fmKc1xUDWnTdq4P_Y,46
32
- python_anvil-5.0.0b1.dist-info/RECORD,,
28
+ python_anvil-5.0.0b2.dist-info/LICENSE.md,sha256=0Z9mdiVAIMBp50iEbXt4bDHqlnAwAfKbj9Yi2b6O8fo,1091
29
+ python_anvil-5.0.0b2.dist-info/METADATA,sha256=-PLEO1xDppcag1-9MkBb4VsRjU87Rh2LQslLipOAigg,3269
30
+ python_anvil-5.0.0b2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
31
+ python_anvil-5.0.0b2.dist-info/entry_points.txt,sha256=nf_xgj2f9K2Zascpk2MtOP-CT2fmKc1xUDWnTdq4P_Y,46
32
+ python_anvil-5.0.0b2.dist-info/RECORD,,