dmart 1.4.17__py3-none-any.whl → 1.4.33__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.
Files changed (55) hide show
  1. {dmart_migrations → alembic}/env.py +3 -12
  2. bundler.py +0 -3
  3. {dmart-1.4.17.dist-info → dmart-1.4.33.dist-info}/METADATA +2 -4
  4. {dmart-1.4.17.dist-info → dmart-1.4.33.dist-info}/RECORD +30 -55
  5. {dmart-1.4.17.dist-info → dmart-1.4.33.dist-info}/top_level.txt +1 -1
  6. dmart.py +32 -72
  7. alembic.ini +0 -117
  8. dmart_migrations/README +0 -1
  9. dmart_migrations/__pycache__/__init__.cpython-314.pyc +0 -0
  10. dmart_migrations/__pycache__/env.cpython-314.pyc +0 -0
  11. dmart_migrations/notes.txt +0 -11
  12. dmart_migrations/script.py.mako +0 -28
  13. dmart_migrations/versions/__init__.py +0 -0
  14. dmart_migrations/versions/__pycache__/0f3d2b1a7c21_add_authz_materialized_views.cpython-314.pyc +0 -0
  15. dmart_migrations/versions/__pycache__/10d2041b94d4_last_checksum_history.cpython-314.pyc +0 -0
  16. dmart_migrations/versions/__pycache__/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.cpython-314.pyc +0 -0
  17. dmart_migrations/versions/__pycache__/26bfe19b49d4_rm_failedloginattempts.cpython-314.pyc +0 -0
  18. dmart_migrations/versions/__pycache__/3c8bca2219cc_add_otp_table.cpython-314.pyc +0 -0
  19. dmart_migrations/versions/__pycache__/6675fd9dfe42_remove_unique_from_sessions_table.cpython-314.pyc +0 -0
  20. dmart_migrations/versions/__pycache__/71bc1df82e6a_adding_user_last_login_at.cpython-314.pyc +0 -0
  21. dmart_migrations/versions/__pycache__/74288ccbd3b5_initial.cpython-314.pyc +0 -0
  22. dmart_migrations/versions/__pycache__/7520a89a8467_rm_activesession_table.cpython-314.pyc +0 -0
  23. dmart_migrations/versions/__pycache__/848b623755a4_make_created_nd_updated_at_required.cpython-314.pyc +0 -0
  24. dmart_migrations/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-314.pyc +0 -0
  25. dmart_migrations/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc +0 -0
  26. dmart_migrations/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc +0 -0
  27. dmart_migrations/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc +0 -0
  28. dmart_migrations/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc +0 -0
  29. dmart_migrations/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc +0 -0
  30. dmart_migrations/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc +0 -0
  31. info.json +0 -1
  32. {cxb/client → alembic}/__init__.py +0 -0
  33. {dmart_migrations → alembic/scripts}/__init__.py +0 -0
  34. {dmart_migrations → alembic}/scripts/calculate_checksums.py +0 -0
  35. {dmart_migrations → alembic}/scripts/migration_f7a4949eed19.py +0 -0
  36. {dmart_migrations → alembic}/versions/0f3d2b1a7c21_add_authz_materialized_views.py +0 -0
  37. {dmart_migrations → alembic}/versions/10d2041b94d4_last_checksum_history.py +0 -0
  38. {dmart_migrations → alembic}/versions/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.py +0 -0
  39. {dmart_migrations → alembic}/versions/26bfe19b49d4_rm_failedloginattempts.py +0 -0
  40. {dmart_migrations → alembic}/versions/3c8bca2219cc_add_otp_table.py +0 -0
  41. {dmart_migrations → alembic}/versions/6675fd9dfe42_remove_unique_from_sessions_table.py +0 -0
  42. {dmart_migrations → alembic}/versions/71bc1df82e6a_adding_user_last_login_at.py +0 -0
  43. {dmart_migrations → alembic}/versions/74288ccbd3b5_initial.py +0 -0
  44. {dmart_migrations → alembic}/versions/7520a89a8467_rm_activesession_table.py +0 -0
  45. {dmart_migrations → alembic}/versions/848b623755a4_make_created_nd_updated_at_required.py +0 -0
  46. {dmart_migrations → alembic}/versions/8640dcbebf85_add_notes_to_users.py +0 -0
  47. {dmart_migrations → alembic}/versions/91c94250232a_adding_fk_on_owner_shortname.py +0 -0
  48. {dmart_migrations → alembic}/versions/98ecd6f56f9a_ext_meta_with_owner_group_shortname.py +0 -0
  49. {dmart_migrations → alembic}/versions/9aae9138c4ef_indexing_created_at_updated_at.py +0 -0
  50. {dmart_migrations/scripts → alembic/versions}/__init__.py +0 -0
  51. {dmart_migrations → alembic}/versions/b53f916b3f6d_json_to_jsonb.py +0 -0
  52. {dmart_migrations → alembic}/versions/eb5f1ec65156_adding_user_locked_to_device.py +0 -0
  53. {dmart_migrations → alembic}/versions/f7a4949eed19_adding_query_policies_to_meta.py +0 -0
  54. {dmart-1.4.17.dist-info → dmart-1.4.33.dist-info}/WHEEL +0 -0
  55. {dmart-1.4.17.dist-info → dmart-1.4.33.dist-info}/entry_points.txt +0 -0
