zrb 1.0.0b8__tar.gz → 1.0.0b10__tar.gz

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 (346) hide show
  1. {zrb-1.0.0b8 → zrb-1.0.0b10}/PKG-INFO +2 -1
  2. {zrb-1.0.0b8 → zrb-1.0.0b10}/pyproject.toml +3 -2
  3. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/__main__.py +3 -0
  4. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_task.py +1 -0
  5. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/.coveragerc +11 -0
  6. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/.gitignore +8 -0
  7. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/column/add_column_task.py +4 -4
  8. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/config.py +5 -0
  9. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/add_entity_task.py +108 -1
  10. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/add_entity_util.py +67 -4
  11. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/module/my_module/service/my_entity/my_entity_service.py +5 -5
  12. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/schema/my_entity.py +1 -0
  13. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/test/my_module/my_entity/test_create_my_entity.py +53 -0
  14. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/test/my_module/my_entity/test_delete_my_entity.py +62 -0
  15. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/test/my_module/my_entity/test_read_my_entity.py +65 -0
  16. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/test/my_module/my_entity/test_update_my_entity.py +61 -0
  17. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/gateway_subroute.py +118 -0
  18. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/input.py +8 -0
  19. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/add_module_util.py +2 -2
  20. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/gateway/subroute/my_module.py +12 -0
  21. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/module_task_definition.py +10 -6
  22. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/task.py +65 -14
  23. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/util.py → zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/task_util.py +20 -52
  24. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/util.py +58 -0
  25. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/base_db_repository.py +27 -11
  26. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/base_service.py +140 -51
  27. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/error.py +15 -0
  28. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/util/parser.py +1 -1
  29. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/config.py +22 -4
  30. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/client/auth_client.py +21 -0
  31. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/versions/3093c7336477_add_auth_tables.py +205 -0
  32. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/versions/8ed025bcc845_create_permissions.py +69 -0
  33. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration_metadata.py +3 -4
  34. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/route.py +15 -14
  35. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/permission_service.py +4 -4
  36. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/repository/role_db_repository.py +24 -5
  37. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/role_service.py +14 -12
  38. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/repository/user_db_repository.py +249 -0
  39. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/repository/user_repository.py +28 -11
  40. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/user_service.py +339 -0
  41. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/user_service_factory.py +35 -0
  42. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/subroute/auth.py +389 -0
  43. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/util/auth.py +57 -0
  44. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/requirements.txt +12 -0
  45. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/permission.py +2 -0
  46. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/role.py +13 -12
  47. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/user.py +64 -12
  48. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/_util/access_token.py +19 -0
  49. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/auth/permission/test_create_permission.py +59 -0
  50. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/auth/permission/test_delete_permission.py +68 -0
  51. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/auth/permission/test_read_permission.py +71 -0
  52. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/auth/permission/test_update_permission.py +66 -0
  53. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/auth/test_user_session.py +195 -0
  54. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/test_health_and_readiness.py +28 -0
  55. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/test_homepage.py +17 -0
  56. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test/test_not_found_error.py +16 -0
  57. zrb-1.0.0b10/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/test.sh +7 -0
  58. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/base_task.py +10 -10
  59. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/cmd_task.py +2 -5
  60. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cmd/command.py +39 -48
  61. zrb-1.0.0b10/src/zrb/util/codemod/modification_mode.py +3 -0
  62. zrb-1.0.0b10/src/zrb/util/codemod/modify_class.py +58 -0
  63. zrb-1.0.0b10/src/zrb/util/codemod/modify_class_parent.py +68 -0
  64. zrb-1.0.0b10/src/zrb/util/codemod/modify_class_property.py +128 -0
  65. zrb-1.0.0b10/src/zrb/util/codemod/modify_dict.py +75 -0
  66. zrb-1.0.0b10/src/zrb/util/codemod/modify_function.py +65 -0
  67. zrb-1.0.0b10/src/zrb/util/codemod/modify_function_call.py +68 -0
  68. zrb-1.0.0b10/src/zrb/util/codemod/modify_method.py +88 -0
  69. zrb-1.0.0b8/src/zrb/util/codemod/prepend_code_to_module.py → zrb-1.0.0b10/src/zrb/util/codemod/modify_module.py +2 -3
  70. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/file.py +3 -2
  71. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/.gitignore +0 -4
  72. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/gateway_subroute.py +0 -74
  73. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/gateway/subroute/my_module.py +0 -7
  74. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/migrate.py +0 -3
  75. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/versions/3093c7336477_add_auth_tables.py +0 -160
  76. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/repository/user_db_repository.py +0 -212
  77. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/user_service.py +0 -137
  78. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/user_service_factory.py +0 -7
  79. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/subroute/auth.py +0 -214
  80. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/requirements.txt +0 -6
  81. zrb-1.0.0b8/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/session.py +0 -48
  82. zrb-1.0.0b8/src/zrb/util/codemod/append_code_to_class.py +0 -35
  83. zrb-1.0.0b8/src/zrb/util/codemod/append_code_to_function.py +0 -38
  84. zrb-1.0.0b8/src/zrb/util/codemod/append_code_to_method.py +0 -55
  85. zrb-1.0.0b8/src/zrb/util/codemod/append_key_to_dict.py +0 -51
  86. zrb-1.0.0b8/src/zrb/util/codemod/append_param_to_function_call.py +0 -39
  87. zrb-1.0.0b8/src/zrb/util/codemod/prepend_parent_to_class.py +0 -38
  88. zrb-1.0.0b8/src/zrb/util/codemod/prepend_property_to_class.py +0 -55
  89. {zrb-1.0.0b8 → zrb-1.0.0b10}/README.md +0 -0
  90. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/__init__.py +0 -0
  91. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/attr/__init__.py +0 -0
  92. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/attr/type.py +0 -0
  93. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/__init__.py +0 -0
  94. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/base64.py +0 -0
  95. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/git.py +0 -0
  96. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/git_subtree.py +0 -0
  97. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/group.py +0 -0
  98. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/llm_chat.py +0 -0
  99. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/previous-session.js +0 -0
  100. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/tool/api.py +0 -0
  101. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/tool/cli.py +0 -0
  102. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/tool/rag.py +0 -0
  103. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/llm/tool/web.py +0 -0
  104. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/md5.py +0 -0
  105. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/__init__.py +0 -0
  106. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_input.py +0 -0
  107. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/.flake8 +0 -0
  108. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/README.md +0 -0
  109. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/__init__.py +0 -0
  110. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/module/my_module/service/my_entity/my_entity_service_factory.py +0 -0
  111. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/module/my_module/service/my_entity/repository/my_entity_db_repository.py +0 -0
  112. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/module/my_module/service/my_entity/repository/my_entity_repository.py +0 -0
  113. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/app_template/module/my_module/service/my_entity/repository/my_entity_repository_factory.py +0 -0
  114. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/template/client_method.py +0 -0
  115. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/format_task.py +0 -0
  116. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/group.py +0 -0
  117. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/add_module_task.py +0 -0
  118. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/alembic.ini +0 -0
  119. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/client/my_module_api_client.py +0 -0
  120. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/client/my_module_client.py +0 -0
  121. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/client/my_module_client_factory.py +0 -0
  122. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/client/my_module_direct_client.py +0 -0
  123. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/migration/README +0 -0
  124. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/migration/env.py +0 -0
  125. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/migration/script.py.mako +0 -0
  126. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/migration/versions/.gitkeep +0 -0
  127. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/migration_metadata.py +0 -0
  128. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/route.py +0 -0
  129. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/service/__init__.py +0 -0
  130. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/venv_task.py +0 -0
  131. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/__init__.py +0 -0
  132. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/app_factory.py +0 -0
  133. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/db_engine_factory.py +0 -0
  134. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/logger_factory.py +0 -0
  135. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/parser_factory.py +0 -0
  136. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/schema.py +0 -0
  137. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/util/app.py +0 -0
  138. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/util/user_agent.py +0 -0
  139. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/util/view.py +0 -0
  140. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/main.py +0 -0
  141. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/__init__.py +0 -0
  142. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/alembic.ini +0 -0
  143. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/client/auth_api_client.py +0 -0
  144. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/client/auth_client_factory.py +0 -0
  145. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/client/auth_direct_client.py +0 -0
  146. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/README +0 -0
  147. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/env.py +0 -0
  148. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/migration/script.py.mako +0 -0
  149. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/__init__.py +0 -0
  150. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/__init__.py +0 -0
  151. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/permission_service_factory.py +0 -0
  152. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/repository/permission_db_repository.py +0 -0
  153. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/repository/permission_repository.py +0 -0
  154. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/repository/permission_repository_factory.py +0 -0
  155. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/__init__.py +0 -0
  156. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/repository/role_repository.py +0 -0
  157. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/repository/role_repository_factory.py +0 -0
  158. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/role_service_factory.py +0 -0
  159. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/__init__.py +0 -0
  160. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/repository/user_repository_factory.py +0 -0
  161. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/alembic.ini +0 -0
  162. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/migration/README +0 -0
  163. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/migration/env.py +0 -0
  164. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/migration/script.py.mako +0 -0
  165. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/migration/versions/.gitkeep +0 -0
  166. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/migration_metadata.py +0 -0
  167. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/route.py +0 -0
  168. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/util/view.py +0 -0
  169. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/content/error.html +0 -0
  170. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/content/homepage.html +0 -0
  171. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/images/android-chrome-192x192.png +0 -0
  172. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/images/android-chrome-512x512.png +0 -0
  173. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/images/favicon-32x32.png +0 -0
  174. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.amber.min.css +0 -0
  175. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.blue.min.css +0 -0
  176. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.cyan.min.css +0 -0
  177. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.fuchsia.min.css +0 -0
  178. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.green.min.css +0 -0
  179. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.grey.min.css +0 -0
  180. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.indigo.min.css +0 -0
  181. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.jade.min.css +0 -0
  182. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.lime.min.css +0 -0
  183. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.min.css +0 -0
  184. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.orange.min.css +0 -0
  185. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.pink.min.css +0 -0
  186. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.pumpkin.min.css +0 -0
  187. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.purple.min.css +0 -0
  188. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.red.min.css +0 -0
  189. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.sand.min.css +0 -0
  190. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.slate.min.css +0 -0
  191. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.violet.min.css +0 -0
  192. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.yellow.min.css +0 -0
  193. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/pico-css/pico.zinc.min.css +0 -0
  194. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/template/default.html +0 -0
  195. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/__init__.py +0 -0
  196. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/template.env +0 -0
  197. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/add/fastapp/fastapp_util.py +0 -0
  198. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/create/__init__.py +0 -0
  199. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/create/project-template/README.md +0 -0
  200. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/create/project-template/zrb_init.py +0 -0
  201. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/project/create/project_task.py +0 -0
  202. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/python.py +0 -0
  203. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/random.py +0 -0
  204. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/asdf/asdf.py +0 -0
  205. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/asdf/asdf_helper.py +0 -0
  206. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/common_input.py +0 -0
  207. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/latex/ubuntu.py +0 -0
  208. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/tmux/tmux.py +0 -0
  209. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/tmux/tmux_config.sh +0 -0
  210. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/tmux/tmux_helper.py +0 -0
  211. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/ubuntu.py +0 -0
  212. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/zsh/zsh.py +0 -0
  213. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/zsh/zsh_config.sh +0 -0
  214. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/setup/zsh/zsh_helper.py +0 -0
  215. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/shell/__init__.py +0 -0
  216. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/shell/autocomplete/__init__.py +0 -0
  217. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/shell/autocomplete/bash.py +0 -0
  218. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/shell/autocomplete/subcmd.py +0 -0
  219. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/shell/autocomplete/zsh.py +0 -0
  220. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/builtin/todo.py +0 -0
  221. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/callback/__init__.py +0 -0
  222. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/callback/any_callback.py +0 -0
  223. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/callback/callback.py +0 -0
  224. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/cmd/__init__.py +0 -0
  225. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/cmd/cmd_result.py +0 -0
  226. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/cmd/cmd_val.py +0 -0
  227. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/config.py +0 -0
  228. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/content_transformer/__init__.py +0 -0
  229. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/content_transformer/any_content_transformer.py +0 -0
  230. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/content_transformer/content_transformer.py +0 -0
  231. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/context/__init__.py +0 -0
  232. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/context/any_context.py +0 -0
  233. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/context/any_shared_context.py +0 -0
  234. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/context/context.py +0 -0
  235. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/context/shared_context.py +0 -0
  236. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/dot_dict/__init__.py +0 -0
  237. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/dot_dict/dot_dict.py +0 -0
  238. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/env/__init__.py +0 -0
  239. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/env/any_env.py +0 -0
  240. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/env/env.py +0 -0
  241. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/env/env_file.py +0 -0
  242. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/env/env_map.py +0 -0
  243. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/group/__init__.py +0 -0
  244. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/group/any_group.py +0 -0
  245. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/group/group.py +0 -0
  246. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/__init__.py +0 -0
  247. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/any_input.py +0 -0
  248. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/base_input.py +0 -0
  249. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/bool_input.py +0 -0
  250. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/float_input.py +0 -0
  251. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/int_input.py +0 -0
  252. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/option_input.py +0 -0
  253. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/password_input.py +0 -0
  254. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/str_input.py +0 -0
  255. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/input/text_input.py +0 -0
  256. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/__init__.py +0 -0
  257. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/cli.py +0 -0
  258. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/common_util.py +0 -0
  259. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_app.py +0 -0
  260. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_config/config.py +0 -0
  261. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_config/config_factory.py +0 -0
  262. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/__init__.py +0 -0
  263. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/docs_route.py +0 -0
  264. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/error_page/serve_default_404.py +0 -0
  265. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/error_page/show_error_page.py +0 -0
  266. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/error_page/view.html +0 -0
  267. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/home_page/__init__.py +0 -0
  268. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/home_page/home_page_route.py +0 -0
  269. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/home_page/view.html +0 -0
  270. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/login_api_route.py +0 -0
  271. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/login_page/login_page_route.py +0 -0
  272. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/login_page/view.html +0 -0
  273. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/logout_api_route.py +0 -0
  274. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/logout_page/logout_page_route.py +0 -0
  275. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/logout_page/view.html +0 -0
  276. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/group/show_group_page.py +0 -0
  277. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/group/view.html +0 -0
  278. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/node_page_route.py +0 -0
  279. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/task/partial/input.html +0 -0
  280. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/task/show_task_page.py +0 -0
  281. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/node_page/task/view.html +0 -0
  282. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/refresh_token_api_route.py +0 -0
  283. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/refresh-token.template.js +0 -0
  284. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/common.css +0 -0
  285. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/favicon-32x32.png +0 -0
  286. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/login/event.js +0 -0
  287. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/logout/event.js +0 -0
  288. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/pico.min.css +0 -0
  289. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/session/common-util.js +0 -0
  290. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/session/current-session.js +0 -0
  291. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/session/event.js +0 -0
  292. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/resources/session/past-session.js +0 -0
  293. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/static/static_route.py +0 -0
  294. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/task_input_api_route.py +0 -0
  295. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_route/task_session_api_route.py +0 -0
  296. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_schema/session.py +0 -0
  297. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_schema/token.py +0 -0
  298. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_schema/user.py +0 -0
  299. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_util/cookie.py +0 -0
  300. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_util/html.py +0 -0
  301. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_util/token.py +0 -0
  302. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/runner/web_util/user.py +0 -0
  303. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session/__init__.py +0 -0
  304. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session/any_session.py +0 -0
  305. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session/session.py +0 -0
  306. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_log/__init__.py +0 -0
  307. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_log/session_state_log.py +0 -0
  308. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_logger/__init__.py +0 -0
  309. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_logger/any_session_state_logger.py +0 -0
  310. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_logger/file_session_state_logger.py +0 -0
  311. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/session_state_logger/session_state_logger_factory.py +0 -0
  312. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/__init__.py +0 -0
  313. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/any_task.py +0 -0
  314. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/base_trigger.py +0 -0
  315. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/http_check.py +0 -0
  316. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/llm_task.py +0 -0
  317. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/make_task.py +0 -0
  318. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/rsync_task.py +0 -0
  319. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/scaffolder.py +0 -0
  320. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/scheduler.py +0 -0
  321. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/task.py +0 -0
  322. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task/tcp_check.py +0 -0
  323. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task_status/__init__.py +0 -0
  324. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/task_status/task_status.py +0 -0
  325. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/__init__.py +0 -0
  326. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/attr.py +0 -0
  327. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cli/__init__.py +0 -0
  328. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cli/style.py +0 -0
  329. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cli/subcommand.py +0 -0
  330. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cmd/__init__.py +0 -0
  331. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cmd/remote.py +0 -0
  332. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/codemod/__init__.py +0 -0
  333. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/cron.py +0 -0
  334. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/git.py +0 -0
  335. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/git_subtree.py +0 -0
  336. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/group.py +0 -0
  337. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/llm/tool.py +0 -0
  338. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/load.py +0 -0
  339. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/run.py +0 -0
  340. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/string/__init__.py +0 -0
  341. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/string/conversion.py +0 -0
  342. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/string/format.py +0 -0
  343. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/string/name.py +0 -0
  344. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/util/todo.py +0 -0
  345. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/xcom/__init__.py +0 -0
  346. {zrb-1.0.0b8 → zrb-1.0.0b10}/src/zrb/xcom/xcom.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.0.0b8
