fastapi-rtk 0.2.27__py3-none-any.whl → 1.0.13__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.
- fastapi_rtk/__init__.py +39 -35
- fastapi_rtk/_version.py +1 -0
- fastapi_rtk/api/model_rest_api.py +476 -221
- fastapi_rtk/auth/auth.py +0 -9
- fastapi_rtk/backends/generic/__init__.py +6 -0
- fastapi_rtk/backends/generic/column.py +21 -12
- fastapi_rtk/backends/generic/db.py +42 -7
- fastapi_rtk/backends/generic/filters.py +21 -16
- fastapi_rtk/backends/generic/interface.py +14 -8
- fastapi_rtk/backends/generic/model.py +19 -11
- fastapi_rtk/backends/sqla/__init__.py +1 -0
- fastapi_rtk/backends/sqla/db.py +77 -17
- fastapi_rtk/backends/sqla/extensions/audit/audit.py +401 -189
- fastapi_rtk/backends/sqla/extensions/geoalchemy2/filters.py +15 -12
- fastapi_rtk/backends/sqla/filters.py +50 -21
- fastapi_rtk/backends/sqla/interface.py +96 -34
- fastapi_rtk/backends/sqla/model.py +56 -39
- fastapi_rtk/bases/__init__.py +20 -0
- fastapi_rtk/bases/db.py +94 -7
- fastapi_rtk/bases/file_manager.py +47 -3
- fastapi_rtk/bases/filter.py +22 -0
- fastapi_rtk/bases/interface.py +49 -5
- fastapi_rtk/bases/model.py +3 -0
- fastapi_rtk/bases/session.py +2 -0
- fastapi_rtk/cli/cli.py +62 -9
- fastapi_rtk/cli/commands/__init__.py +23 -0
- fastapi_rtk/cli/{db.py → commands/db/__init__.py} +107 -50
- fastapi_rtk/cli/{templates → commands/db/templates}/fastapi/env.py +2 -3
- fastapi_rtk/cli/{templates → commands/db/templates}/fastapi-multidb/env.py +10 -9
- fastapi_rtk/cli/{templates → commands/db/templates}/fastapi-multidb/script.py.mako +3 -1
- fastapi_rtk/cli/{export.py → commands/export.py} +12 -10
- fastapi_rtk/cli/{security.py → commands/security.py} +73 -7
- fastapi_rtk/cli/commands/translate.py +299 -0
- fastapi_rtk/cli/decorators.py +9 -4
- fastapi_rtk/cli/utils.py +46 -0
- fastapi_rtk/config.py +41 -1
- fastapi_rtk/const.py +29 -1
- fastapi_rtk/db.py +76 -40
- fastapi_rtk/decorators.py +1 -1
- fastapi_rtk/dependencies.py +134 -62
- fastapi_rtk/exceptions.py +51 -1
- fastapi_rtk/fastapi_react_toolkit.py +186 -171
- fastapi_rtk/file_managers/file_manager.py +8 -6
- fastapi_rtk/file_managers/s3_file_manager.py +69 -33
- fastapi_rtk/globals.py +22 -12
- fastapi_rtk/lang/__init__.py +3 -0
- fastapi_rtk/lang/babel/__init__.py +4 -0
- fastapi_rtk/lang/babel/cli.py +40 -0
- fastapi_rtk/lang/babel/config.py +17 -0
- fastapi_rtk/lang/babel.cfg +1 -0
- fastapi_rtk/lang/lazy_text.py +120 -0
- fastapi_rtk/lang/messages.pot +238 -0
- fastapi_rtk/lang/translations/de/LC_MESSAGES/messages.mo +0 -0
- fastapi_rtk/lang/translations/de/LC_MESSAGES/messages.po +248 -0
- fastapi_rtk/lang/translations/en/LC_MESSAGES/messages.mo +0 -0
- fastapi_rtk/lang/translations/en/LC_MESSAGES/messages.po +244 -0
- fastapi_rtk/manager.py +355 -37
- fastapi_rtk/mixins.py +12 -0
- fastapi_rtk/routers.py +208 -72
- fastapi_rtk/schemas.py +142 -39
- fastapi_rtk/security/sqla/apis.py +39 -13
- fastapi_rtk/security/sqla/models.py +8 -23
- fastapi_rtk/security/sqla/security_manager.py +369 -11
- fastapi_rtk/setting.py +446 -88
- fastapi_rtk/types.py +94 -27
- fastapi_rtk/utils/__init__.py +8 -0
- fastapi_rtk/utils/async_task_runner.py +286 -61
- fastapi_rtk/utils/csv_json_converter.py +243 -40
- fastapi_rtk/utils/hooks.py +34 -0
- fastapi_rtk/utils/merge_schema.py +3 -3
- fastapi_rtk/utils/multiple_async_contexts.py +21 -0
- fastapi_rtk/utils/pydantic.py +46 -1
- fastapi_rtk/utils/run_utils.py +31 -1
- fastapi_rtk/utils/self_dependencies.py +1 -1
- fastapi_rtk/utils/use_default_when_none.py +1 -1
- fastapi_rtk/version.py +6 -1
- fastapi_rtk-1.0.13.dist-info/METADATA +28 -0
- fastapi_rtk-1.0.13.dist-info/RECORD +133 -0
- {fastapi_rtk-0.2.27.dist-info → fastapi_rtk-1.0.13.dist-info}/WHEEL +1 -2
- fastapi_rtk/backends/gremlinpython/__init__.py +0 -108
- fastapi_rtk/backends/gremlinpython/column.py +0 -208
- fastapi_rtk/backends/gremlinpython/db.py +0 -228
- fastapi_rtk/backends/gremlinpython/exceptions.py +0 -34
- fastapi_rtk/backends/gremlinpython/filters.py +0 -461
- fastapi_rtk/backends/gremlinpython/interface.py +0 -734
- fastapi_rtk/backends/gremlinpython/model.py +0 -364
- fastapi_rtk/backends/gremlinpython/session.py +0 -23
- fastapi_rtk/cli/commands.py +0 -295
- fastapi_rtk-0.2.27.dist-info/METADATA +0 -23
- fastapi_rtk-0.2.27.dist-info/RECORD +0 -126
- fastapi_rtk-0.2.27.dist-info/top_level.txt +0 -1
- /fastapi_rtk/cli/{templates → commands/db/templates}/fastapi/README +0 -0
- /fastapi_rtk/cli/{templates → commands/db/templates}/fastapi/alembic.ini.mako +0 -0
- /fastapi_rtk/cli/{templates → commands/db/templates}/fastapi/script.py.mako +0 -0
- /fastapi_rtk/cli/{templates → commands/db/templates}/fastapi-multidb/README +0 -0
- /fastapi_rtk/cli/{templates → commands/db/templates}/fastapi-multidb/alembic.ini.mako +0 -0
- {fastapi_rtk-0.2.27.dist-info → fastapi_rtk-1.0.13.dist-info}/entry_points.txt +0 -0
- {fastapi_rtk-0.2.27.dist-info → fastapi_rtk-1.0.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
fastapi_rtk/__init__.py,sha256=Lg6Er5blOMcbtQSRJMNWbRQ1VX4PWEPMVFm2ie5r8mA,6183
|
|
2
|
+
fastapi_rtk/_version.py,sha256=wNoGY0qdTAFUvE0bIbXr21KwpofxY8Hj9hqYUIvspQA,23
|
|
3
|
+
fastapi_rtk/apis.py,sha256=6X_Lhl98m7lKrDRybg2Oe24pLFLJ29eCOQSwCAvpKhY,172
|
|
4
|
+
fastapi_rtk/config.py,sha256=9PZF9E5i1gxmnsZEprZZKxVHSk0dFEklJSplX9NEqdo,14036
|
|
5
|
+
fastapi_rtk/const.py,sha256=sEj_cYeerj9pVwbCu0k5Sy1EYpdr1EHzUjqqbnporgc,4905
|
|
6
|
+
fastapi_rtk/db.py,sha256=4bNlpG_HqJzMkhgQ4c7kxm1AH82UVWRSD2ajexHp1Cs,24654
|
|
7
|
+
fastapi_rtk/decorators.py,sha256=HqAFSiO0l5_M0idWs0IcY24FdzbAcDQDQoifM_WgZAQ,14515
|
|
8
|
+
fastapi_rtk/dependencies.py,sha256=jlcsMrh83yrJsgXvpWJet_mjqwDP3nBZfPSg4Lq8KKE,7757
|
|
9
|
+
fastapi_rtk/exceptions.py,sha256=P0qwd4VkeWFotgMVQHgmdT1NphFQaEznKLFIvJzW4Zs,2594
|
|
10
|
+
fastapi_rtk/fastapi_react_toolkit.py,sha256=lvtieBLzCAlozKQU9dkAUVoW7Ofi1ncri_hDyeHazF4,29803
|
|
11
|
+
fastapi_rtk/filters.py,sha256=weCH3suCxpGJQYmwhj9D1iAqMPiRnmbRiN7stK0rhoE,181
|
|
12
|
+
fastapi_rtk/globals.py,sha256=TcoMHCueM7sFwZ8iYorUe4q-3KpVFfV04RAPuMTYFKY,8863
|
|
13
|
+
fastapi_rtk/manager.py,sha256=J86sBByj6E1kZ3CRS0NayI0n5firrfMhAU2d58mz0JM,33965
|
|
14
|
+
fastapi_rtk/middlewares.py,sha256=ycdaAdLIUaNEZ7KotczTHS6OOqy98Mn1_O7Hpe7Sma8,10325
|
|
15
|
+
fastapi_rtk/mixins.py,sha256=78RqwrRJFOz6KAxf-GSNOmRdr7R3b-ws7OIENYlzRQQ,238
|
|
16
|
+
fastapi_rtk/models.py,sha256=lQSqe-r0H7jWBVdqXjEi_bNL1cGQr0YWnyI1ToS_coc,178
|
|
17
|
+
fastapi_rtk/routers.py,sha256=5gMGyH4Any9TwB3Fz23QDkmrX8MouzCxVgoAIcBqnTI,18988
|
|
18
|
+
fastapi_rtk/schemas.py,sha256=mdIX93QRaQBLrQz-kBvG5wyKoi8H6OQpFuTBO9-mCK4,17894
|
|
19
|
+
fastapi_rtk/setting.py,sha256=vpjnio0mp_yZhDajZaBl6uOFmrBYl-sqB0L_lSkBpfk,19529
|
|
20
|
+
fastapi_rtk/types.py,sha256=-LPnTIbHvqJW81__gab3EWrhjNmznHhptz0BtXkEAHQ,3612
|
|
21
|
+
fastapi_rtk/version.py,sha256=D2cmQf2LNeHOiEfcNzVOOfcAmuLvPEmGEtZv5G54D0c,195
|
|
22
|
+
fastapi_rtk/api/__init__.py,sha256=MwFR7HHppnhbjZGg3sOdQ6nqy9uxnHHXvicpswNFMNA,245
|
|
23
|
+
fastapi_rtk/api/base_api.py,sha256=42I9v3b25lqxNAMDGEtajA5-btIDSyUWF0xMDgGkA8c,8078
|
|
24
|
+
fastapi_rtk/api/model_rest_api.py,sha256=pLuwefPEunf0P1k_UlKFEINZaT8RTPEHcN0j784G8Z0,106536
|
|
25
|
+
fastapi_rtk/auth/__init__.py,sha256=iX7O41NivBYDfdomEaqm4lUx9KD17wI4g3EFLF6kUTw,336
|
|
26
|
+
fastapi_rtk/auth/auth.py,sha256=F2qZoR7go_7FnvVJrDxUCd6vtRz5XW8yyOv143MWPts,20664
|
|
27
|
+
fastapi_rtk/auth/hashers/__init__.py,sha256=uBThFj2VPPSMSioxYTktNiM4-mVgtDAjTpKA3ZzWxxs,110
|
|
28
|
+
fastapi_rtk/auth/hashers/pbkdf2.py,sha256=EeusoypVDHVuxneoPP2aXOPpyCwxx_5O22qMeDW51b0,919
|
|
29
|
+
fastapi_rtk/auth/hashers/scrypt.py,sha256=CPGe6vzj7hlKTl_MKDGSgKQW927EpPkgpGM7mVO5MW0,902
|
|
30
|
+
fastapi_rtk/auth/hashers/utils.py,sha256=_fMQfTgzw8E2pvrWQDUTrpf2mE7Z3PS0PvUUwresWXY,4280
|
|
31
|
+
fastapi_rtk/auth/password_helpers/__init__.py,sha256=sT4-Xe0B4kh593NPNmCYr6Sz2XZnhE9bK1tx9mgFUw4,68
|
|
32
|
+
fastapi_rtk/auth/password_helpers/fab.py,sha256=MjUlS-XpUmQUUI4EJ4uE7irRcBaUVSH-q4-Mb9dna1k,937
|
|
33
|
+
fastapi_rtk/auth/strategies/__init__.py,sha256=MQuIeNRzUXKo8-ZjZUQTzAxOj-krU9reIUu5EpEMkAI,87
|
|
34
|
+
fastapi_rtk/auth/strategies/config.py,sha256=iLjo9n7d5U0Ojb6yp6fIQHeaEwzNf4I-8Nk9JeVQSjI,629
|
|
35
|
+
fastapi_rtk/auth/strategies/db.py,sha256=DUkQydXU0gphEA_igc_-nrdofqdSFETx85hA7GycU-U,3769
|
|
36
|
+
fastapi_rtk/auth/strategies/jwt.py,sha256=H_L1i668dQIRXjgwe_W5WPHFZUXZOPYr3bEcxxrOUWU,517
|
|
37
|
+
fastapi_rtk/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
fastapi_rtk/backends/generic/__init__.py,sha256=e9jENsNVQEgtad6MRXItbS0qS4wE7rdUvha5H2JdKrM,1236
|
|
39
|
+
fastapi_rtk/backends/generic/column.py,sha256=CFwXkhefNC1--_JBeM1YiYW2p537P_2dj6y4uab3EYI,7073
|
|
40
|
+
fastapi_rtk/backends/generic/db.py,sha256=KffV_52P3Rj-wtiejO3vJxDySu2EGxc2zcmENVv0nCw,3890
|
|
41
|
+
fastapi_rtk/backends/generic/exceptions.py,sha256=hZrKGke2INslT2ffc4ep0IJMT-BCKiYnQZJxWIZgIfU,2047
|
|
42
|
+
fastapi_rtk/backends/generic/filters.py,sha256=2J4Ez0rI1hjIyLbd1TVGD9GfJMs8-A0Ql5cH680f2FI,9481
|
|
43
|
+
fastapi_rtk/backends/generic/interface.py,sha256=F_vOZo6incszpOWXjQAV9KVzikj1QIlV5G0HZ_ovmxE,10344
|
|
44
|
+
fastapi_rtk/backends/generic/model.py,sha256=olRvHD57CCKnZoyia7EcvecZfXjN-ku17gxNDU1NyfE,5355
|
|
45
|
+
fastapi_rtk/backends/generic/session.py,sha256=J8OJSuGcFkZiOg7SJIbkKnMUlo_njQjRJ1vNl4k8Ve4,19053
|
|
46
|
+
fastapi_rtk/backends/sqla/__init__.py,sha256=p4TRI65-R6TM6G_-OAnwYV7Hk9WVkKsnhN2sFta1-cU,1795
|
|
47
|
+
fastapi_rtk/backends/sqla/column.py,sha256=KutGcyFr3ZeHFTL8c313I4CNxosGq54neLLB7N53GZs,240
|
|
48
|
+
fastapi_rtk/backends/sqla/db.py,sha256=kVipLr8C1XoeNV65IJpB-XGKde13nb_YDG-h5R8dfAs,18469
|
|
49
|
+
fastapi_rtk/backends/sqla/exceptions.py,sha256=rRtvgXyDwGSbjvJIPJIOjOBYytvNv9VXkZOBy6p2J80,61
|
|
50
|
+
fastapi_rtk/backends/sqla/filters.py,sha256=bqdt3ojlF_elAj7TJxkVq4WgkrNeV0LTR6Ojkc1H5R0,21395
|
|
51
|
+
fastapi_rtk/backends/sqla/interface.py,sha256=mnlCxSvWIuTrVzE8KMjZyI7Tdhk041MUF3F2ZLdhYs8,27824
|
|
52
|
+
fastapi_rtk/backends/sqla/model.py,sha256=N0fxuAHbw_RCfFPRw-cjWQdBEanfogLRXOUEPqZ1Qac,7168
|
|
53
|
+
fastapi_rtk/backends/sqla/session.py,sha256=di52RhRWzUchcquWMU9KKd0F1N5te1GfAtcfCnekiwI,412
|
|
54
|
+
fastapi_rtk/backends/sqla/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
+
fastapi_rtk/backends/sqla/extensions/audit/__init__.py,sha256=CaVc9fV584PVazvGGMOKwX4xC3OvIae9kXBx6xQAj5g,131
|
|
56
|
+
fastapi_rtk/backends/sqla/extensions/audit/audit.py,sha256=YJ45xppNOLzHySJQx_pxe634V1CFcj1pgULuvxDgvgM,40972
|
|
57
|
+
fastapi_rtk/backends/sqla/extensions/audit/types.py,sha256=2RuEvmq8CeVDOY0T_AtS0YyPcAjNEcloifTxzAawFQo,669
|
|
58
|
+
fastapi_rtk/backends/sqla/extensions/geoalchemy2/__init__.py,sha256=d8ODg17-NEPqyjNpDPlLANEIoYTliX2VkDFW2os1EYA,1814
|
|
59
|
+
fastapi_rtk/backends/sqla/extensions/geoalchemy2/filters.py,sha256=L1WgO7UzWuAgsf93iK7mmsL89DMUaRGUCEKX7CM7kz8,3846
|
|
60
|
+
fastapi_rtk/backends/sqla/extensions/geoalchemy2/geometry_converter.py,sha256=sckNoxPE8ApKCLgBZzE_2dokXrM6mIXvMguHZvyJzIM,3891
|
|
61
|
+
fastapi_rtk/bases/__init__.py,sha256=v3tMVuX20UbvjI_mTWpDAePWAA38e3pjlYEiICgY4j8,440
|
|
62
|
+
fastapi_rtk/bases/db.py,sha256=D27BhF89J0OaLHjALDCa85eNf35lBaTz6VV7EDa4wuM,18711
|
|
63
|
+
fastapi_rtk/bases/file_manager.py,sha256=n6yRY0jh60itXZt0R3oaSN-2Q_CTRswX1BghE7GN4Sk,8791
|
|
64
|
+
fastapi_rtk/bases/filter.py,sha256=XmWTcLaIcBj9pKF1PMAKdwSnZNpdT8Df3uLeUIOGUDE,1840
|
|
65
|
+
fastapi_rtk/bases/interface.py,sha256=Cq9Duxa3w-tw342P424h88fc0_X1DoxCdTa3rAN-6jM,45380
|
|
66
|
+
fastapi_rtk/bases/model.py,sha256=nUZf0AVs0Mzqh2u_ALiRNYN1bfOU9PzYLvEFHDQ57Y0,1692
|
|
67
|
+
fastapi_rtk/bases/session.py,sha256=Q92cRW0nI5IYSsBXLkTJjK5ztMSBNRt-olMwxTIeel0,173
|
|
68
|
+
fastapi_rtk/cli/__init__.py,sha256=q0W_4aUfKI_FzoSdadTfFODvDq8L0R4TmBCiNyxlA58,46
|
|
69
|
+
fastapi_rtk/cli/cli.py,sha256=obejTHiXMiNICU_i76BmbRniA1vBmb8YpfvpQfQx_ts,3085
|
|
70
|
+
fastapi_rtk/cli/const.py,sha256=VrHZLKH6bJncOFpUnsWBtBgVzcR1zehI-nbl3Mf7mcA,138
|
|
71
|
+
fastapi_rtk/cli/decorators.py,sha256=nIFp6LufGnOLTW6oDUxMVRQvaCw9frK5mddvLFOyvqo,1118
|
|
72
|
+
fastapi_rtk/cli/types.py,sha256=ezJjljcofwSI4HlDz2JWe0oVY9IA6hVvgx7IEWBkyRQ,1364
|
|
73
|
+
fastapi_rtk/cli/utils.py,sha256=v7sfL1-S3XYSQ40WTD-CYcH77EfJTcKhuD3jaAImYc8,6285
|
|
74
|
+
fastapi_rtk/cli/commands/__init__.py,sha256=iFkU03MOUgHoAmmyF5FmUxA6wD1YN59JqqP4WD5n6Dk,524
|
|
75
|
+
fastapi_rtk/cli/commands/export.py,sha256=4OuFyljUxSvdyZc0bYzzLfnahJvSYN38fxAUPopoH4M,17572
|
|
76
|
+
fastapi_rtk/cli/commands/security.py,sha256=tZOUVSbsgBFXjH7_vfH6GMKH5pKkRuhVl8TTh7V8plA,8880
|
|
77
|
+
fastapi_rtk/cli/commands/translate.py,sha256=v6s0XentYi5wLzPEd7qc6QUjgdn6wt89dvTbWzUPeOY,10508
|
|
78
|
+
fastapi_rtk/cli/commands/db/__init__.py,sha256=2clkGMUpGY0czSUaBql8fFSd8YrSJ0oGlzkpBZejjd0,14128
|
|
79
|
+
fastapi_rtk/cli/commands/db/templates/fastapi/README,sha256=dNsmYPHI9RJkhAIE18JqVmXhdJ21OCeQs8GP5DyA8Yo,47
|
|
80
|
+
fastapi_rtk/cli/commands/db/templates/fastapi/alembic.ini.mako,sha256=hT__Gp2DlDzyP5IDIpuKyDDbvxR0CPHsKxDIzi9xRU0,875
|
|
81
|
+
fastapi_rtk/cli/commands/db/templates/fastapi/env.py,sha256=WyBs_-G8VFtXv8Qy9a_9M0uNQwaJvOdL6WlTpVNLgoA,3590
|
|
82
|
+
fastapi_rtk/cli/commands/db/templates/fastapi/script.py.mako,sha256=wc3YSgMzosyfIbbSTDI9an3NQPeYpIq0CnUFJTMO-k8,660
|
|
83
|
+
fastapi_rtk/cli/commands/db/templates/fastapi-multidb/README,sha256=uZbihZF8nBJxZM6iBNcqTuHySphoc8e9sqT75ZswwxY,46
|
|
84
|
+
fastapi_rtk/cli/commands/db/templates/fastapi-multidb/alembic.ini.mako,sha256=xmPD9dxj6jbt7D1Dd5bjhsoSP1U2EwPw_E7BtuVmVAI,874
|
|
85
|
+
fastapi_rtk/cli/commands/db/templates/fastapi-multidb/env.py,sha256=KXb0a5c_3zutlTgyTP6MofCL0jinixLZMdG5aYd0E_U,7529
|
|
86
|
+
fastapi_rtk/cli/commands/db/templates/fastapi-multidb/script.py.mako,sha256=o02Ul3GmWdWkOiLZiKInBcAuCN3OjgxCzdj5Y1gvgVY,1324
|
|
87
|
+
fastapi_rtk/file_managers/__init__.py,sha256=RZzSSUDq_cIv4MeVePRBGR0mbEiJua7WKccfE6IAawk,198
|
|
88
|
+
fastapi_rtk/file_managers/file_manager.py,sha256=YJzKWtwVOiIYS4-W0CfadYhhWLydNRJ7D_T9vdzcIdU,2612
|
|
89
|
+
fastapi_rtk/file_managers/image_manager.py,sha256=S2mcBuXOzXWlPhmq1in76kRmNKGYrIeEqDMs-c5KXo8,573
|
|
90
|
+
fastapi_rtk/file_managers/s3_file_manager.py,sha256=wjSyAoNrpDa5-SS__hK6Grajm1ZLOQZX9mXptjPd4lY,5538
|
|
91
|
+
fastapi_rtk/file_managers/s3_image_manager.py,sha256=YLPARdmffA_prMPmm5Mzupaz0IakxWgWL7hWaLSznm0,352
|
|
92
|
+
fastapi_rtk/lang/__init__.py,sha256=zJejpbIXx1O-nSuWwrCYgr5f5EtwjYW6kh8jRy_Yo0U,68
|
|
93
|
+
fastapi_rtk/lang/babel.cfg,sha256=ahkzg8wUKyl9G9UqkgAyWEtRlCnaWkjStM5c4FhKuUE,18
|
|
94
|
+
fastapi_rtk/lang/lazy_text.py,sha256=UnCBmauuIQe5_hDoEnItyl3u6Hz5NnXAV-AAU3GpfKU,3888
|
|
95
|
+
fastapi_rtk/lang/messages.pot,sha256=kJFwHKaDgk0On6rION9mxJwbkqukIBcVWHgKJaGlGsg,5650
|
|
96
|
+
fastapi_rtk/lang/babel/__init__.py,sha256=Pa1gbGSJbeMBcEMsPjvvtjl28cVy0VzWYiCSf5RsYzQ,101
|
|
97
|
+
fastapi_rtk/lang/babel/cli.py,sha256=YyjguB--oPEKYP_i3FdEour1gT9AgvkXODgGrpLTWCY,1105
|
|
98
|
+
fastapi_rtk/lang/babel/config.py,sha256=aKXlIRjDo0mg05widqRBA25ZgUXT5ECbxJV23jHaCOI,382
|
|
99
|
+
fastapi_rtk/lang/translations/de/LC_MESSAGES/messages.mo,sha256=HhU9aLPhvtuXhziG4jGlAjHet7HW5xVmgmH3R6PH7Tw,2976
|
|
100
|
+
fastapi_rtk/lang/translations/de/LC_MESSAGES/messages.po,sha256=kj04JGVwjWrRBz132184hSeaDg_xlByvKJjk0ZAITvA,7023
|
|
101
|
+
fastapi_rtk/lang/translations/en/LC_MESSAGES/messages.mo,sha256=Oi0vH4JgE6QmBcbhcgiU8t4yUTWbRX1jrvncp3fGmnQ,2782
|
|
102
|
+
fastapi_rtk/lang/translations/en/LC_MESSAGES/messages.po,sha256=GcgnXbNEQyhPM_E1urhOyhsZJxfSl2JMjMC7rBbMzas,6781
|
|
103
|
+
fastapi_rtk/security/__init__.py,sha256=XkYZ_GO2opdyQS_LJwbCH1C6SUkNfLUvLkpFhcO7ZlI,86
|
|
104
|
+
fastapi_rtk/security/sqla/__init__.py,sha256=qKh1mGQezDtMzvRzxzfHZRyKVaks-O7PXrOx16ekSZA,88
|
|
105
|
+
fastapi_rtk/security/sqla/apis.py,sha256=8Qtd1G73i2TaA9Euo63naaB8d_I9r4EHL8DWtWNJEfs,10699
|
|
106
|
+
fastapi_rtk/security/sqla/models.py,sha256=rEXpbljTMlTkiDp0VIxRXant8xN-WTjpqgQkr-ElXeM,7865
|
|
107
|
+
fastapi_rtk/security/sqla/security_manager.py,sha256=ui0g2cH8Z-YjDuqszcstyj6Li8U4IpuVV4bAVaD69Lc,31395
|
|
108
|
+
fastapi_rtk/utils/__init__.py,sha256=0X4BwrVDl4S3mB7DLyHaZVednefMjRIjBIDT3yv_CHM,1875
|
|
109
|
+
fastapi_rtk/utils/async_task_runner.py,sha256=HzykQSdeAmNjZfVB5vUDVwrSCVFr8__67ACQk60pSsk,15545
|
|
110
|
+
fastapi_rtk/utils/class_factory.py,sha256=jlVw8yCh-tYsMnR5Hm8fgxtL0kvXwnhe6DPJA1sUh7k,598
|
|
111
|
+
fastapi_rtk/utils/csv_json_converter.py,sha256=7szrPiB7DrK5S-s2GaHVCmEP9_OXk9RFwbZmRtAKM5A,14036
|
|
112
|
+
fastapi_rtk/utils/deep_merge.py,sha256=PHtKJgXfCngOBGVliX9aVlEFcwCxr-GlzU-w6vjgAIs,2426
|
|
113
|
+
fastapi_rtk/utils/extender_mixin.py,sha256=eu22VAZJIf-r_uD-zVn_2IzvknfuUkmEHn9oo-0KU0k,1388
|
|
114
|
+
fastapi_rtk/utils/flask_appbuilder_utils.py,sha256=nPLQIczDZgKElMtqBRSo_aPJZMOnPs7fRyjqKUtPDbo,2276
|
|
115
|
+
fastapi_rtk/utils/hooks.py,sha256=iGE8HTfDDVfQm7yeD3WqPB8_I1FXFGpBdl3ngyjaRbY,901
|
|
116
|
+
fastapi_rtk/utils/lazy.py,sha256=SlVYQ-RHRcp6pGmcslVNc5lKs5GOSjqLcRsQsSWIB0s,10352
|
|
117
|
+
fastapi_rtk/utils/merge_schema.py,sha256=AStYAS_t2idD63_YQri8sBcRM1jaq0kapjYUpI27syg,1398
|
|
118
|
+
fastapi_rtk/utils/multiple_async_contexts.py,sha256=-juAliUeG4XI1J-p31KknsJvzvM5vX0gXVXst_xZUIo,557
|
|
119
|
+
fastapi_rtk/utils/prettify_dict.py,sha256=VKve-52fE9usIzflD3mNtvql_p5F2jq9HYBTJF_1MX0,662
|
|
120
|
+
fastapi_rtk/utils/pydantic.py,sha256=c4TGu6fP5qmsMJcEerhgq3R1iTpJn_1oA91d43GaVlo,2408
|
|
121
|
+
fastapi_rtk/utils/run_utils.py,sha256=2aieVAGp4e7vByzkwnmXk5c-crLl-Ia1rwdHl6LRQ34,6237
|
|
122
|
+
fastapi_rtk/utils/self_dependencies.py,sha256=SjX8BOC3UvuLxfElo1MMgugCX8ZEgsCgLy0g011a4UU,4102
|
|
123
|
+
fastapi_rtk/utils/smartdefaultdict.py,sha256=UdA_N1eQ3TooE9_ci0O_5QKUjGkQfo-c2BwEX5OkXfY,645
|
|
124
|
+
fastapi_rtk/utils/sqla.py,sha256=To4PhsO5orPJVqjdLh5C9y_xPgiy8-zhrJdSqhR_tsc,690
|
|
125
|
+
fastapi_rtk/utils/timezone.py,sha256=62S0pPWuDFFXxV1YTFCsc4uKiSP_Ba36Fv7S3gYjfhs,570
|
|
126
|
+
fastapi_rtk/utils/update_signature.py,sha256=PIzZgNpGEwvDNgQ3G51Zi-QhVV3mbxvUvSwDwf_-yYs,2209
|
|
127
|
+
fastapi_rtk/utils/use_default_when_none.py,sha256=H2HqhKy_8eYk3i1xijEjuaKak0oWkMIkrdz6T7DK9QU,469
|
|
128
|
+
fastapi_rtk/utils/werkzeug.py,sha256=1Gv-oyqSmhVGrmNbB9fDqpqJzPpANOzWf4zMMrhW9UA,3245
|
|
129
|
+
fastapi_rtk-1.0.13.dist-info/METADATA,sha256=W35XgqcgifVCWEy3W3dWWZc27yu4Qr6-R7KlSCuuRK4,1302
|
|
130
|
+
fastapi_rtk-1.0.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
131
|
+
fastapi_rtk-1.0.13.dist-info/entry_points.txt,sha256=UuTkxSVIokSlVN28TMhoxzRRUaPxlVRSH3Gsx6yip60,53
|
|
132
|
+
fastapi_rtk-1.0.13.dist-info/licenses/LICENSE,sha256=NDrWi4Qwcxal3u1r2lBWGA6TVh3OeW7yMan098mQz98,1073
|
|
133
|
+
fastapi_rtk-1.0.13.dist-info/RECORD,,
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
__all__ = [
|
|
2
|
-
# .column
|
|
3
|
-
"GremlinColumn",
|
|
4
|
-
"GremlinRelationship",
|
|
5
|
-
# .db
|
|
6
|
-
"GremlinQueryBuilder",
|
|
7
|
-
"graph_db",
|
|
8
|
-
# .exceptions
|
|
9
|
-
"GremlinMissingLabelException",
|
|
10
|
-
"LKMultipleException",
|
|
11
|
-
# .filters
|
|
12
|
-
"GremlinBaseFilter",
|
|
13
|
-
"GremlinBaseFilterRelationOneToOneOrManyToOne",
|
|
14
|
-
"GremlinBaseFilterRelationOneToManyOrManyToMany",
|
|
15
|
-
"GremlinFilterTextContains",
|
|
16
|
-
"GremlinFilterEqual",
|
|
17
|
-
"GremlinFilterNotEqual",
|
|
18
|
-
"GremlinFilterStartsWith",
|
|
19
|
-
"GremlinFilterNotStartsWith",
|
|
20
|
-
"GremlinFilterEndsWith",
|
|
21
|
-
"GremlinFilterNotEndsWith",
|
|
22
|
-
"GremlinFilterContains",
|
|
23
|
-
"GremlinFilterNotContains",
|
|
24
|
-
"GremlinFilterGreater",
|
|
25
|
-
"GremlinFilterSmaller",
|
|
26
|
-
"GremlinFilterGreaterEqual",
|
|
27
|
-
"GremlinFilterSmallerEqual",
|
|
28
|
-
"GremlinFilterIn",
|
|
29
|
-
"GremlinFilterBetween",
|
|
30
|
-
"GremlinFilterRelationOneToOneOrManyToOneEqual",
|
|
31
|
-
"GremlinFilterRelationOneToManyOrManyToManyIn",
|
|
32
|
-
"GremlinFilterConverter",
|
|
33
|
-
# .interface
|
|
34
|
-
"GremlinInterface",
|
|
35
|
-
# .model
|
|
36
|
-
"GremlinModel",
|
|
37
|
-
# .session
|
|
38
|
-
"get_graph_traversal_factory",
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
try:
|
|
42
|
-
import gremlin_python
|
|
43
|
-
|
|
44
|
-
from .column import *
|
|
45
|
-
from .db import *
|
|
46
|
-
from .exceptions import *
|
|
47
|
-
from .filters import *
|
|
48
|
-
from .interface import *
|
|
49
|
-
from .model import *
|
|
50
|
-
from .session import *
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
except ImportError:
|
|
54
|
-
|
|
55
|
-
class _GremlinImportError:
|
|
56
|
-
def __init__(self, name):
|
|
57
|
-
self._name = name
|
|
58
|
-
|
|
59
|
-
def __getattr__(self, attr):
|
|
60
|
-
raise ImportError(
|
|
61
|
-
f"gremlin_python is not installed, but you tried to access '{self._name}.{attr}'. "
|
|
62
|
-
"Please install gremlin_python to use Gremlin features."
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
def __call__(self, *args, **kwargs):
|
|
66
|
-
raise ImportError(
|
|
67
|
-
f"gremlin_python is not installed, but you tried to instantiate '{self._name}'. "
|
|
68
|
-
"Please install gremlin_python to use Gremlin features."
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
GremlinColumn = _GremlinImportError("GremlinColumn")
|
|
72
|
-
GremlinRelationship = _GremlinImportError("GremlinRelationship")
|
|
73
|
-
GremlinQueryBuilder = _GremlinImportError("GremlinQueryBuilder")
|
|
74
|
-
graph_db = _GremlinImportError("graph_db")
|
|
75
|
-
GremlinMissingLabelException = _GremlinImportError("GremlinMissingLabelException")
|
|
76
|
-
LKMultipleException = _GremlinImportError("LKMultipleException")
|
|
77
|
-
GremlinBaseFilter = _GremlinImportError("GremlinBaseFilter")
|
|
78
|
-
GremlinBaseFilterRelationOneToOneOrManyToOne = _GremlinImportError(
|
|
79
|
-
"GremlinBaseFilterRelationOneToOneOrManyToOne"
|
|
80
|
-
)
|
|
81
|
-
GremlinBaseFilterRelationOneToManyOrManyToMany = _GremlinImportError(
|
|
82
|
-
"GremlinBaseFilterRelationOneToManyOrManyToMany"
|
|
83
|
-
)
|
|
84
|
-
GremlinFilterTextContains = _GremlinImportError("GremlinFilterTextContains")
|
|
85
|
-
GremlinFilterEqual = _GremlinImportError("GremlinFilterEqual")
|
|
86
|
-
GremlinFilterNotEqual = _GremlinImportError("GremlinFilterNotEqual")
|
|
87
|
-
GremlinFilterStartsWith = _GremlinImportError("GremlinFilterStartsWith")
|
|
88
|
-
GremlinFilterNotStartsWith = _GremlinImportError("GremlinFilterNotStartsWith")
|
|
89
|
-
GremlinFilterEndsWith = _GremlinImportError("GremlinFilterEndsWith")
|
|
90
|
-
GremlinFilterNotEndsWith = _GremlinImportError("GremlinFilterNotEndsWith")
|
|
91
|
-
GremlinFilterContains = _GremlinImportError("GremlinFilterContains")
|
|
92
|
-
GremlinFilterNotContains = _GremlinImportError("GremlinFilterNotContains")
|
|
93
|
-
GremlinFilterGreater = _GremlinImportError("GremlinFilterGreater")
|
|
94
|
-
GremlinFilterSmaller = _GremlinImportError("GremlinFilterSmaller")
|
|
95
|
-
GremlinFilterGreaterEqual = _GremlinImportError("GremlinFilterGreaterEqual")
|
|
96
|
-
GremlinFilterSmallerEqual = _GremlinImportError("GremlinFilterSmallerEqual")
|
|
97
|
-
GremlinFilterIn = _GremlinImportError("GremlinFilterIn")
|
|
98
|
-
GremlinFilterBetween = _GremlinImportError("GremlinFilterBetween")
|
|
99
|
-
GremlinFilterRelationOneToOneOrManyToOneEqual = _GremlinImportError(
|
|
100
|
-
"GremlinFilterRelationOneToOneOrManyToOneEqual"
|
|
101
|
-
)
|
|
102
|
-
GremlinFilterRelationOneToManyOrManyToManyIn = _GremlinImportError(
|
|
103
|
-
"GremlinFilterRelationOneToManyOrManyToManyIn"
|
|
104
|
-
)
|
|
105
|
-
GremlinFilterConverter = _GremlinImportError("GremlinFilterConverter")
|
|
106
|
-
GremlinInterface = _GremlinImportError("GremlinInterface")
|
|
107
|
-
GremlinModel = _GremlinImportError("GremlinModel")
|
|
108
|
-
get_graph_traversal_factory = _GremlinImportError("get_graph_traversal_factory")
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import typing
|
|
2
|
-
|
|
3
|
-
import gremlin_python.process.graph_traversal
|
|
4
|
-
import pydantic
|
|
5
|
-
|
|
6
|
-
from ...utils import T, use_default_when_none
|
|
7
|
-
from ..generic.column import UNSET, GenericColumn, _Unset
|
|
8
|
-
|
|
9
|
-
if typing.TYPE_CHECKING:
|
|
10
|
-
from .model import GremlinModel
|
|
11
|
-
|
|
12
|
-
__all__ = ["GremlinColumn", "GremlinRelationship"]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class OnBeforeCreateParams(typing.TypedDict):
|
|
16
|
-
session: gremlin_python.process.graph_traversal.GraphTraversalSource
|
|
17
|
-
source: str
|
|
18
|
-
target: str
|
|
19
|
-
edge_name: str
|
|
20
|
-
properties: dict[str, typing.Any] | None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class GremlinColumn(GenericColumn[T]):
|
|
24
|
-
label_key = False
|
|
25
|
-
|
|
26
|
-
def __init__(
|
|
27
|
-
self,
|
|
28
|
-
col_type: typing.Type[T],
|
|
29
|
-
*,
|
|
30
|
-
primary_key: bool = False,
|
|
31
|
-
auto_increment: bool = False,
|
|
32
|
-
unique: bool = False,
|
|
33
|
-
nullable: bool = True,
|
|
34
|
-
label_key: bool = False,
|
|
35
|
-
default: T
|
|
36
|
-
| typing.Callable[[], T]
|
|
37
|
-
| typing.Callable[["GremlinModel"], T]
|
|
38
|
-
| _Unset = UNSET,
|
|
39
|
-
):
|
|
40
|
-
"""
|
|
41
|
-
Initializes a GenericColumn instance.
|
|
42
|
-
|
|
43
|
-
Args:
|
|
44
|
-
col_type (typing.Type[T]): The type of the column.
|
|
45
|
-
primary_key (bool, optional): Whether the column is a primary key. Defaults to False.
|
|
46
|
-
auto_increment (bool, optional): Whether the column is auto incremented. Only works if the column is a primary key. Defaults to False.
|
|
47
|
-
unique (bool, optional): Whether the column is unique. Defaults to False.
|
|
48
|
-
nullable (bool, optional): Whether the column is nullable. Defaults to True.
|
|
49
|
-
label_key (bool, optional): Whether the column is a label key. If True, the column will be used as the label key in the Gremlin graph. Defaults to False.
|
|
50
|
-
default (T | typing.Callable[[], T] | typing.Callable[["GenericModel"], T] | _NoDefaultValue, optional): The default value of the column. Will be used if the column is not set by the user. Defaults to UNSET (no default value).
|
|
51
|
-
|
|
52
|
-
Raises:
|
|
53
|
-
GenericColumnException: If auto increment is set on a non-primary key column or if the column type is not int when auto increment is set.
|
|
54
|
-
GenericColumnException: If auto increment is set on a non-integer column type.
|
|
55
|
-
"""
|
|
56
|
-
self.label_key = label_key
|
|
57
|
-
super().__init__(
|
|
58
|
-
col_type,
|
|
59
|
-
primary_key=primary_key,
|
|
60
|
-
auto_increment=auto_increment,
|
|
61
|
-
unique=unique,
|
|
62
|
-
nullable=nullable,
|
|
63
|
-
default=default,
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class GremlinRelationship(GremlinColumn[T]):
|
|
68
|
-
"""
|
|
69
|
-
A column that represents a relation in Gremlin.
|
|
70
|
-
"""
|
|
71
|
-
|
|
72
|
-
name: str | None = None
|
|
73
|
-
properties: dict[str, typing.Any] | None = None
|
|
74
|
-
direction: typing.Literal["in", "out", "both"] = "out"
|
|
75
|
-
uselist = False
|
|
76
|
-
with_edge = False
|
|
77
|
-
obj: typing.Type["GremlinModel"] | str | None = None
|
|
78
|
-
obj_properties: dict[str, typing.Any] | None = None
|
|
79
|
-
on_before_create: (
|
|
80
|
-
typing.Callable[
|
|
81
|
-
["GremlinModel", "GremlinModel", OnBeforeCreateParams],
|
|
82
|
-
None | dict[str, typing.Any],
|
|
83
|
-
]
|
|
84
|
-
| None
|
|
85
|
-
) = None
|
|
86
|
-
|
|
87
|
-
def __init__(
|
|
88
|
-
self,
|
|
89
|
-
col_type: typing.Type[T],
|
|
90
|
-
*,
|
|
91
|
-
name: str | None = None,
|
|
92
|
-
properties: dict[str, typing.Any] | None = None,
|
|
93
|
-
direction: typing.Literal["in", "out", "both"] = "out",
|
|
94
|
-
uselist=False,
|
|
95
|
-
with_edge=False,
|
|
96
|
-
obj: typing.Type["GremlinModel"] | str | None = None,
|
|
97
|
-
obj_properties: dict[str, typing.Any] | None = None,
|
|
98
|
-
nullable: bool = True,
|
|
99
|
-
default: T
|
|
100
|
-
| typing.Callable[[], T]
|
|
101
|
-
| typing.Callable[["GremlinModel"], T]
|
|
102
|
-
| _Unset = UNSET,
|
|
103
|
-
on_before_create: typing.Callable[
|
|
104
|
-
["GremlinModel", "GremlinModel", OnBeforeCreateParams],
|
|
105
|
-
None
|
|
106
|
-
| dict[str, typing.Any]
|
|
107
|
-
| typing.Coroutine[None, None, dict[str, typing.Any] | None],
|
|
108
|
-
]
|
|
109
|
-
| None = None,
|
|
110
|
-
):
|
|
111
|
-
"""
|
|
112
|
-
Initializes a GenericColumn instance.
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
col_type (typing.Type[T]): The type of the column.
|
|
116
|
-
name (str | None, optional): The edge name of the relation. Defaults to None.
|
|
117
|
-
properties (dict[str, typing.Any] | None, optional): Additional properties to filter the edge of the relation. Defaults to None.
|
|
118
|
-
direction (typing.Literal["in", "out", "both"], optional): The direction of the relation. Use "in" for incoming relations and "out" for outgoing relations or "both" for both directions. Defaults to "out".
|
|
119
|
-
uselist (bool, optional): Whether the relation is a list. Defaults to False.
|
|
120
|
-
with_edge (bool, optional): Whether to return the edge properties along with the related vertex. If True, the column will return a dictionary with two keys: "edge" and the property name. When `obj` is set, the related object needs to have an `edge` property to hold the edge properties. Defaults to False.
|
|
121
|
-
obj (typing.Type["GremlinModel"] | str | None, optional): The model class that this relation points to. To handle relation to itself, use `typing.Self`. To use a simple dictionary, gives nothing. Defaults to None.
|
|
122
|
-
obj_properties (dict[str, typing.Any] | None, optional): Additional properties to filter the related vertex of the relation. Defaults to None.
|
|
123
|
-
nullable (bool, optional): Whether the column is nullable. Defaults to True.
|
|
124
|
-
default (T | typing.Callable[[], T] | typing.Callable[["GenericModel"], T] | _NoDefaultValue, optional): The default value of the column. Will be used if the column is not set by the user. Defaults to UNSET (no default value).
|
|
125
|
-
on_before_create (typing.Callable[["GremlinModel", "GremlinModel", OnBeforeCreateParams], None | dict[str, typing.Any]] | typing.Coroutine[None, None, dict[str, typing.Any] | None], optional): A callback function to be called before creating the relation. It receives the source model, target model, and a dictionary with parameters for creating the edge. The function can return a dictionary with additional properties to set on the edge or None. Defaults to None.
|
|
126
|
-
|
|
127
|
-
Raises:
|
|
128
|
-
GenericColumnException: If auto increment is set on a non-primary key column or if the column type is not int when auto increment is set.
|
|
129
|
-
GenericColumnException: If auto increment is set on a non-integer column type.
|
|
130
|
-
"""
|
|
131
|
-
self.name = name
|
|
132
|
-
self.properties = properties
|
|
133
|
-
self.direction = direction
|
|
134
|
-
self.uselist = uselist
|
|
135
|
-
self.with_edge = with_edge
|
|
136
|
-
self.obj = obj
|
|
137
|
-
self.obj_properties = obj_properties
|
|
138
|
-
self.on_before_create = on_before_create
|
|
139
|
-
if uselist:
|
|
140
|
-
if col_type is not list:
|
|
141
|
-
raise TypeError(
|
|
142
|
-
"The col_type of a GremlinRelationship with uselist=True must be `list`."
|
|
143
|
-
)
|
|
144
|
-
else:
|
|
145
|
-
if col_type is not typing.Any:
|
|
146
|
-
raise TypeError(
|
|
147
|
-
"The col_type of a GremlinRelationship with uselist=False must be `typing.Any`."
|
|
148
|
-
)
|
|
149
|
-
super().__init__(
|
|
150
|
-
col_type,
|
|
151
|
-
primary_key=False,
|
|
152
|
-
auto_increment=False,
|
|
153
|
-
unique=False,
|
|
154
|
-
nullable=nullable,
|
|
155
|
-
label_key=False,
|
|
156
|
-
default=default,
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
def __set_name__(self, owner, name):
|
|
160
|
-
from .model import GremlinModel
|
|
161
|
-
|
|
162
|
-
if self.obj is typing.Self:
|
|
163
|
-
self.obj = owner
|
|
164
|
-
if self.uselist:
|
|
165
|
-
if issubclass(self.obj, GremlinModel):
|
|
166
|
-
self.col_type = (
|
|
167
|
-
self.col_type
|
|
168
|
-
| typing.Annotated[
|
|
169
|
-
list[self.obj],
|
|
170
|
-
pydantic.AfterValidator(
|
|
171
|
-
lambda values: [v.to_json() for v in values]
|
|
172
|
-
if values
|
|
173
|
-
else values
|
|
174
|
-
),
|
|
175
|
-
]
|
|
176
|
-
)
|
|
177
|
-
else:
|
|
178
|
-
self.col_type = self.col_type | list[self.obj]
|
|
179
|
-
else:
|
|
180
|
-
if issubclass(self.obj, GremlinModel):
|
|
181
|
-
self.col_type = (
|
|
182
|
-
self.col_type
|
|
183
|
-
| typing.Annotated[
|
|
184
|
-
self.obj,
|
|
185
|
-
pydantic.AfterValidator(lambda v: v.to_json()),
|
|
186
|
-
]
|
|
187
|
-
)
|
|
188
|
-
else:
|
|
189
|
-
self.col_type = self.col_type | self.obj
|
|
190
|
-
elif isinstance(self.obj, type) and issubclass(self.obj, GremlinModel):
|
|
191
|
-
self.obj_properties = use_default_when_none(
|
|
192
|
-
self.obj_properties, self.obj.__properties__
|
|
193
|
-
)
|
|
194
|
-
elif isinstance(self.obj, str):
|
|
195
|
-
GremlinModel._register_model_callback(
|
|
196
|
-
self.obj,
|
|
197
|
-
lambda model: setattr(self, "obj", model),
|
|
198
|
-
)
|
|
199
|
-
GremlinModel._register_model_callback(
|
|
200
|
-
self.obj,
|
|
201
|
-
lambda model: setattr(
|
|
202
|
-
self,
|
|
203
|
-
"obj_properties",
|
|
204
|
-
use_default_when_none(self.obj_properties, model.__properties__),
|
|
205
|
-
),
|
|
206
|
-
)
|
|
207
|
-
|
|
208
|
-
return super().__set_name__(owner, name)
|