@@ -1,9 +1,3 @@
1
- import sys
2
- import os
3
- # Add the parent directory (backend) to sys.path to allow importing modules from it
4
- # This is done here to avoid adding it to PYTHONPATH globally which causes shadowing of 'alembic' library
5
- sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6
-
7
1
  from logging.config import fileConfig
8
2
 
9
3
  from sqlalchemy import engine_from_config
@@ -25,12 +19,9 @@ config = context.config
25
19
  if config.config_file_name is not None:
26
20
  fileConfig(config.config_file_name)
27
21
 
28
- if "sqlite" in settings.database_driver:
29
- connection_string = f"sqlite:///{settings.database_name}"
30
- else:
31
- driver = settings.database_driver.replace('+asyncpg', '+psycopg')
32
- database_connection_string = f"{driver}://{settings.database_username}:{settings.database_password}@{settings.database_host}:{settings.database_port}"
33
- connection_string = f"{database_connection_string}/{settings.database_name}"
22
+ driver = settings.database_driver.replace('+asyncpg', '+psycopg')
23
+ database_connection_string = f"{driver}://{settings.database_username}:{settings.database_password}@{settings.database_host}:{settings.database_port}"
24
+ connection_string = f"{database_connection_string}/{settings.database_name}"
34
25
  config.set_main_option('sqlalchemy.url', connection_string)
35
26
 
36
27
  # add your model's MetaData object here
bundler.py CHANGED
@@ -36,12 +36,9 @@ args = [
36
36
  '--runtime-tmpdir=.',
37
37
  '--distpath=.',
38
38
  '--add-data=./info.json:.',
39
- '--add-data=dmart_migrations:dmart_migrations',
40
- '--add-data=alembic.ini:.',
41
39
  '--noconfirm',
42
40
  '--collect-submodules=concurrent_log_handler',
43
41
  '--collect-submodules=pythonjsonlogger',
44
- '--collect-all=alembic',
45
42
  '--clean',
46
43
  ]
47
44
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dmart
3
- Version: 1.4.17
3
+ Version: 1.4.33
4
4
  Requires-Python: >=3.11
5
5
  Requires-Dist: fastapi
6
6
  Requires-Dist: pydantic
@@ -18,9 +18,9 @@ Requires-Dist: asgi-correlation-id
18
18
  Requires-Dist: pydantic-settings
19
19
  Requires-Dist: fastapi-sso
20
20
  Requires-Dist: sqlmodel
21
- Requires-Dist: alembic
22
21
  Requires-Dist: psycopg[binary]
23
22
  Requires-Dist: greenlet
23
+ Requires-Dist: alembic
24
24
  Requires-Dist: jinja2
25
25
  Requires-Dist: pytest-cov
26
26
  Requires-Dist: argon2-cffi
@@ -34,7 +34,6 @@ Requires-Dist: jinja2; extra == "extra"
34
34
  Requires-Dist: duckdb; extra == "extra"
35
35
  Requires-Dist: segno; extra == "extra"
36
36
  Requires-Dist: jq; extra == "extra"
37
- Requires-Dist: alembic; extra == "extra"
38
37
  Provides-Extra: plugins
39
38
  Requires-Dist: weasyprint; extra == "plugins"
40
39
  Requires-Dist: pypdf; extra == "plugins"
@@ -52,7 +51,6 @@ Requires-Dist: jinja2; extra == "all"
52
51
  Requires-Dist: duckdb; extra == "all"
53
52
  Requires-Dist: segno; extra == "all"
54
53
  Requires-Dist: jq; extra == "all"
55
- Requires-Dist: alembic; extra == "all"
56
54
  Requires-Dist: weasyprint; extra == "all"
57
55
  Requires-Dist: pypdf; extra == "all"
58
56
  Requires-Dist: dicttoxml; extra == "all"
@@ -1,9 +1,7 @@
1
- alembic.ini,sha256=zs8d8VhH9TRwZrPK697EZPBCfaKvI4SqTuGuG0FAm2Y,3747
2
- bundler.py,sha256=MDTUTVS0WL7gb-i1rDcS4i37KTqaW88TluL4L3rwjRw,1817
1
+ bundler.py,sha256=so8ZJResb1PcOH5vboa_mpFAdYr_T8u8DbbFXd570Lg,1704
3
2
  data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
4
- dmart.py,sha256=M6ALx41TSjzpcEczkx39aA9qdmWZk_CS2jRpU61-aEY,23288
3
+ dmart.py,sha256=AkhHkJt-q-rhWfXPd4aHdxc-QHm0MfaVGdJAVHjFDWg,21886
5
4
  get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
6
- info.json,sha256=hXQWl19lfMkEj_zXdehGeKjiKGNJ7emY4S7d4pIqJ1E,123
7
5
  main.py,sha256=KZGhIL6AnEm5ZAPy4IvhBDpzSTjuodilV7NafNOyhzM,19676
8
6
  migrate.py,sha256=hn1MZoVby_Jjqhc7y3CrLcGD619QmVZv3PONNvO7VKQ,665
