soia-client 1.0.23__py3-none-any.whl → 1.0.25__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.
@@ -1,6 +1,5 @@
1
1
  import http.client
2
2
  import re
3
- import typing
4
3
  from typing import Any, Final, Mapping, Protocol
5
4
  from urllib.parse import urlparse
6
5
 
soia/_impl/structs.py CHANGED
@@ -676,7 +676,7 @@ def _make_from_json_fn(
676
676
  name = field.field.name
677
677
  lvalue = f"ret.{field.field.attribute}"
678
678
  builder.append_ln(f' if "{name}" in json:')
679
- builder.append_ln(f" array_len = {field.field.number}")
679
+ builder.append_ln(f" array_len = {field.field.number + 1}")
680
680
  builder.append_ln(
681
681
  f" {lvalue} = ",
682
682
  field.type.from_json_expr(f'json["{name}"]'),
soia/_impl/timestamp.py CHANGED
@@ -24,6 +24,10 @@ class Timestamp:
24
24
  def from_unix_seconds(unix_seconds: float) -> "Timestamp":
25
25
  return Timestamp(unix_millis=round(unix_seconds * 1000))
26
26
 
27
+ @staticmethod
28
+ def from_iso_format(date_string: str) -> "Timestamp":
29
+ return Timestamp.from_datetime(datetime.datetime.fromisoformat(date_string))
30
+
27
31
  @staticmethod
28
32
  def from_datetime(dt: datetime.datetime) -> "Timestamp":
29
33
  return Timestamp.from_unix_seconds(dt.timestamp())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soia-client
3
- Version: 1.0.23
3
+ Version: 1.0.25
4
4
  Author-email: Tyler Fibonacci <gepheum@gmail.com>
5
5
  License: MIT License
6
6
 
@@ -15,12 +15,12 @@ soia/_impl/repr.py,sha256=7WX0bEAVENTjlyZIcbT8TcJylS7IRIyafGCmqaIMxFM,1413
15
15
  soia/_impl/serializer.py,sha256=28IwkjtUnLpbnPQfVNfJXkApCK4JhXHwLkC5MVhF8xo,3529
16
16
  soia/_impl/serializers.py,sha256=IL9jHHMo11pgrL1-crarOEElvTyV5YM6FTcgumjW6IU,2564
17
17
  soia/_impl/service.py,sha256=PsV286BYMoJpXIjeBc__MHHakcqof0Pbb3B_Zha1PZI,11928
18
- soia/_impl/service_client.py,sha256=vxlUUVCGtd-S9JF-xTTM0R9maO7ZVpfhbAJGYRoBnzw,5333
19
- soia/_impl/structs.py,sha256=iEO6Mu2I0--oNqvPWxFxXEzZ_0RXNIKndhdzWU5Zqw8,26781
20
- soia/_impl/timestamp.py,sha256=lXBNH8mPmzflkNjSKZSBl2XS-ot9N8N92B_zGO2SMtU,4078
18
+ soia/_impl/service_client.py,sha256=NtaJmkk7DShLKZm_QOzQtboXqmfKvdLRym1EZ-EbJQI,5319
19
+ soia/_impl/structs.py,sha256=KrqucOqSxXda4-3gKyCmx_Oj4osTFBLk9ORyRkV_7dk,26785
20
+ soia/_impl/timestamp.py,sha256=McEdyDDwaR8_2Mmi-MUY7dUT2sMR-yEGkTZWdBH5b4U,4240
21
21
  soia/_impl/type_adapter.py,sha256=RyIyh4Fnt9rMy0HRzC-a2v2JAdZsV9FBzoGEUVygVRE,2101
22
- soia_client-1.0.23.dist-info/licenses/LICENSE,sha256=SaAftKkX6hfSOiPdENQPS70tifH3PDHgazq8eK2Pwfw,1064
23
- soia_client-1.0.23.dist-info/METADATA,sha256=cDChHoM5TBijDK4m3YB-CH5kbhU3KglDeqRPETz-zms,2122
24
- soia_client-1.0.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- soia_client-1.0.23.dist-info/top_level.txt,sha256=lsYG9JrvauFe1oIV5zvnwsS9hsx3ztwfK_937op9mxc,5
26
- soia_client-1.0.23.dist-info/RECORD,,
22
+ soia_client-1.0.25.dist-info/licenses/LICENSE,sha256=SaAftKkX6hfSOiPdENQPS70tifH3PDHgazq8eK2Pwfw,1064
23
+ soia_client-1.0.25.dist-info/METADATA,sha256=hSiSG-D9zQrxRJYCVOn-K7FB9x6iV3teXm1NMJBdDBM,2122
24
+ soia_client-1.0.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ soia_client-1.0.25.dist-info/top_level.txt,sha256=lsYG9JrvauFe1oIV5zvnwsS9hsx3ztwfK_937op9mxc,5
26
+ soia_client-1.0.25.dist-info/RECORD,,