TypeDAL 3.15.3__py3-none-any.whl → 3.15.5__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.

Potentially problematic release.


This version of TypeDAL might be problematic. Click here for more details.

typedal/__about__.py CHANGED
@@ -5,4 +5,4 @@ This file contains the Version info for this package.
5
5
  # SPDX-FileCopyrightText: 2023-present Robin van der Noord <robinvandernoord@gmail.com>
6
6
  #
7
7
  # SPDX-License-Identifier: MIT
8
- __version__ = "3.15.3"
8
+ __version__ = "3.15.5"
typedal/core.py CHANGED
@@ -2153,7 +2153,7 @@ class TypedRows(typing.Collection[T_MetaInstance], Rows):
2153
2153
 
2154
2154
  def as_dict(
2155
2155
  self,
2156
- key: str = None,
2156
+ key: str | Field = None,
2157
2157
  compact: bool = False,
2158
2158
  storage_to_dict: bool = False,
2159
2159
  datetime_to_str: bool = False,
@@ -2164,6 +2164,9 @@ class TypedRows(typing.Collection[T_MetaInstance], Rows):
2164
2164
  """
2165
2165
  if any([key, compact, storage_to_dict, datetime_to_str, custom_types]):
2166
2166
  # functionality not guaranteed
2167
+ if isinstance(key, Field):
2168
+ key = key.name
2169
+
2167
2170
  return typing.cast(
2168
2171
  dict[int, AnyDict],
2169
2172
  super().as_dict(
@@ -35,10 +35,10 @@ class AuthUser(TypedTable):
35
35
  """
36
36
  super().__on_define__(db)
37
37
 
38
- cls.email.requires = (
38
+ cls.email.requires = [
39
39
  IS_EMAIL(),
40
40
  IS_NOT_IN_DB(
41
41
  db,
42
42
  "auth_user.email",
43
43
  ),
44
- )
44
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypeDAL
3
- Version: 3.15.3
3
+ Version: 3.15.5
4
4
  Summary: Typing support for PyDAL
5
5
  Project-URL: Documentation, https://typedal.readthedocs.io/
6
6
  Project-URL: Issues, https://github.com/trialandsuccess/TypeDAL/issues
@@ -1,9 +1,9 @@
1
- typedal/__about__.py,sha256=62cP7HMo3c0nBogw4zgAclTNfv9zwu1wgsckXO6IfWI,207
1
+ typedal/__about__.py,sha256=GGSOGb_he-ttp2Fo05jyy0iXMc7WB7-ql3FV_lv8vEo,207
2
2
  typedal/__init__.py,sha256=Y6LT5UE3HrfWND_drJddYFbDjfnvqQER8MxZiEREFGw,366
3
3
  typedal/caching.py,sha256=6YUzUMpan56nSy3D-Jl0FS-8V4LbTnpRSoDJHj6yPYo,11782
4
4
  typedal/cli.py,sha256=SnWceLPDd-t90VPHAV9O3RR7JZtpVniT55TqtrRv3VM,19255
5
5
  typedal/config.py,sha256=0qy1zrTUdtmXPM9jHzFnSR1DJsqGJqcdG6pvhzKQHe0,11625
6
- typedal/core.py,sha256=vcbCmQntNUvUWl_DP-0hflss3OronMqIAh_P0GdfqGQ,110674
6
+ typedal/core.py,sha256=LqJt271aYA7cE7voqCsg0GpB_REx8L4LeabM4ur3jOA,110753
7
7
  typedal/fields.py,sha256=oOmTonXG-g4Lpj5_gSr8GJ-EZIEqO435Fm8-MS_cmoc,7356
8
8
  typedal/for_py4web.py,sha256=KIIu8XgnAfRQCJfZCra79k8SInOHiFuLDKUv3hzTJng,1908
9
9
  typedal/for_web2py.py,sha256=xn7zo6ImsmTkH6LacbjLQl2oqyBvP0zLqRxEJvMQk1w,1929
@@ -11,9 +11,9 @@ typedal/helpers.py,sha256=LpBgTwKmt9f1b4Mz98mxusvIHGiCpW_abDMZLP81g6Y,8850
11
11
  typedal/mixins.py,sha256=p8OAx1N9MVEF4bhdxB_cC-GTczXzt76OMl_KBKtMYAU,7959
12
12
  typedal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  typedal/types.py,sha256=1FIgv1s0be0E8r5Wd9E1nvDvK4ETV8u2NlfI7_P6UUY,6752
14
- typedal/web2py_py4web_shared.py,sha256=VK9T8P5UwVLvfNBsY4q79ANcABv-jX76YKADt1Zz_co,1539
14
+ typedal/web2py_py4web_shared.py,sha256=UYmD0_aK1bSVBt_f3j59Mxq-zOmQNkYkb8sPDUibq68,1539
15
15
  typedal/serializers/as_json.py,sha256=3JZlFhPrdvZVFAmH7P5DUAz8-TIk-br0F1CjKG3PFDM,2246
16
- typedal-3.15.3.dist-info/METADATA,sha256=zhGdjr7WGvQXGxabXqtJyl1gUHdbh0UGc7uLVYShIxY,10461
17
- typedal-3.15.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- typedal-3.15.3.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
19
- typedal-3.15.3.dist-info/RECORD,,
16
+ typedal-3.15.5.dist-info/METADATA,sha256=_ufdyTJf7FWKYF_6Qegbk3Levcy9Qkd0d6Rt5nsqdTE,10461
17
+ typedal-3.15.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
+ typedal-3.15.5.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
19
+ typedal-3.15.5.dist-info/RECORD,,