9
7
  password_gen.py,sha256=xjx8wi105ZYvhLBBQj7_rugACpxifGXHse6f7YlGXWQ,196
@@ -14,6 +12,29 @@ schema_modulate.py,sha256=vB7NxvqghqNpFe__p0ll03WsvNftzxBbQ6UXB2UfxNU,6454
14
12
  set_admin_passwd.py,sha256=Ei8wnoJ_UDHIXmMb-E_dd_NqyM6Gt5AgJPJ4fAxARXI,1950
15
13
  sync.py,sha256=FlmubtlnFaxtZkbRV1-eyS_Sx5KBRvWyIZjvd0Tiar4,7339
16
14
  websocket.py,sha256=Q8WUTvOTBHKP5xy5wim8yn0t-BfjrPwx7J_6vbzAm1A,7576
15
+ alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ alembic/env.py,sha256=z12UKhorKSOKEovOCQOwRjfR_tup4VeRlhcB1UPk3Xw,2700
17
+ alembic/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ alembic/scripts/calculate_checksums.py,sha256=v2NLEvReA9V3noJE-BWANgKDdhc8Mqg1ZmJJ8nc8sGI,3443
19
+ alembic/scripts/migration_f7a4949eed19.py,sha256=oUXuxjU4MbVafm4S-xu5J_4apHqW6hQZ8ftpJtCtM28,1462
20
+ alembic/versions/0f3d2b1a7c21_add_authz_materialized_views.py,sha256=70vrPfhMHVHhw1l7KNQpvCUU76XZfvGcPlrXOeU4FHU,2599
21
+ alembic/versions/10d2041b94d4_last_checksum_history.py,sha256=FYjyzE5Xi6bn9LUtxLKFnQOKhg4GZOrTkpqtmlCnY6Y,2860
22
+ alembic/versions/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.py,sha256=taaFTkTaFfLfj7QUUfIdcojvbOdjut_dWtrIvQUN7-4,921
23
+ alembic/versions/26bfe19b49d4_rm_failedloginattempts.py,sha256=-Roftn8OSUz7kfR3yMI02rulyvnH46W0WpJfDQ5xAdk,1471
24
+ alembic/versions/3c8bca2219cc_add_otp_table.py,sha256=f-YSxx1iLA0iHWukq1VnngFmiiYQyEzowicox0-wtbY,1125
25
+ alembic/versions/6675fd9dfe42_remove_unique_from_sessions_table.py,sha256=yP40IHwtzFAAUid_VeeCkt_9F2RszMYBjNKx2mDTKNw,1037
26
+ alembic/versions/71bc1df82e6a_adding_user_last_login_at.py,sha256=LINO2hWUEFmsTspupd8AxgUS6tNJFNgGC5do1QPMQ1E,1486
27
+ alembic/versions/74288ccbd3b5_initial.py,sha256=hZ1w5mqVKSO13J1O4zcTccDJBk2c-cmIB0AUx1KLlLI,13988
28
+ alembic/versions/7520a89a8467_rm_activesession_table.py,sha256=4VYv9tCXkTQNaXPVvjdsKTiw093KkBBUHNSiWdZtqtA,1305
29
+ alembic/versions/848b623755a4_make_created_nd_updated_at_required.py,sha256=o106xd-apT8ZAXdVCjX76o7VuqRQNkIl0V4f41m5j2E,5375
30
+ alembic/versions/8640dcbebf85_add_notes_to_users.py,sha256=XjfW2Lc0-xoRGB2qfdzDstw7Caaev6JhqRNYV_sIqgc,813
31
+ alembic/versions/91c94250232a_adding_fk_on_owner_shortname.py,sha256=F9FDF2qyeqvOx1gkYq5HQMkVCH1QrXciYSHVxijsSSU,4024
32
+ alembic/versions/98ecd6f56f9a_ext_meta_with_owner_group_shortname.py,sha256=S466VE3jsxXDEpTKyhIN06uutM0jI7zYHTWIYvU_pJw,2579
33
+ alembic/versions/9aae9138c4ef_indexing_created_at_updated_at.py,sha256=xrqfJB5cER0PYi1torwkgsbBBjDeeM6dyj4pu-quphk,3662
34
+ alembic/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ alembic/versions/b53f916b3f6d_json_to_jsonb.py,sha256=LPnevQjbjs0KrwqxYHtGUC6mSBBsUpiCBnwD-FN2x50,24840
36
+ alembic/versions/eb5f1ec65156_adding_user_locked_to_device.py,sha256=Z9skCus52jg_xV5a7JVYK3IenNlvsdMKIFf1H5POst0,1030
37
+ alembic/versions/f7a4949eed19_adding_query_policies_to_meta.py,sha256=LA4rx3u0Ei5m4OcSsVYHBsGMeKOJdx8G88yK1kBLFys,2307
17
38
  api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
39
  api/info/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
40
  api/info/router.py,sha256=sQZZor7A-uDzsJX39aqEA7bMZOJ-WTitYeFvVNWfaHw,3938
@@ -35,7 +56,6 @@ config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
56
  config/channels.json,sha256=GepystGi0h_1fuakC_gdIc-YYxyy-a4TI619ygIpyyM,156
36
57
  config/notification.json,sha256=esrOaMUIqfcCHB0Tawp3t4cu7DQAA15X12OS-Gyenb0,361