3
+ Version: 1.0.0b10
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -23,6 +23,7 @@ Requires-Dist: fastembed (>=0.5.1,<0.6.0)
23
23
  Requires-Dist: isort (>=5.13.2,<5.14.0)
24
24
  Requires-Dist: libcst (>=1.5.0,<2.0.0)
25
25
  Requires-Dist: pdfplumber (>=0.11.4,<0.12.0) ; extra == "rag"
26
+ Requires-Dist: psutil (>=6.1.1,<7.0.0)
26
27
  Requires-Dist: pydantic-ai (>=0.0.19,<0.0.20)
27
28
  Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
28
29
  Requires-Dist: python-jose[cryptography] (>=3.3.0,<4.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "zrb"
3
- version = "1.0.0b8"
3
+ version = "1.0.0b10"
4
4
  description = "Your Automation Powerhouse"
5
5
  authors = ["Go Frendi Gunawan <gofrendiasgard@gmail.com>"]
6
6
  license = "AGPL-3.0-or-later"
@@ -52,12 +52,13 @@ python-jose = {extras = ["cryptography"], version = "^3.3.0"}
52
52
  ulid-py = "^1.1.0"
53
53
  pydantic-ai = "^0.0.19"
54
54
  fastembed = "^0.5.1"
55
+ psutil = "^6.1.1"
55
56
 
56
57
  [tool.poetry.extras]
57
58
  # poetry install -E rag
58
59
  rag = ["chromadb", "pdfplumber"]
59
60
 
60
- [tool.poetry.dev-dependencies]
61
+ [tool.poetry.group.dev.dependencies]
61
62
  alembic = "^1.14.0" # FastApp dependencies
62
63
  flake8 = "~7.1.1"
63
64
  pytest = "~8.3.3"
@@ -16,8 +16,11 @@ def serve_cli():
16
16
  cli.run(sys.argv[1:])
17
17
  except KeyboardInterrupt:
18
18
  print(stylize_warning("\nStopped"), file=sys.stderr)
19
+ sys.exit(1)
19
20
  except RuntimeError as e:
20
21
  if f"{e}".lower() != "event loop is closed":
21
22
  raise e
23
+ sys.exit(1)
22
24
  except NodeNotFoundError as e:
23
25
  print(stylize_error(f"{e}"), file=sys.stderr)
26
+ sys.exit(1)
@@ -57,6 +57,7 @@ scaffold_fastapp = Scaffolder(
57
57
  "my_app_name": "{to_snake_case(ctx.input.app)}",
58
58
  "MY_APP_NAME": "{to_snake_case(ctx.input.app).upper()}",
59
59
  "my-secure-password": lambda _: get_random_name(),
60
+ "my-secret-key": lambda _: get_random_name(),
60
61
  },
61
62
  ),
