nuql 0.0.7__py3-none-any.whl → 0.0.8__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.
@@ -12,10 +12,10 @@ class DatetimeTimestamp(FieldBase):
12
12
 
13
13
  def serialise(self, value: datetime | None) -> int | None:
14
14
  """
15
- Serialises a datetime to a timestamp.
15
+ Serialises a `datetime` to a timestamp.
16
16
 
17
- :arg value: datetime instance or None.
18
- :return: int or None.
17
+ :arg value: `datetime` instance or `None`.
18
+ :return: `int` or `None`.
19
19
  """
20
20
  if not isinstance(value, datetime):
21
21
  return None
@@ -27,19 +27,19 @@ class DatetimeTimestamp(FieldBase):
27
27
  message='Datetime value must be timezone-aware.'
28
28
  )
29
29
 
30
- return int(value.astimezone(UTC).timestamp() * 1000)
30
+ return int(value.astimezone(UTC).timestamp())
31
31
 
32
32
  def deserialise(self, value: Decimal | None) -> datetime | None:
33
33
  """
34
- Deserialises a timestamp to a datetime.
34
+ Deserialises a timestamp to a `datetime`.
35
35
 
36
- :arg value: Decimal instance or None.
37
- :return: datetime instance or None.
36
+ :arg value: `Decimal` instance or `None`.
37
+ :return: `datetime` instance or `None`.
38
38
  """
39
39
  if not isinstance(value, Decimal):
40
40
  return None
41
41
 
42
42
  try:
43
- return datetime.fromtimestamp(int(value) / 1000, UTC)
43
+ return datetime.fromtimestamp(int(value), UTC)
44
44
  except (ValueError, TypeError):
45
45
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nuql
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Nuql (pronounced 'nuckle') is a lightweight DynamoDB library for implementing the single table model pattern.
5
5
  License: MIT License
6
6
 
@@ -28,7 +28,7 @@ nuql/api/update/utils.py,sha256=ZT2EuSSvoD6-C3Gpybn68N9MohVYDGa6DdpSDIGh-GA,3728
28
28
  nuql/fields/__init__.py,sha256=Ldf91fDoiNRkseWo3NksQlOxJTEI-EdS6i1OPjzE_9Y,256
29
29
  nuql/fields/boolean.py,sha256=OnmxZyaFH2up1dHDc5p9iHi8fvYZQV1TPI-LMwSb0NA,712
30
30
  nuql/fields/datetime.py,sha256=4K28yydnzUc1HsMH-lgSSNOx2NbEL4qXC3kTpuRBVis,1386
31
- nuql/fields/datetime_timestamp.py,sha256=drJLpmGhL8ANrfGsArKeVLb4v7maiignhzC4qpQzMHY,1275
31
+ nuql/fields/datetime_timestamp.py,sha256=-R8IWDq0y92lkqq6BUJLzgeGgcx1RNd6jdA3sHPmjrU,1281
32
32
  nuql/fields/float.py,sha256=x48Spo_GNku0djO0Ogs8usZTfwOY-27Mh5OPOQBO3OY,1316
33
33
  nuql/fields/integer.py,sha256=pHs3CJM4xKN60IYg5aTe4QjSQQBR4jp08HyANtidHgs,1312
34
34
  nuql/fields/key.py,sha256=vG_yj4Lkiz3bsD2f31HEVgU5lEde_gTYk4awQ78gko8,6912
@@ -60,7 +60,7 @@ nuql/types/__init__.py,sha256=Ea4KR4mUs1RNUEskKF9sXfGpoQw2V9cnIYeE20wkChs,76
60
60
  nuql/types/config.py,sha256=lFfPPe62l4DkfLXR8ecw5AiSRAFzsTYy_3a0d_1M7hY,659
61
61
  nuql/types/fields.py,sha256=LjGgXM84WO54gRDkgvnwF3pjFvFxErdGYOvs0BskF_o,883
62
62
  nuql/types/serialisation.py,sha256=XAy_gARcwYmfEuxWAJox2ClWK9ow0F5WXKVbMUVBq9w,242
63
- nuql-0.0.7.dist-info/METADATA,sha256=gLqBg1Yagk-W7bcv9Ccir4ljUXLhGT7XylyA0MTkPl8,1667
64
- nuql-0.0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
65
- nuql-0.0.7.dist-info/licenses/LICENSE,sha256=AS8DF6oGYsvk781m40Nec9eCkj_S_oUVAWaFakB2LMs,1097
66
- nuql-0.0.7.dist-info/RECORD,,
63
+ nuql-0.0.8.dist-info/METADATA,sha256=pXKtyyEnRb_cVkKVNVQPUS2X2lpgKJayQwWxaGtRKGk,1667
64
+ nuql-0.0.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
65
+ nuql-0.0.8.dist-info/licenses/LICENSE,sha256=AS8DF6oGYsvk781m40Nec9eCkj_S_oUVAWaFakB2LMs,1097
66
+ nuql-0.0.8.dist-info/RECORD,,
File without changes