37
58
  cxb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- cxb/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
59
  cxb/client/config.json,sha256=WvhCcnJ9-uQ2raPuRBRSGO3iD7Hcaf8Cy49EXUu3KQw,358
40
60
  cxb/client/config.sample.json,sha256=fTYLbnTiUdbT_F7rcwI7CLSZ_KoX8EflfuyswRGW2x0,355
41
61
  cxb/client/favicon.ico,sha256=CD2FYyYYFNAbH7lGPnM5-2asMmhf-kwitAp99Kh0Wmc,4286
@@ -173,51 +193,6 @@ data_adapters/sql/db_to_json_migration.py,sha256=GTPO6-HblgD60qruhhVpWbKOke5xz9w
173
193
  data_adapters/sql/health_check_sql.py,sha256=2Z0mN5IMrjF72ZAiafBLkHklbXXWJzLp1K2TzjzPI1s,8569
174
194
  data_adapters/sql/json_to_db_migration.py,sha256=KaubDrRZ3MfPLc-CNGPpsEccPELKr1V4GoBEBt1BNZo,21131
175
195
  data_adapters/sql/update_query_policies.py,sha256=LUpkyzDAkiwwVWnXxPdVAU6atehW72ECAazj3mEYHK0,3857
176
- dmart_migrations/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
177
- dmart_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
178
- dmart_migrations/env.py,sha256=P1gnJRIUrP2jLHZ7HDbfkzkpuZJ_LMWqw05HIqOUJHo,3110
179
- dmart_migrations/notes.txt,sha256=X7LYSNmulLRiAUXvw07Z85bSGRTnx4NUpoNC9D2DfO8,395
180
- dmart_migrations/script.py.mako,sha256=u-ABdYW1tcIILgJFJdQZYLxoAI8Awd6wZbx30rY6fxU,680
181
- dmart_migrations/__pycache__/__init__.cpython-314.pyc,sha256=BB6R74YhUmoPWg2dYz2gTIM0CE7sMcOt0dsgqEEPza4,174
182
- dmart_migrations/__pycache__/env.cpython-314.pyc,sha256=27dvi9nRTOIogSJ7ytGX2i1CbTEw4rwPaZV_OGS175g,4278
183
- dmart_migrations/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
- dmart_migrations/scripts/calculate_checksums.py,sha256=v2NLEvReA9V3noJE-BWANgKDdhc8Mqg1ZmJJ8nc8sGI,3443
185
- dmart_migrations/scripts/migration_f7a4949eed19.py,sha256=oUXuxjU4MbVafm4S-xu5J_4apHqW6hQZ8ftpJtCtM28,1462
186
- dmart_migrations/versions/0f3d2b1a7c21_add_authz_materialized_views.py,sha256=70vrPfhMHVHhw1l7KNQpvCUU76XZfvGcPlrXOeU4FHU,2599
187
- dmart_migrations/versions/10d2041b94d4_last_checksum_history.py,sha256=FYjyzE5Xi6bn9LUtxLKFnQOKhg4GZOrTkpqtmlCnY6Y,2860
188
- dmart_migrations/versions/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.py,sha256=taaFTkTaFfLfj7QUUfIdcojvbOdjut_dWtrIvQUN7-4,921
189
- dmart_migrations/versions/26bfe19b49d4_rm_failedloginattempts.py,sha256=-Roftn8OSUz7kfR3yMI02rulyvnH46W0WpJfDQ5xAdk,1471
190
- dmart_migrations/versions/3c8bca2219cc_add_otp_table.py,sha256=f-YSxx1iLA0iHWukq1VnngFmiiYQyEzowicox0-wtbY,1125
191
- dmart_migrations/versions/6675fd9dfe42_remove_unique_from_sessions_table.py,sha256=yP40IHwtzFAAUid_VeeCkt_9F2RszMYBjNKx2mDTKNw,1037
192
- dmart_migrations/versions/71bc1df82e6a_adding_user_last_login_at.py,sha256=LINO2hWUEFmsTspupd8AxgUS6tNJFNgGC5do1QPMQ1E,1486
193
- dmart_migrations/versions/74288ccbd3b5_initial.py,sha256=hZ1w5mqVKSO13J1O4zcTccDJBk2c-cmIB0AUx1KLlLI,13988
194
- dmart_migrations/versions/7520a89a8467_rm_activesession_table.py,sha256=4VYv9tCXkTQNaXPVvjdsKTiw093KkBBUHNSiWdZtqtA,1305
195
- dmart_migrations/versions/848b623755a4_make_created_nd_updated_at_required.py,sha256=o106xd-apT8ZAXdVCjX76o7VuqRQNkIl0V4f41m5j2E,5375
196
- dmart_migrations/versions/8640dcbebf85_add_notes_to_users.py,sha256=XjfW2Lc0-xoRGB2qfdzDstw7Caaev6JhqRNYV_sIqgc,813
197
- dmart_migrations/versions/91c94250232a_adding_fk_on_owner_shortname.py,sha256=F9FDF2qyeqvOx1gkYq5HQMkVCH1QrXciYSHVxijsSSU,4024
198
- dmart_migrations/versions/98ecd6f56f9a_ext_meta_with_owner_group_shortname.py,sha256=S466VE3jsxXDEpTKyhIN06uutM0jI7zYHTWIYvU_pJw,2579
199
- dmart_migrations/versions/9aae9138c4ef_indexing_created_at_updated_at.py,sha256=xrqfJB5cER0PYi1torwkgsbBBjDeeM6dyj4pu-quphk,3662
200
- dmart_migrations/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
201
- dmart_migrations/versions/b53f916b3f6d_json_to_jsonb.py,sha256=LPnevQjbjs0KrwqxYHtGUC6mSBBsUpiCBnwD-FN2x50,24840
202
- dmart_migrations/versions/eb5f1ec65156_adding_user_locked_to_device.py,sha256=Z9skCus52jg_xV5a7JVYK3IenNlvsdMKIFf1H5POst0,1030
203
- dmart_migrations/versions/f7a4949eed19_adding_query_policies_to_meta.py,sha256=LA4rx3u0Ei5m4OcSsVYHBsGMeKOJdx8G88yK1kBLFys,2307
204
- dmart_migrations/versions/__pycache__/0f3d2b1a7c21_add_authz_materialized_views.cpython-314.pyc,sha256=mevU12_Y6RzGxc8Xg1bkFIVaNu7uvx7zCQ2j6bn_Pqo,3955
205
- dmart_migrations/versions/__pycache__/10d2041b94d4_last_checksum_history.cpython-314.pyc,sha256=n3eMeDeLN8WXXzoKA-8b4t9k-WQF4FPVYIRReNm-uN4,6199
206
- dmart_migrations/versions/__pycache__/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.cpython-314.pyc,sha256=_8yowo72FtcMsYQOp2vpy_hWJ5QlDOPsDsEt6NOr9cY,2649
207
- dmart_migrations/versions/__pycache__/26bfe19b49d4_rm_failedloginattempts.cpython-314.pyc,sha256=1PYF87QiiSXEmHUM6wnq9Ck_ktq981W3TgS-_7QqG4M,3309
208
- dmart_migrations/versions/__pycache__/3c8bca2219cc_add_otp_table.cpython-314.pyc,sha256=HD6h3iYtGyhDcOjRK4xWa9Hl6YzdIszmyO95wPZvFOM,2710
209
- dmart_migrations/versions/__pycache__/6675fd9dfe42_remove_unique_from_sessions_table.cpython-314.pyc,sha256=k71q5tLr6x2cDoHw4pDNeBem136qz2XFjUg11a6DDpM,2422
210
- dmart_migrations/versions/__pycache__/71bc1df82e6a_adding_user_last_login_at.cpython-314.pyc,sha256=35cwhVRGhtvREO4j3pBDtGoSD8sZd0MdZ0SRZKLsK5s,3399
211
- dmart_migrations/versions/__pycache__/74288ccbd3b5_initial.cpython-314.pyc,sha256=BDS6zx-enw-oWeAIju5plp4lB10q8BeFwBnaUDEgtKY,28589
212
- dmart_migrations/versions/__pycache__/7520a89a8467_rm_activesession_table.cpython-314.pyc,sha256=x5m_sxYMDP6myKKlVTivP-VM-2EH6d0D21pv9URFyXU,2791
213
- dmart_migrations/versions/__pycache__/848b623755a4_make_created_nd_updated_at_required.cpython-314.pyc,sha256=A4E0A4eJliMs-uNeVZfGo2j8UrXhdRrtBB1Ky-OA_O0,7917
214
- dmart_migrations/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-314.pyc,sha256=94zNRuU2L3ra43Z3eDa4duVMXMsKTLiNUUj7lUxeZzY,2526
215
- dmart_migrations/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc,sha256=IIEupLleN5nEUUpTCXWGV-LXsdzGJrcnrolJmpi8WMo,6383
216
- dmart_migrations/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc,sha256=tPXDQ_TCEK9sv3ZinAk9vUJcwuqE75ymoT_0O_0qLss,5657
217
- dmart_migrations/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc,sha256=D3m2fuhNbUUNZi21p45UDy8uUmAOio1RZzqoPnKD6G4,6990
218
- dmart_migrations/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc,sha256=eBvU5VFctw1AqklCtprJJhvGXZVYpvxBcuZiI6bOBGY,34035
219
- dmart_migrations/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc,sha256=v47hBAxgbjkSAsEn8O2EUTUOPR0D9bVD8fJl9erlpzM,2514
220
- dmart_migrations/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc,sha256=jCW56_bq_qQM6H9CjPu2qOm8gywSO7TEHHywlyv1qcI,5099
221
196
  languages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