62
63
  # Register fastapp's tasks to project's zrb_init (project_dir/zrb_init.py)
@@ -0,0 +1,11 @@
1
+ [run]
2
+ omit =
3
+ _zrb/*
4
+
5
+ [report]
6
+ # Show missing lines in the terminal report
7
+ show_missing = True
8
+
9
+ [html]
10
+ # Set the output directory for HTML reports (optional)
11
+ directory = htmlcov
@@ -0,0 +1,8 @@
1
+ __pycache__
2
+ .venv
3
+ .env
4
+ *.db
5
+
6
+ htmlcov
7
+ .coverage
8
+ .pytest_cache
@@ -11,7 +11,7 @@ from my_app_name._zrb.input import (
11
11
  from my_app_name._zrb.util import get_existing_schema_names
12
12
 
13
13
  from zrb import AnyContext, Task, make_task
14
- from zrb.util.codemod.prepend_property_to_class import prepend_property_to_class
14
+ from zrb.util.codemod.modify_class_property import append_property_to_class
15
15
  from zrb.util.file import read_file, write_file
16
16
  from zrb.util.string.conversion import to_pascal_case, to_snake_case
17
17
 
@@ -45,7 +45,7 @@ def update_my_app_name_schema(ctx: AnyContext):
45
45
  snake_column_name = to_snake_case(ctx.input.column)
46
46
  column_type = ctx.input.type
47
47
  # Base
48
- new_code = prepend_property_to_class(
48
+ new_code = append_property_to_class(
49
49
  original_code=existing_code,
50
50
  class_name=f"{pascal_entity_name}Base",
51
51
  property_name=snake_column_name,
@@ -53,7 +53,7 @@ def update_my_app_name_schema(ctx: AnyContext):
53
53
  default_value=_get_default_value(column_type),
54
54
  )
55
55
  # Update
56
- new_code = prepend_property_to_class(
56
+ new_code = append_property_to_class(
57
57
  original_code=new_code,
58
58
  class_name=f"{pascal_entity_name}Update",
59
59
  property_name=snake_column_name,
@@ -61,7 +61,7 @@ def update_my_app_name_schema(ctx: AnyContext):
61
61
  default_value="None",
62
62
  )
63
63
  # Table
64
- new_code = prepend_property_to_class(
64
+ new_code = append_property_to_class(
65
65
  original_code=new_code,
66
66
  class_name=f"{pascal_entity_name}",
67
67
  property_name=snake_column_name,
@@ -13,6 +13,11 @@ MONOLITH_ENV_VARS = {
13
13
  "MY_APP_NAME_MODE": "monolith",
14
14
  "MY_APP_NAME_MODULES": "",
15
15
  }
16
+ TEST_ENV_VARS = {
17
+ "MY_APP_NAME_DB_URL": f"sqlite:///{APP_DIR}/test.db",
18
+ "MY_APP_NAME_AUTH_PRIORITIZE_NEW_SESSION": "1", # Need this because we will launch a new user session for each test
19
+ "MY_APP_NAME_AUTH_GUEST_USER_PERMISSIONs": "", # Guest user should not has any privilege for testing
20
+ }
16
21
 
17
22
  if platform.system() == "Windows":
18
23
  ACTIVATE_VENV_SCRIPT = "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser; . .venv\\Scripts\\Activate" # noqa
@@ -2,8 +2,14 @@ import os
2
2
 
3
3
  from my_app_name._zrb.config import ACTIVATE_VENV_SCRIPT, APP_DIR
4
4
  from my_app_name._zrb.entity.add_entity_util import (
5
+ get_add_permission_migration_script,
6
+ get_auth_migration_version_dir,
7
+ get_existing_auth_migration_file_names,
8
+ get_existing_auth_migration_xcom_key,
9
+ get_remove_permission_migration_script,
5
10
  is_in_app_schema_dir,
6
11
  is_in_module_entity_dir,
12
+ is_in_module_entity_test_dir,
7
13
  is_module_api_client_file,
8
14
  is_module_client_file,
9
15
  is_module_direct_client_file,
@@ -42,8 +48,11 @@ from zrb import (
42
48
  EnvFile,
43
49
  Scaffolder,
44
50
  Task,
51
+ Xcom,
45
52
  make_task,
46
53
  )
54
+ from zrb.util.codemod.modify_function import replace_function_code
55
+ from zrb.util.file import read_file, write_file
47
56
  from zrb.util.string.conversion import to_snake_case
48
57
 
49
58
 
@@ -88,6 +97,7 @@ scaffold_my_app_name_entity = Scaffolder(
88
97
  match=is_in_app_schema_dir,
89
98
  transform={
90
99
  "MyEntity": "{to_pascal_case(ctx.input.entity)}",
100
+ "my_entities": "{to_snake_case(ctx.input.plural)}",
91
101
  "my_column": "{to_snake_case(ctx.input.column)}",
92
102
  },
93
103
  ),
@@ -104,6 +114,18 @@ scaffold_my_app_name_entity = Scaffolder(
104
114
  "my-entities": "{to_kebab_case(ctx.input.plural)}",
105
115
  },
106
116
  ),
117
+ # Test transformation (my_app_name/test/my_module/my_entity)
118
+ ContentTransformer(
119
+ name="transform-module-entity-test-dir",
120
+ match=is_in_module_entity_test_dir,
121
+ transform={
122
+ "my_module": "{to_snake_case(ctx.input.module)}",
123
+ "my_entity": "{to_snake_case(ctx.input.entity)}",
124
+ "my-entity": "{to_kebab_case(ctx.input.entity)}",
125
+ "my-entities": "{to_kebab_case(ctx.input.plural)}",
126
+ "my_column": "{to_snake_case(ctx.input.column)}",
127
+ },
128
+ ),
107
129
  # Add entity to migration metadata
108
130
  # (my_app_name/module/snake_module_name/migration_metadata.py)
109
131
  ContentTransformer(
@@ -176,11 +198,96 @@ create_my_app_name_entity_migration = CmdTask(
176
198
  ],
177
199
  )
178
200
 
201
+
202
+ @make_task(
203
+ name="inspect-my-app-name-auth-migration",
204
+ input=new_entity_input,
205
+ retries=0,
206
+ upstream=scaffold_my_app_name_entity,
207
+ )
208
+ def inspect_my_app_name_auth_migration(ctx: AnyContext):
209
+ """Getting existing migration files in auth module"""
210
+ migration_file_names = get_existing_auth_migration_file_names()
211
+ xcom_key = get_existing_auth_migration_xcom_key(ctx)
212
+ if xcom_key not in ctx.xcom:
213
+ ctx.xcom[xcom_key] = Xcom([])
214
+ ctx.xcom[xcom_key].push(migration_file_names)
215
+
216
+
217
+ create_my_app_name_entity_permission = CmdTask(
218
+ name="create-my-app-name-entity-permission",
219
+ input=[
220
+ new_entity_input,
221
+ ],
222
+ env=EnvFile(path=os.path.join(APP_DIR, "template.env")),
223
+ cwd=APP_DIR,
224
+ cmd=[
225
+ ACTIVATE_VENV_SCRIPT,
226
+ Cmd(lambda ctx: set_create_migration_db_url_env("auth")),
227
+ Cmd(lambda ctx: set_env("MY_APP_NAME_MODULES", "auth")),
228
+ Cmd(lambda ctx: cd_module_script("auth")),
229
+ "alembic upgrade head",
230
+ Cmd(
231
+ 'alembic revision --autogenerate -m "create_{to_snake_case(ctx.input.entity)}_permission"', # noqa
232
+ ),
233
+ ],
234
+ render_cmd=False,
235
+ retries=0,
236
+ upstream=[
237
+ prepare_venv,
238
+ inspect_my_app_name_auth_migration,
239
+ ],
240
+ )
241
+
242
+
243
+ @make_task(
244
+ name="update-my-app-name-entity-permission",
245
+ input=new_entity_input,
246
+ retries=0,
247
+ upstream=create_my_app_name_entity_permission,
248
+ )
249
+ def update_my_app_name_entity_permission(ctx: AnyContext):
250
+ xcom_key = get_existing_auth_migration_xcom_key(ctx)
251
+ existing_migration_file_names = ctx.xcom[xcom_key].pop()
252
+ current_migration_file_names = get_existing_auth_migration_file_names()
253
+ new_migration_file_names = [
254
+ file_name
255
+ for file_name in current_migration_file_names
256
+ if file_name not in existing_migration_file_names
257
+ ]
258
+ if len(new_migration_file_names) == 0:
259
+ raise Exception("No migration file created")
260
+ new_migration_file_path = os.path.join(
261
+ get_auth_migration_version_dir(), new_migration_file_names[0]
262
+ )
263
+ new_migration_code = read_file(
264
+ new_migration_file_path,
265
+ {
266
+ "from alembic import op": "\n".join(
267
+ [
268
+ "from alembic import op",
269
+ "from module.auth.migration_metadata import metadata",
270
+ ]
271
+ ),
272
+ },
273
+ )
274
+ new_migration_code = replace_function_code(
275
+ new_migration_code, "upgrade", get_add_permission_migration_script(ctx)
276
+ )
277
+ new_migration_code = replace_function_code(
278
+ new_migration_code, "downgrade", get_remove_permission_migration_script(ctx)
279
+ )
280
+ write_file(new_migration_file_path, new_migration_code)
281
+
282
+
179
283
  add_my_app_name_entity = app_create_group.add_task(
180
284
  Task(
181
285
  name="add-my-app-name-entity",
182
286
  description="🏗️ Create new entity on a module",
183
- upstream=create_my_app_name_entity_migration,
287
+ upstream=[
288
+ create_my_app_name_entity_migration,
289
+ update_my_app_name_entity_permission,
290
+ ],
184
291
  successor=format_my_app_name_code,
185
292
  retries=0,
186
293
  ),
@@ -3,20 +3,83 @@ import os
3
3
  from my_app_name._zrb.config import APP_DIR
4
4
 
5
5
  from zrb.context.any_context import AnyContext
6
- from zrb.util.codemod.append_code_to_class import append_code_to_class
7
- from zrb.util.codemod.append_code_to_function import append_code_to_function
8
- from zrb.util.codemod.prepend_code_to_module import prepend_code_to_module
9
- from zrb.util.codemod.prepend_parent_to_class import prepend_parent_class
6
+ from zrb.util.codemod.modify_class import append_code_to_class
7
+ from zrb.util.codemod.modify_class_parent import prepend_parent_class
8
+ from zrb.util.codemod.modify_function import append_code_to_function
9
+ from zrb.util.codemod.modify_module import prepend_code_to_module
10
10
  from zrb.util.file import read_file, write_file
11
11
  from zrb.util.string.conversion import to_kebab_case, to_pascal_case, to_snake_case
12
12
 
13
13
 
14
+ def get_add_permission_migration_script(ctx: AnyContext) -> str:
15
+ kebab_entity_name = to_kebab_case(ctx.input.entity)
16
+ return "\n".join(
17
+ [
18
+ "op.bulk_insert(",
19
+ ' metadata.tables["permissions"],',
20
+ " [",
21
+ f' {{"name": "{kebab_entity_name}:create", "description": "create {kebab_entity_name}"}},', # noqa
22
+ f' {{"name": "{kebab_entity_name}:read", "description": "read {kebab_entity_name}"}},', # noqa
23
+ f' {{"name": "{kebab_entity_name}:update", "description": "update {kebab_entity_name}"}},', # noqa
24
+ f' {{"name": "{kebab_entity_name}:delete", "description": "delete {kebab_entity_name}"}},', # noqa
25
+ " ]",
26
+ ")",
27
+ ]
28
+ )
29
+
30
+
31
+ def get_remove_permission_migration_script(ctx: AnyContext) -> str:
32
+ kebab_entity_name = to_kebab_case(ctx.input.entity)
33
+ return "\n".join(
34
+ [
35
+ "op.execute(",
36
+ ' sa.delete(metadata.tables["permissions"])',
37
+ ' .where(metadata.tables["permissions"].c.name.in_(',
38
+ f' "{kebab_entity_name}:create",',
39
+ f' "{kebab_entity_name}:read",',
40
+ f' "{kebab_entity_name}:update",',
41
+ f' "{kebab_entity_name}:delete",',
42
+ " ))",
43
+ ")",
44
+ ]
45
+ )
46
+
47
+
48
+ def get_auth_migration_version_dir() -> str:
49
+ return os.path.join(APP_DIR, "module", "auth", "migration", "versions")
50
+
51
+
52
+ def get_existing_auth_migration_file_names() -> list[str]:
53
+ migration_version_dir = get_auth_migration_version_dir()
54
+ return [
55
+ file_name
56
+ for file_name in os.listdir(migration_version_dir)
57
+ if file_name.endswith(".py")
58
+ ]
59
+
60
+
61
+ def get_existing_auth_migration_xcom_key(ctx: AnyContext) -> str:
62
+ snake_entity_name = to_snake_case(ctx.input.entity)
63
+ return f"existing_my_app_name_auth_{snake_entity_name}_migration"
64
+
65
+
14
66
  def is_in_app_schema_dir(ctx: AnyContext, file_path: str) -> bool:
15
67
  return file_path.startswith(
16
68
  os.path.join(APP_DIR, "schema", to_snake_case(ctx.input.entity))
17
69
  )
18
70
 
19
71
 
72
+ def is_in_module_entity_test_dir(ctx: AnyContext, file_path: str) -> bool:
73
+ return file_path.startswith(
74
+ os.path.join(
75
+ APP_DIR,
76
+ "test",
77
+ to_snake_case(ctx.input.module),
78
+ to_snake_case(ctx.input.entity),
79
+ )
80
+ )
81
+
82
+
20
83
  def is_in_module_entity_dir(ctx: AnyContext, file_path: str) -> bool:
21
84
  return file_path.startswith(
22
85
  os.path.join(
@@ -67,11 +67,11 @@ class MyEntityService(BaseService):
67
67
  @BaseService.route(
68
68
  "/api/v1/my-entities/bulk",
69
69
  methods=["put"],
70
- response_model=MyEntityResponse,
70
+ response_model=list[MyEntityResponse],
71
71
  )
72
72
  async def update_my_entity_bulk(
73
73
  self, my_entity_ids: list[str], data: MyEntityUpdateWithAudit
74
- ) -> MyEntityResponse:
74
+ ) -> list[MyEntityResponse]:
75
75
  await self.my_entity_repository.update_bulk(my_entity_ids, data)
76
76
  return await self.my_entity_repository.get_by_ids(my_entity_ids)
77
77
 
@@ -89,11 +89,11 @@ class MyEntityService(BaseService):
89
89
  @BaseService.route(
90
90
  "/api/v1/my-entities/bulk",
91
91
  methods=["delete"],
92
- response_model=MyEntityResponse,
92
+ response_model=list[MyEntityResponse],
93
93
  )
94
94
  async def delete_my_entity_bulk(
95
95
  self, my_entity_ids: list[str], deleted_by: str
96
- ) -> MyEntityResponse:
96
+ ) -> list[MyEntityResponse]:
97
97
  my_entities = await self.my_entity_repository.get_by_ids(my_entity_ids)
98
98
  await self.my_entity_repository.delete_bulk(my_entity_ids)
99
99
  return my_entities
@@ -106,6 +106,6 @@ class MyEntityService(BaseService):
106
106
  async def delete_my_entity(
107
107
  self, my_entity_id: str, deleted_by: str
108
108
  ) -> MyEntityResponse:
109
- my_entity = await self.my_entity_repository.get_by_id(my_entity.id)
109
+ my_entity = await self.my_entity_repository.get_by_id(my_entity_id)
110
110
  await self.my_entity_repository.delete(my_entity_id)
111
111
  return my_entity
@@ -39,6 +39,7 @@ class MultipleMyEntityResponse(BaseModel):
39
39
 
40
40
 
41
41
  class MyEntity(SQLModel, table=True):
42
+ __tablename__ = "my_entities"
42
43
  id: str = Field(default_factory=lambda: ulid.new().str, primary_key=True)
43
44
  created_at: datetime.datetime = Field(index=True)
44
45
  created_by: str = Field(index=True)
@@ -0,0 +1,53 @@
1
+ from fastapi.testclient import TestClient
2
+ from my_app_name.main import app
3
+ from my_app_name.test._util.access_token import get_admin_access_token
4
+
5
+
6
+ def test_create_my_entity():
7
+ client = TestClient(app, base_url="http://localhost")
8
+ access_token = get_admin_access_token()
9
+ new_my_entity_data = {
10
+ "my_column": "new-my-entity",
11
+ }
12
+ response = client.post(
13
+ "/api/v1/my-entities",
14
+ json=new_my_entity_data,
15
+ headers={"Authorization": f"Bearer {access_token}"},
16
+ )
17
+ assert response.status_code == 200
18
+ response_data = response.json()
19
+ assert response_data.get("id") is not None
20
+ assert response_data.get("id") != ""
21
+ assert response_data.get("my_column") == "new-my-entity"
22
+
23
+
24
+ def test_create_my_entity_bulk():
25
+ client = TestClient(app, base_url="http://localhost")
26
+ access_token = get_admin_access_token()
27
+ new_first_my_entity_data = {
28
+ "my_column": "new-my-entity-bulk-1",
29
+ }
30
+ new_second_my_entity_data = {
31
+ "my_column": "new-my-entity-bulk-2",
32
+ }
33
+ new_my_entity_data = [new_first_my_entity_data, new_second_my_entity_data]
34
+ response = client.post(
35
+ "/api/v1/my-entities/bulk",
36
+ json=new_my_entity_data,
37
+ headers={"Authorization": f"Bearer {access_token}"},
38
+ )
39
+ assert response.status_code == 200
40
+ response_data = response.json()
41
+ assert len(response_data) == 2
42
+ # Id should not be empty
43
+ assert response_data[0] is not None
44
+ assert response_data[0] != ""
45
+ assert response_data[1] is not None
46
+ assert response_data[1] != ""
47
+ # Data should match
48
+ assert new_first_my_entity_data["my_column"] in [
49
+ row["my_column"] for row in response_data
50
+ ]
51
+ assert new_second_my_entity_data["my_column"] in [
52
+ row["my_column"] for row in response_data
53
+ ]
@@ -0,0 +1,62 @@
1
+ from fastapi.testclient import TestClient
2
+ from my_app_name.main import app
3
+ from my_app_name.test._util.access_token import get_admin_access_token
4
+
5
+
6
+ def test_delete_my_entity():
7
+ client = TestClient(app, base_url="http://localhost")
8
+ access_token = get_admin_access_token()
9
+ new_my_entity_data = {
10
+ "my_column": "to-be-deleted-my-entity",
11
+ }
12
+ insert_response = client.post(
13
+ "/api/v1/my-entities",
14
+ json=new_my_entity_data,
15
+ headers={"Authorization": f"Bearer {access_token}"},
16
+ )
17
+ assert insert_response.status_code == 200
18
+ id = insert_response.json().get("id")
19
+ # deleting
20
+ response = client.delete(
21
+ f"/api/v1/my-entities/{id}", headers={"Authorization": f"Bearer {access_token}"}
22
+ )
23
+ assert response.status_code == 200
24
+ response_data = response.json()
25
+ assert response_data.get("id") == id
26
+ assert response_data.get("my_column") == "to-be-deleted-my-entity"
27
+
28
+
29
+ def test_delete_my_entity_bulk():
30
+ client = TestClient(app, base_url="http://localhost")
31
+ access_token = get_admin_access_token()
32
+ new_first_my_entity_data = {
33
+ "my_column": "to-be-deleted-my-entity-bulk-1",
34
+ }
35
+ new_second_my_entity_data = {
36
+ "my_column": "to-be-deleted-my-entity-bulk-2",
37
+ }
38
+ new_my_entity_data = [new_first_my_entity_data, new_second_my_entity_data]
39
+ insert_response = client.post(
40
+ "/api/v1/my-entities/bulk",
41
+ json=new_my_entity_data,
42
+ headers={"Authorization": f"Bearer {access_token}"},
43
+ )
44
+ assert insert_response.status_code == 200
45
+ ids = [row["id"] for row in insert_response.json()]
46
+ # deleting (use client.request since client.delete doesn't support json param)
47
+ response = client.request(
48
+ "DELETE",
49
+ f"/api/v1/my-entities/bulk",
50
+ json=ids,
51
+ headers={"Authorization": f"Bearer {access_token}"},
52
+ )
53
+ assert response.status_code == 200
54
+ response_data = response.json()
55
+ # Data should match
56
+ assert len([row["id"] for row in response_data if row["id"] in ids]) == 2
57
+ assert new_first_my_entity_data["my_column"] in [
58
+ row["my_column"] for row in response_data
59
+ ]
60
+ assert new_second_my_entity_data["my_column"] in [
61
+ row["my_column"] for row in response_data
62
+ ]
@@ -0,0 +1,65 @@
1
+ from fastapi.testclient import TestClient
2
+ from my_app_name.main import app
3
+ from my_app_name.test._util.access_token import get_admin_access_token
4
+
5
+
6
+ def test_read_my_entity_by_id():
7
+ client = TestClient(app, base_url="http://localhost")
8
+ access_token = get_admin_access_token()
9
+ new_my_entity_data = {
10
+ "my_column": "to-be-read-my-entity",
11
+ }
12
+ insert_response = client.post(
13
+ "/api/v1/my-entities",
14
+ json=new_my_entity_data,
15
+ headers={"Authorization": f"Bearer {access_token}"},
16
+ )
17
+ assert insert_response.status_code == 200
18
+ id = insert_response.json().get("id")
19
+ # fetching
20
+ response = client.get(
21
+ f"/api/v1/my-entities/{id}", headers={"Authorization": f"Bearer {access_token}"}
22
+ )
23
+ assert response.status_code == 200
24
+ response_data = response.json()
25
+ assert response_data.get("id") == id
26
+ assert response_data.get("my_column") == "to-be-read-my-entity"
27
+
28
+
29
+ def test_read_my_entity_bulk():
30
+ client = TestClient(app, base_url="http://localhost")
31
+ access_token = get_admin_access_token()
32
+ new_first_my_entity_data = {
33
+ "my_column": "to-be-read-my-entity-bulk-1",
34
+ }
35
+ new_second_my_entity_data = {
36
+ "my_column": "to-be-read-my-entity-bulk-2",
37
+ }
38
+ new_my_entity_data = [new_first_my_entity_data, new_second_my_entity_data]
39
+ insert_response = client.post(
40
+ "/api/v1/my-entities/bulk",
41
+ json=new_my_entity_data,
42
+ headers={"Authorization": f"Bearer {access_token}"},
43
+ )
44
+ assert insert_response.status_code == 200
45
+ ids = [row["id"] for row in insert_response.json()]
46
+ # fetching
47
+ response = client.get(
48
+ f"/api/v1/my-entities",
49
+ params={
50
+ "filter": "my_column:like:to-be-read-my-entity-bulk-%",
51
+ },
52
+ headers={"Authorization": f"Bearer {access_token}"},
53
+ )
54
+ assert response.status_code == 200
55
+ response_data_count = response.json()["count"]
56
+ assert response_data_count == 2
57
+ response_data = response.json()["data"]
58
+ # Data should match
59
+ assert len([row["id"] for row in response_data if row["id"] in ids]) == 2
60
+ assert new_first_my_entity_data["my_column"] in [
61
+ row["my_column"] for row in response_data
62
+ ]
63
+ assert new_second_my_entity_data["my_column"] in [
64
+ row["my_column"] for row in response_data
65
+ ]
@@ -0,0 +1,61 @@
1
+ from fastapi.testclient import TestClient
2
+ from my_app_name.main import app
3
+ from my_app_name.test._util.access_token import get_admin_access_token
4
+
5
+
6
+ def test_update_my_entity():
7
+ client = TestClient(app, base_url="http://localhost")
8
+ access_token = get_admin_access_token()
9
+ new_my_entity_data = {
10
+ "my_column": "to-be-updated-my-entity",
11
+ }
12
+ insert_response = client.post(
13
+ "/api/v1/my-entities",
14
+ json=new_my_entity_data,
15
+ headers={"Authorization": f"Bearer {access_token}"},
16
+ )
17
+ assert insert_response.status_code == 200
18
+ id = insert_response.json().get("id")
19
+ # updating
20
+ updated_my_entity_data = {
21
+ "my_column": "updated-my-entity",
22
+ }
23
+ response = client.put(
24
+ f"/api/v1/my-entities/{id}",
25
+ json=updated_my_entity_data,
26
+ headers={"Authorization": f"Bearer {access_token}"},
27
+ )
28
+ assert response.status_code == 200
29
+ response_data = response.json()
30
+ assert response_data.get("id") == id
31
+ assert response_data.get("my_column") == "updated-my-entity"
32
+
33
+
34
+ def test_update_my_entity_bulk():
35
+ client = TestClient(app, base_url="http://localhost")
36
+ access_token = get_admin_access_token()
37
+ new_first_my_entity_data = {
38
+ "my_column": "to-be-updated-my-entity-bulk-1",
39
+ }
40
+ insert_response = client.post(
41
+ "/api/v1/my-entities/bulk",
42
+ json=[new_first_my_entity_data],
43
+ headers={"Authorization": f"Bearer {access_token}"},
44
+ )
45
+ assert insert_response.status_code == 200
46
+ ids = [row["id"] for row in insert_response.json()]
47
+ # updating (we only test with one data)
48
+ updated_my_entity_data = {"my_column": "updated-my-entity-bulk-1"}
49
+ response = client.put(
50
+ f"/api/v1/my-entities/bulk",
51
+ json={
52
+ "my_entity_ids": ids,
53
+ "data": updated_my_entity_data,
54
+ },
55
+ headers={"Authorization": f"Bearer {access_token}"},
56
+ )
57
+ assert response.status_code == 200
58
+ response_data = response.json()
59
+ assert len(response_data) == 1
60
+ response_data[0].get("id") == ids[0]
61
+ response_data[0].get("my_column") == updated_my_entity_data["my_column"]