222
197
  languages/arabic.json,sha256=UL61rP9_M42CGfU94G5-1bXVUVnsJWXzoqhaXTXTJuM,910
223
198
  languages/english.json,sha256=Y7eZ2X8c427_97qYrHOeGb2d725T-YlNNFVSi8FB7Kw,649
@@ -282,8 +257,8 @@ utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGVqo,700
282
257
  utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
283
258
  utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
284
259
  utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
285
- dmart-1.4.17.dist-info/METADATA,sha256=R7ts20I20WAd4vrVMBtjl3GztMJKwmUrQCDWSrbqJ7s,2149
286
- dmart-1.4.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
287
- dmart-1.4.17.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
288
- dmart-1.4.17.dist-info/top_level.txt,sha256=XELQhaIfj-qupnyBrir39qFRh8ncu1RXkCHeitzqLLg,275
289
- dmart-1.4.17.dist-info/RECORD,,
260
+ dmart-1.4.33.dist-info/METADATA,sha256=SuyC2Wb2GdoDWEWznnL6exUz6xlXN7vc9jUYXLe0ndo,2069
261
+ dmart-1.4.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
262
+ dmart-1.4.33.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
263
+ dmart-1.4.33.dist-info/top_level.txt,sha256=iPbBisVNr4KDWyZhxMl2x3oJSgf71knWXMh21_xutrE,266
264
+ dmart-1.4.33.dist-info/RECORD,,
@@ -1,3 +1,4 @@
1
+ alembic
1
2
  api
2
3
  bundler
3
4
  config
@@ -5,7 +6,6 @@ cxb
5
6
  data_adapters
6
7
  data_generator
7
8
  dmart
8
- dmart_migrations
9
9
  get_settings
10
10
  languages
11
11
  main
dmart.py CHANGED
@@ -18,13 +18,6 @@ from pathlib import Path
18
18
  from hypercorn.config import Config
19
19
  from hypercorn.run import run
20
20
 
21
- try:
22
- from alembic import command as alembic_command
23
- from alembic.config import Config as AlembicConfig
24
- HAS_ALEMBIC = True
25
- except ImportError:
26
- HAS_ALEMBIC = False
27
-
28
21
  from data_adapters.file.archive import archive
29
22
  from data_adapters.file.create_index import main as create_index
30
23
  from data_adapters.file.health_check import main as health_check
@@ -263,13 +256,11 @@ def hypercorn_main() -> int:
263
256
  type=int,
264
257
  )
265
258
  args = parser.parse_args(sys.argv[1:])
266
-
267
- # Set defaults if config file is not found
259
+
268
260
  config = Config()
269
261
  if args.config and os.path.exists(args.config):
270
262
  config = Config.from_toml(args.config)
271
263
  else:
272
- # Default Hypercorn configuration
273
264
  config.backlog = 2000
274
265
  config.workers = 1
275
266
  config.bind = ["localhost:8282"]
@@ -377,7 +368,7 @@ def hypercorn_main() -> int:
377
368
  print(e)
378
369
  pass
379
370
 
380
- url = f"http://{host}:{port}/cxb/"
371
+ url = f"http://{host}:{port}{settings.cxb_url}/"
381
372
 
382
373
  def open_browser():
383
374
  time.sleep(2)
@@ -390,27 +381,27 @@ def hypercorn_main() -> int:
390
381
 
391
382
 
392
383
  def main():
393
- sys.argv = sys.argv[1:]
394
- if len(sys.argv) == 0:
384
+ args = sys.argv[1:]
385
+ if len(args) == 0:
395
386
  print("You must provide a command to run:")
396
387
  print(commands)
397
388
  sys.exit(1)
398
389
 
399
- match sys.argv[0]:
390
+ match args[0]:
400
391
  case "hyper":
401
392
  hypercorn_main()
402
393
  case "server" | "serve":
403
394
  open_cxb = False
404
- if "--open-cxb" in sys.argv:
395
+ if "--open-cxb" in args:
405
396
  open_cxb = True
406
- sys.argv.remove("--open-cxb")
397
+ args.remove("--open-cxb")
407
398
 
408
- if "--cxb-config" in sys.argv:
409
- idx = sys.argv.index("--cxb-config")
410
- if idx + 1 < len(sys.argv):
411
- os.environ["DMART_CXB_CONFIG"] = sys.argv[idx + 1]
412
- sys.argv.pop(idx + 1)
413
- sys.argv.pop(idx)
399
+ if "--cxb-config" in args:
400
+ idx = args.index("--cxb-config")
401
+ if idx + 1 < len(args):
402
+ os.environ["DMART_CXB_CONFIG"] = args[idx + 1]
403
+ args.pop(idx + 1)
404
+ args.pop(idx)
414
405
 
415
406
  if open_cxb:
416
407
  url = f"http://{settings.listening_host}:{settings.listening_port}/cxb/"
@@ -421,6 +412,7 @@ def main():
421
412
  import threading
422
413
  threading.Thread(target=open_browser, daemon=True).start()
423
414
 
415
+ sys.argv = [sys.argv[0]] + args
424
416
  asyncio.run(server())
425
417
  case "health-check":
426
418
  parser = argparse.ArgumentParser(
@@ -431,9 +423,9 @@ def main():
431
423
  parser.add_argument("-s", "--space", help="hit the target space or pass (all) to make the full health check")
432
424
  parser.add_argument("-m", "--schemas", nargs="*", help="hit the target schema inside the space")
433
425
 
434
- args = parser.parse_args()
426
+ args_parsed = parser.parse_args(args[1:])
435
427
  before_time = time.time()
436
- asyncio.run(health_check(args.type, args.space, args.schemas))
428
+ asyncio.run(health_check(args_parsed.type, args_parsed.space, args_parsed.schemas))
437
429
  print(f'total time: {"{:.2f}".format(time.time() - before_time)} sec')
438
430
  case "create-index":
439
431
  parser = argparse.ArgumentParser(
@@ -451,9 +443,9 @@ def main():
451
443
  "--flushall", action='store_true', help="FLUSHALL data on Redis"
452
444
  )
453
445
 
454
- args = parser.parse_args()
446
+ args_parsed = parser.parse_args(args[1:])
455
447
 
456
- asyncio.run(create_index(args.space, args.schemas, args.subpaths, args.flushall))
448
+ asyncio.run(create_index(args_parsed.space, args_parsed.schemas, args_parsed.subpaths, args_parsed.flushall))
457
449
  case "export":
458
450
  parser = argparse.ArgumentParser()
459
451
  parser.add_argument(
@@ -470,24 +462,24 @@ def main():
470
462
  "--since",
471
463
  help="Export entries created/updated since the provided timestamp",
472
464
  )
473
- args = parser.parse_args()
465
+ args_parsed = parser.parse_args(args[1:])
474
466
  since = None
475
467
  output_path = ""
476
- if args.output:
477
- output_path = args.output
468
+ if args_parsed.output:
469
+ output_path = args_parsed.output
478
470
 
479
- if args.since:
480
- since = int(round(float(args.since) * 1000))
471
+ if args_parsed.since:
472
+ since = int(round(float(args_parsed.since) * 1000))
481
473
 
482
- if not os.path.isdir(args.spaces):
483
- exit_with_error(f"The spaces folder {args.spaces} is not found.")
474
+ if not os.path.isdir(args_parsed.spaces):
475
+ exit_with_error(f"The spaces folder {args_parsed.spaces} is not found.")
484
476
 
485
477
  out_path = os.path.join(output_path, OUTPUT_FOLDER_NAME)
486
478
  if os.path.isdir(out_path):
487
479
  shutil.rmtree(out_path)
488
480
 
489
481
  tasks = []
490
- with open(args.config, "r") as f:
482
+ with open(args_parsed.config, "r") as f:
491
483
  config_objs = json.load(f)
492
484
 
493
485
  for config_obj in config_objs:
@@ -499,7 +491,7 @@ def main():
499
491
  config_obj.get("schema_shortname", ""),
500
492
  config_obj.get("included_meta_fields", {}),
501
493
  config_obj.get("excluded_payload_fields", {}),
502
- args.spaces, output_path, since))
494
+ args_parsed.spaces, output_path, since))
503
495
 
504
496
  asyncio.run(exporter(tasks))
505
497
 
@@ -528,11 +520,11 @@ def main():
528
520
  help="The number of day, older than which, the entries will be archived (based on updated_at)",
529
521
  )
530
522
 
531
- args = parser.parse_args()
532
- space = args.space
533
- subpath = args.subpath
534
- olderthan = args.olderthan
535
- schema = args.schema or "meta"
523
+ args_parsed = parser.parse_args(args[1:])
524
+ space = args_parsed.space
525
+ subpath = args_parsed.subpath
526
+ olderthan = args_parsed.olderthan
527
+ schema = args_parsed.schema or "meta"
536
528
 
537
529
  asyncio.run(archive(space, subpath, schema, olderthan))
538
530
  print("Done.")
@@ -540,38 +532,6 @@ def main():
540
532
  asyncio.run(json_to_db_migration())
541
533
  case "db_to_json":
542
534
  db_to_json_migration()
543
- case "migrate":
544
- pkg_dir = Path(__file__).resolve().parent
545
-
546
- # Try to find migrations directory
547
- alembic_dir = pkg_dir / "dmart_migrations"
548
- if not alembic_dir.exists():
549
- # Fallback to alembic for backward compatibility
550
- alembic_dir = pkg_dir / "alembic"
551
-
552
- original_ini_path = pkg_dir / "alembic.ini"
553
- if not original_ini_path.exists():
554
- original_ini_path = alembic_dir / "alembic.ini"
555
-
556
- if not original_ini_path.exists():
557
- print(f"Error: 'alembic.ini' not found in {pkg_dir} or {alembic_dir}")
558
- sys.exit(1)
559
-
560
- try:
561
- # Check if alembic library is installed
562
- if not HAS_ALEMBIC:
563
- print("Error: 'alembic' library not found. Please install it with 'pip install alembic'.")
564
- sys.exit(1)
565
-
566
- alembic_cfg = AlembicConfig(str(original_ini_path))
567
- alembic_cfg.set_main_option("script_location", alembic_dir.as_posix())
568
-
569
- # Run alembic upgrade head
570
- alembic_command.upgrade(alembic_cfg, "head")
571
-
572
- except Exception as e:
573
- print(f"Error running migration: {e}")
574
- sys.exit(1)
575
535
  case "help":
576
536
  print("Available commands:")
577
537
  print(commands)
alembic.ini DELETED
@@ -1,117 +0,0 @@
1
- # A generic, single database configuration.
2
-
3
- [alembic]
4
- # path to migration scripts
5
- # Use forward slashes (/) also on windows to provide an os agnostic path
6
- script_location = dmart_migrations
7
-
8
- # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
9
- # Uncomment the line below if you want the files to be prepended with date and time
10
- # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
11
- # for all available tokens
12
- # file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
13
-
14
- # sys.path path, will be prepended to sys.path if present.
15
- # defaults to the current working directory.
16
- prepend_sys_path = .
17
-
18
- # timezone to use when rendering the date within the migration file
19
- # as well as the filename.
20
- # If specified, requires the python>=3.9 or backports.zoneinfo library.
21
- # Any required deps can installed by adding `alembic[tz]` to the pip requirements
22
- # string value is passed to ZoneInfo()
23
- # leave blank for localtime
24
- # timezone =
25
-
26
- # max length of characters to apply to the "slug" field
27
- # truncate_slug_length = 40
28
-
29
- # set to 'true' to run the environment during
30
- # the 'revision' command, regardless of autogenerate
31
- # revision_environment = false
32
-
33
- # set to 'true' to allow .pyc and .pyo files without
34
- # a source .py file to be detected as revisions in the
35
- # versions/ directory
36
- # sourceless = false
37
-
38
- # version location specification; This defaults
39
- # to alembic/versions. When using multiple version
40
- # directories, initial revisions must be specified with --version-path.
41
- # The path separator used here should be the separator specified by "version_path_separator" below.
42
- # version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
43
-
44
- # version path separator; As mentioned above, this is the character used to split
45
- # version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
46
- # If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
47
- # Valid values for version_path_separator are:
48
- #
49
- # version_path_separator = :
50
- # version_path_separator = ;
51
- # version_path_separator = space
52
- # version_path_separator = newline
53
- version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
54
-
55
- # set to 'true' to search source files recursively
56
- # in each "version_locations" directory
57
- # new in Alembic version 1.10
58
- # recursive_version_locations = false
59
-
60
- # the output encoding used when revision files
61
- # are written from script.py.mako
62
- # output_encoding = utf-8
63
-
64
- sqlalchemy.url = postgresql+asyncpg://dmart:somepassword@localhost:5432/dmart
65
-
66
-
67
- [post_write_hooks]
68
- # post_write_hooks defines scripts or Python functions that are run
69
- # on newly generated revision scripts. See the documentation for further
70
- # detail and examples
71
-
72
- # format using "black" - use the console_scripts runner, against the "black" entrypoint
73
- # hooks = black
74
- # black.type = console_scripts
75
- # black.entrypoint = black
76
- # black.options = -l 79 REVISION_SCRIPT_FILENAME
77
-
78
- # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
79
- # hooks = ruff
80
- # ruff.type = exec
81
- # ruff.executable = %(here)s/.venv/bin/ruff
82
- # ruff.options = --fix REVISION_SCRIPT_FILENAME
83
-
84
- # Logging configuration
85
- [loggers]
86
- keys = root,sqlalchemy,alembic
87
-
88
- [handlers]
89
- keys = console
90
-
91
- [formatters]
92
- keys = generic
93
-
94
- [logger_root]
95
- level = WARNING
96
- handlers = console
97
- qualname =
98
-
99
- [logger_sqlalchemy]
100
- level = WARNING
101
- handlers =
102
- qualname = sqlalchemy.engine
103
-
104
- [logger_alembic]
105
- level = INFO
106
- handlers =
107
- qualname = alembic
108
-
109
- [handler_console]
110
- class = StreamHandler
111
- args = (sys.stderr,)
112
- level = NOTSET
113
- formatter = generic
114
-
115
- [formatter_generic]
116
- format = %(levelname)-5.5s [%(name)s] %(message)s
117
- datefmt = %H:%M:%S
dmart_migrations/README DELETED
@@ -1 +0,0 @@
1
- Generic single-database configuration.
@@ -1,11 +0,0 @@
1
- # 1st : Make sure in alembic.ini to have proper db config for sqlalchemy.url
2
-
3
-
4
- # To establish the base for a previously created database run the following
5
-
6
- CREATE TABLE alembic_version (
7
- version_num VARCHAR(32) NOT NULL,
8
- CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
9
- );
10
-
11
- INSERT INTO alembic_version (version_num) VALUES ('74288ccbd3b5') RETURNING alembic_version.version_num;
@@ -1,28 +0,0 @@
1
- """${message}
2
-
3
- Revision ID: ${up_revision}
4
- Revises: ${down_revision | comma,n}
5
- Create Date: ${create_date}
6
-
7
- """
8
- from typing import Sequence, Union
9
-
10
- from alembic import op
11
- import sqlalchemy as sa
12
- import sqlmodel
13
- import sqlmodel.sql.sqltypes
14
- ${imports if imports else ""}
15
-
16
- # revision identifiers, used by Alembic.
17
- revision: str = ${repr(up_revision)}
18
- down_revision: Union[str, None] = ${repr(down_revision)}
19
- branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
20
- depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
21
-
22
-
23
- def upgrade() -> None:
24
- ${upgrades if upgrades else "pass"}
25
-
26
-
27
- def downgrade() -> None:
28
- ${downgrades if downgrades else "pass"}
File without changes
info.json DELETED
@@ -1 +0,0 @@
1
- {"branch": "pypi", "version": "2e6304dd", "tag": "v1.4.0-72-g2e6304dd", "version_date": "'Mon Jan 19 08:55:04 2026 +0000'"}
File without changes
File without changes
File without changes