liberty-framework 6.0.44__tar.gz → 6.0.46__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 (226) hide show
  1. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/MANIFEST.in +1 -0
  2. liberty_framework-6.0.46/PKG-INFO +224 -0
  3. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/README.md +3 -0
  4. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__pycache__/api_controller.cpython-312.pyc +0 -0
  5. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__pycache__/setup_controller.cpython-312.pyc +0 -0
  6. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/api_controller.py +3 -1
  7. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/setup_controller.py +7 -1
  8. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/files/logs-frontend-json.log +3 -0
  9. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/files/logs-frontend-text.log +12 -0
  10. liberty_framework-6.0.46/app/models/__pycache__/setup.cpython-312.pyc +0 -0
  11. liberty_framework-6.0.46/app/models/setup.py +44 -0
  12. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/__pycache__/api_routes.cpython-312.pyc +0 -0
  13. liberty_framework-6.0.46/app/routes/__pycache__/setup_routes.cpython-312.pyc +0 -0
  14. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/api_routes.py +63 -1
  15. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/setup_routes.py +40 -2
  16. liberty_framework-6.0.46/app/services/__pycache__/api_rest.cpython-312.pyc +0 -0
  17. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/api_rest.py +96 -5
  18. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/install.cpython-312.pyc +0 -0
  19. liberty_framework-6.0.46/app/setup/services/__pycache__/setup.cpython-312.pyc +0 -0
  20. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/install.py +4 -0
  21. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/setup.py +141 -8
  22. liberty_framework-6.0.46/liberty_framework.egg-info/PKG-INFO +224 -0
  23. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/setup.py +8 -1
  24. liberty_framework-6.0.44/PKG-INFO +0 -79
  25. liberty_framework-6.0.44/app/models/__pycache__/setup.cpython-312.pyc +0 -0
  26. liberty_framework-6.0.44/app/models/setup.py +0 -17
  27. liberty_framework-6.0.44/app/routes/__pycache__/setup_routes.cpython-312.pyc +0 -0
  28. liberty_framework-6.0.44/app/services/__pycache__/api_rest.cpython-312.pyc +0 -0
  29. liberty_framework-6.0.44/app/setup/services/__pycache__/setup.cpython-312.pyc +0 -0
  30. liberty_framework-6.0.44/liberty_framework.egg-info/PKG-INFO +0 -79
  31. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/LICENSE +0 -0
  32. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/.DS_Store +0 -0
  33. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/__init__.py +0 -0
  34. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/__pycache__/__init__.cpython-312.pyc +0 -0
  35. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/__pycache__/main.cpython-312.pyc +0 -0
  36. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/__pycache__/test.cpython-312.pyc +0 -0
  37. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/README +0 -0
  38. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/__pycache__/__init__.cpython-312.pyc +0 -0
  39. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/__pycache__/env.cpython-312.pyc +0 -0
  40. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/env.py +0 -0
  41. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/script.py.mako +0 -0
  42. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/README +0 -0
  43. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/07301a1e0a40_upgrade.cpython-312.pyc +0 -0
  44. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/6d15b02a5d62_upgrade.cpython-312.pyc +0 -0
  45. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/97ce2af21b7b_upgrade.cpython-312.pyc +0 -0
  46. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/abebaaa0b8b5_upgrade.cpython-312.pyc +0 -0
  47. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/dd5d460a6436_upgrade.cpython-312.pyc +0 -0
  48. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/ecb84318e633_upgrade.cpython-312.pyc +0 -0
  49. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/f93e0f531f2a_upgrade.cpython-312.pyc +0 -0
  50. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic/versions/__pycache__/feb86bf02dac_upgrade.cpython-312.pyc +0 -0
  51. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/alembic.ini +0 -0
  52. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/__init__.py +0 -0
  53. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/__pycache__/__init__.cpython-312.pyc +0 -0
  54. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/__pycache__/oracle.cpython-312.pyc +0 -0
  55. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/__pycache__/postgres.cpython-312.pyc +0 -0
  56. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/oracle.py +0 -0
  57. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/business/postgres.py +0 -0
  58. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/config/__init__.py +0 -0
  59. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/config/__pycache__/__init__.cpython-312.pyc +0 -0
  60. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/config/__pycache__/config.cpython-312.pyc +0 -0
  61. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/config/files/liberty.ini +0 -0
  62. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__init__.py +0 -0
  63. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__pycache__/__init__.cpython-312.pyc +0 -0
  64. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__pycache__/react_controller.cpython-312.pyc +0 -0
  65. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/__pycache__/socket_controller.cpython-312.pyc +0 -0
  66. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/controllers/socket_controller.py +0 -0
  67. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__init__.py +0 -0
  68. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/__init__.cpython-312.pyc +0 -0
  69. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/base_dao.cpython-312.pyc +0 -0
  70. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/config.cpython-312.pyc +0 -0
  71. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/dao_factory.cpython-312.pyc +0 -0
  72. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/ora_dao.cpython-312.pyc +0 -0
  73. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/oracle_dao.cpython-312.pyc +0 -0
  74. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/pg_dao.cpython-312.pyc +0 -0
  75. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/__pycache__/postgres_dao.cpython-312.pyc +0 -0
  76. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/base_dao.py +0 -0
  77. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/ora_dao.py +0 -0
  78. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/database/pg_dao.py +0 -0
  79. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/.DS_Store +0 -0
  80. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/__init__.py +0 -0
  81. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/__pycache__/__init__.cpython-312.pyc +0 -0
  82. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/logs/__pycache__/logs.cpython-312.pyc +0 -0
  83. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/main.py +0 -0
  84. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__init__.py +0 -0
  85. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/__init__.cpython-312.pyc +0 -0
  86. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/ai.cpython-312.pyc +0 -0
  87. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/apidb.cpython-312.pyc +0 -0
  88. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/applications.cpython-312.pyc +0 -0
  89. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/auth.cpython-312.pyc +0 -0
  90. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/base.cpython-312.pyc +0 -0
  91. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/checkdb.cpython-312.pyc +0 -0
  92. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/modules.cpython-312.pyc +0 -0
  93. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/pool.cpython-312.pyc +0 -0
  94. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/__pycache__/themes.cpython-312.pyc +0 -0
  95. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/ai.py +0 -0
  96. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/apidb.py +0 -0
  97. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/applications.py +0 -0
  98. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/auth.py +0 -0
  99. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/base.py +0 -0
  100. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/modules.py +0 -0
  101. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/pool.py +0 -0
  102. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/models/themes.py +0 -0
  103. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/.DS_Store +0 -0
  104. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/__init__.py +0 -0
  105. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/__pycache__/__init__.cpython-312.pyc +0 -0
  106. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/__init__.py +0 -0
  107. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/__pycache__/__init__.cpython-312.pyc +0 -0
  108. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/__pycache__/dump.cpython-312.pyc +0 -0
  109. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/airflow.dump +0 -0
  110. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/gitea.dump +0 -0
  111. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/keycloak.dump +0 -0
  112. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/liberty.dump +0 -0
  113. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/libnetl.dump +0 -0
  114. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/libnjde.dump +0 -0
  115. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/libnsx1.dump +0 -0
  116. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/nomajde.dump +0 -0
  117. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/postgres/dump/nomasx1.dump +0 -0
  118. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/__init__.py +0 -0
  119. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/__pycache__/__init__.cpython-312.pyc +0 -0
  120. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/background_ly-VdfFMP8a.jpg +0 -0
  121. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/index-CBVjFKmW.js +0 -0
  122. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/index-CBVjFKmW.js.map +0 -0
  123. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/index.es-8R5QRthQ-drU8K1aL.js +0 -0
  124. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/index.es-8R5QRthQ-drU8K1aL.js.map +0 -0
  125. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/logo_ly-HGj2PB94.svg +0 -0
  126. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/purify.es-CKk_t3XZ-CHJWMLL4.js +0 -0
  127. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/assets/purify.es-CKk_t3XZ-CHJWMLL4.js.map +0 -0
  128. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/frontend/index.html +0 -0
  129. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/offline/assets/logo_ly.png +0 -0
  130. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/offline/offline.html +0 -0
  131. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/index.html +0 -0
  132. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/setup/assets/background_ly-VdfFMP8a.jpg +0 -0
  133. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/setup/assets/index-BBGAGXd2.css +0 -0
  134. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/setup/assets/index-BnpY-7P6.js +0 -0
  135. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/setup/assets/index-BnpY-7P6.js.map +0 -0
  136. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/public/setup/setup/assets/logo_ly-HGj2PB94.svg +0 -0
  137. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/__init__.py +0 -0
  138. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/__pycache__/__init__.cpython-312.pyc +0 -0
  139. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/__pycache__/react_routes.cpython-312.pyc +0 -0
  140. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/__pycache__/socket_routes.cpython-312.pyc +0 -0
  141. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/react_routes.py +0 -0
  142. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/routes/socket_routes.py +0 -0
  143. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/__init__.py +0 -0
  144. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/__pycache__/__init__.cpython-312.pyc +0 -0
  145. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/__pycache__/alembic.cpython-312.pyc +0 -0
  146. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/__pycache__/db_pool.cpython-312.pyc +0 -0
  147. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/__pycache__/db_query.cpython-312.pyc +0 -0
  148. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/db_pool.py +0 -0
  149. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/services/db_query.py +0 -0
  150. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/__init__.py +0 -0
  151. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/__pycache__/__init__.cpython-312.pyc +0 -0
  152. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/__init__.py +0 -0
  153. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/__pycache__/__init__.cpython-312.pyc +0 -0
  154. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/__pycache__/data.cpython-312.pyc +0 -0
  155. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/liberty.json +0 -0
  156. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/libnetl.json +0 -0
  157. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/libnjde.json +0 -0
  158. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/libnsx1.json +0 -0
  159. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/data/nomasx1.json +0 -0
  160. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__init__.py +0 -0
  161. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/__init__.cpython-312.pyc +0 -0
  162. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/airflow.cpython-312.pyc +0 -0
  163. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/liberty.cpython-312.pyc +0 -0
  164. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/libnetl.cpython-312.pyc +0 -0
  165. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/libnjde.cpython-312.pyc +0 -0
  166. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/libnsx1.cpython-312.pyc +0 -0
  167. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/models.cpython-312.pyc +0 -0
  168. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/__pycache__/nomasx1.cpython-312.pyc +0 -0
  169. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/liberty.py +0 -0
  170. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/models/nomasx1.py +0 -0
  171. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__init__.py +0 -0
  172. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/__init__.cpython-312.pyc +0 -0
  173. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/alembic.cpython-312.pyc +0 -0
  174. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/dump.cpython-312.pyc +0 -0
  175. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/init.cpython-312.pyc +0 -0
  176. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/__pycache__/models.cpython-312.pyc +0 -0
  177. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/alembic.py +0 -0
  178. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/dump.py +0 -0
  179. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/setup/services/models.py +0 -0
  180. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__init__.py +0 -0
  181. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  182. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/common.cpython-312.pyc +0 -0
  183. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/encrypt.cpython-312.pyc +0 -0
  184. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/jwt.cpython-312.pyc +0 -0
  185. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/logs.cpython-312.pyc +0 -0
  186. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/__pycache__/models.cpython-312.pyc +0 -0
  187. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/common.py +0 -0
  188. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/encrypt.py +0 -0
  189. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/jwt.py +0 -0
  190. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/logs.py +0 -0
  191. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/app/utils/test.py +0 -0
  192. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/liberty_framework.egg-info/SOURCES.txt +0 -0
  193. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/liberty_framework.egg-info/dependency_links.txt +0 -0
  194. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/liberty_framework.egg-info/entry_points.txt +0 -0
  195. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/liberty_framework.egg-info/requires.txt +0 -0
  196. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/liberty_framework.egg-info/top_level.txt +0 -0
  197. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/pyproject.toml +0 -0
  198. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/requirements.txt +0 -0
  199. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/setup.cfg +0 -0
  200. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/__init__.py +0 -0
  201. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  202. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/__pycache__/conftest.cpython-312-pytest-8.3.4.pyc +0 -0
  203. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/__pycache__/main.cpython-312.pyc +0 -0
  204. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/__pycache__/test.cpython-312.pyc +0 -0
  205. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/conftest.py +0 -0
  206. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/main.py +0 -0
  207. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__init__.py +0 -0
  208. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/__init__.cpython-312.pyc +0 -0
  209. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_auth_token.cpython-312-pytest-8.3.4.pyc +0 -0
  210. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_auth_user.cpython-312-pytest-8.3.4.pyc +0 -0
  211. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_db_check.cpython-312-pytest-8.3.4.pyc +0 -0
  212. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_db_close.cpython-312-pytest-8.3.4.pyc +0 -0
  213. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_db_open.cpython-312-pytest-8.3.4.pyc +0 -0
  214. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_fmw_applications.cpython-312-pytest-8.3.4.pyc +0 -0
  215. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_fmw_encrypt.cpython-312-pytest-8.3.4.pyc +0 -0
  216. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_fmw_modules.cpython-312-pytest-8.3.4.pyc +0 -0
  217. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/__pycache__/test_fmw_themes.cpython-312-pytest-8.3.4.pyc +0 -0
  218. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_auth_token.py +0 -0
  219. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_auth_user.py +0 -0
  220. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_db_check.py +0 -0
  221. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_db_close.py +0 -0
  222. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_db_open.py +0 -0
  223. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_fmw_applications.py +0 -0
  224. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_fmw_encrypt.py +0 -0
  225. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_fmw_modules.py +0 -0
  226. {liberty_framework-6.0.44 → liberty_framework-6.0.46}/tests/scenarios/test_fmw_themes.py +0 -0
@@ -1,5 +1,6 @@
1
1
  include requirements.txt
2
2
  include LICENSE
3
+ include README.md
3
4
  recursive-include app *
4
5
  recursive-include tests *
5
6
  exclude app/config/files/db.properties
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.2
2
+ Name: liberty-framework
3
+ Version: 6.0.46
4
+ Summary: Liberty Framework
5
+ Author: Franck Blettner
6
+ Author-email: franck.blettner@nomana-it.fr
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Framework :: FastAPI
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: alembic==1.14.1
14
+ Requires-Dist: allure-pytest==2.13.5
15
+ Requires-Dist: allure-python-commons==2.13.5
16
+ Requires-Dist: annotated-types==0.7.0
17
+ Requires-Dist: anyio==4.8.0
18
+ Requires-Dist: asyncpg==0.30.0
19
+ Requires-Dist: attrs==25.1.0
20
+ Requires-Dist: bidict==0.23.1
21
+ Requires-Dist: certifi==2024.12.14
22
+ Requires-Dist: cffi==1.17.1
23
+ Requires-Dist: click==8.1.8
24
+ Requires-Dist: cryptography==44.0.0
25
+ Requires-Dist: dnspython==2.7.0
26
+ Requires-Dist: email_validator==2.2.0
27
+ Requires-Dist: fastapi==0.115.7
28
+ Requires-Dist: fastapi-cli==0.0.7
29
+ Requires-Dist: fastapi-socketio==0.0.10
30
+ Requires-Dist: greenlet==3.1.1
31
+ Requires-Dist: h11==0.14.0
32
+ Requires-Dist: httpcore==1.0.7
33
+ Requires-Dist: httptools==0.6.4
34
+ Requires-Dist: httpx==0.28.1
35
+ Requires-Dist: idna==3.10
36
+ Requires-Dist: inflect==7.5.0
37
+ Requires-Dist: iniconfig==2.0.0
38
+ Requires-Dist: Jinja2==3.1.5
39
+ Requires-Dist: Mako==1.3.8
40
+ Requires-Dist: markdown-it-py==3.0.0
41
+ Requires-Dist: MarkupSafe==3.0.2
42
+ Requires-Dist: mdurl==0.1.2
43
+ Requires-Dist: more-itertools==10.6.0
44
+ Requires-Dist: oracledb==2.4.1
45
+ Requires-Dist: packaging==24.2
46
+ Requires-Dist: pluggy==1.5.0
47
+ Requires-Dist: psycopg2-binary==2.9.10
48
+ Requires-Dist: pycparser==2.22
49
+ Requires-Dist: pydantic==2.10.6
50
+ Requires-Dist: pydantic_core==2.27.2
51
+ Requires-Dist: Pygments==2.19.1
52
+ Requires-Dist: PyJWT==2.10.1
53
+ Requires-Dist: pytest==8.3.4
54
+ Requires-Dist: python-dotenv==1.0.1
55
+ Requires-Dist: python-engineio==4.11.2
56
+ Requires-Dist: python-multipart==0.0.20
57
+ Requires-Dist: python-socketio==5.12.1
58
+ Requires-Dist: PyYAML==6.0.2
59
+ Requires-Dist: rich==13.9.4
60
+ Requires-Dist: rich-toolkit==0.13.2
61
+ Requires-Dist: setuptools==75.8.0
62
+ Requires-Dist: shellingham==1.5.4
63
+ Requires-Dist: simple-websocket==1.1.0
64
+ Requires-Dist: sniffio==1.3.1
65
+ Requires-Dist: SQLAlchemy==2.0.37
66
+ Requires-Dist: starlette==0.45.3
67
+ Requires-Dist: typeguard==4.4.1
68
+ Requires-Dist: typer==0.15.1
69
+ Requires-Dist: typing_extensions==4.12.2
70
+ Requires-Dist: uvicorn==0.34.0
71
+ Requires-Dist: uvloop==0.21.0
72
+ Requires-Dist: watchfiles==1.0.4
73
+ Requires-Dist: websockets==14.2
74
+ Requires-Dist: wsproto==1.2.0
75
+ Dynamic: author
76
+ Dynamic: author-email
77
+ Dynamic: classifier
78
+ Dynamic: description
79
+ Dynamic: description-content-type
80
+ Dynamic: requires-dist
81
+ Dynamic: requires-python
82
+ Dynamic: summary
83
+
84
+ # 📖 Liberty Framework
85
+ ### A Scalable and Extensible FastAPI and React Framework for Business Applications
86
+
87
+ ## Announcements
88
+ - **Release 6.0.46**: Implement call for custom rest api, add drop and create database for framework
89
+
90
+ 🚀 **Liberty Framework** is a powerful, modular, and extensible **FastAPI-based and React-based framework** designed to streamline backend development for business applications. It provides **database management, authentication, real-time socket communication, and more**, making it easy to deploy and scale enterprise solutions.
91
+
92
+ - Online demo is available at [https://liberty.nomana-it.fr](https://liberty.nomana-it.fr)
93
+ - Web page at: [https://nomana-it.fr](https://nomana-it.fr)
94
+
95
+ ```ini
96
+ Login = demo
97
+ Password = demo
98
+ Appplication = LIBERTY, NOMASX-1 and NOMAJDE
99
+ ```
100
+
101
+ ![liberty](https://github.com/user-attachments/assets/74479874-d7ba-469a-b525-b468529c4432)
102
+
103
+ ---
104
+
105
+ ## ✨ Features
106
+ ✅ **FastAPI-based** – High-performance backend with asynchronous capabilities.
107
+ ✅ **React-based** – Beautiful and responsive frontend without any dependencies to components.
108
+ ✅ **Database Management** – SQLAlchemy, Alembic for migrations, and PostgreSQL support.
109
+ ✅ **Real-Time Communication** – Integrated WebSocket (Socket.IO) for live updates.
110
+ ✅ **Authentication & Security** – JWT authentication, encryption, and role-based access.
111
+ ✅ **Automated Database Migrations** – Alembic versioning for multiple databases.
112
+ ✅ **Easy Installation & Deployment** – Available as a **Python package** and **Docker image**.
113
+ ✅ **Extensible** – Plugin-based architecture to support future enhancements.
114
+
115
+ ## ✨ Enterprise additional features
116
+ - 🌐 **Traefik**: A powerful reverse proxy for routing and load balancing.
117
+ - ⚙️ **AirFlow**: Automate and manage workflows effortlessly.
118
+ - 🐘 **pgAdmin**: Manage your PostgreSQL database visually with ease.
119
+ - 🔐 **KeyCloak**: OIDC Service for authentication
120
+ - 📂 **Gitea**: Git Repository to manage dags, plugins, backup
121
+
122
+ ---
123
+
124
+ ## 📦 Installation
125
+
126
+ ### Requirements
127
+ A PostgreSQL 16 database is required. You can either:
128
+ - Create a Docker image based on postgres:16, or
129
+ - Install PostgreSQL 16 directly on your host system.
130
+
131
+ For easier setup and to ensure compatibility with future enterprise features, it is recommended to create a database with a user named liberty.
132
+
133
+ ### **Option 1: Install via `pip`**
134
+ ```bash
135
+ pip install liberty-framework
136
+ ```
137
+
138
+
139
+ ---
140
+
141
+ ## 🚀 Quick Start
142
+ After installation, you can **start the framework** with:
143
+ ```bash
144
+ liberty-start
145
+ ```
146
+
147
+ ---
148
+
149
+ ## ⚙️ URL
150
+
151
+ ### Installation URL
152
+ - Setup: `http://<your_host>:<your_port>/setup`
153
+ - Application: `http://<your_host>:<your_port>`
154
+ - API Documentation: `http://<your_host>:<your_port>/api`
155
+ - Swagger: `http://<your_host>:<your_port>/api/test`
156
+
157
+ ### Demo URL
158
+ - Setup: [https://liberty.nomana-it.fr/setup](https://liberty.nomana-it.fr/setup)
159
+ - Application: [https://liberty.nomana-it.fr](https://liberty.nomana-it.fr)
160
+ - API Documentation: [https://liberty.nomana-it.fr/api](https://liberty.nomana-it.fr/api)
161
+ - Swagger: [https://liberty.nomana-it.fr/api/test](https://liberty.nomana-it.fr/api/test)
162
+
163
+ ---
164
+
165
+ ## 📖 Documentation
166
+ - **Reference**: [https://docs.nomana-it.fr/liberty](https://docs.nomana-it.fr/liberty)
167
+
168
+ ---
169
+
170
+ ## 🤝 Contributing
171
+ We welcome contributions! Here’s how you can help:
172
+ 1. **Fork** this repository.
173
+ 2. **Clone** your fork:
174
+ ```bash
175
+ git clone https://github.com/fblettner/liberty-framework.git
176
+ ```
177
+ 3. **Create a new branch** for your feature:
178
+ ```bash
179
+ git checkout -b feature-name
180
+ ```
181
+ 4. **Commit your changes**:
182
+ ```bash
183
+ git commit -m "Add new feature"
184
+ ```
185
+ 5. **Push to your fork** and **submit a Pull Request**:
186
+ ```bash
187
+ git push origin feature-name
188
+ ```
189
+ 6. **Join discussions** and help improve the framework!
190
+
191
+ ---
192
+
193
+ ## 💖 Sponsorship
194
+ If you find **Liberty Framework** useful and would like to support its development, consider sponsoring us. Your contributions help maintain the project, add new features, and improve the documentation. Every contribution, big or small, is greatly appreciated!
195
+
196
+ To sponsor, visit: **[GitHub Sponsors](https://github.com/sponsors/fblettner)** or reach out to us directly.
197
+
198
+ ---
199
+
200
+ ## 📜 License
201
+ Liberty Framework is **open-source software** licensed under the **AGPL License**.
202
+ Enterprise features require a license:
203
+ - **NOMASX-1**: Security management, Segregation of duties and licenses compliancy
204
+ - **NOMAJDE** JD-Edwards integration
205
+ - **Airflow Plugins**: Automatic database backup, database synchronisation...
206
+ - **Liberty AI**: Currently, OpenAI is set into the configuration, you have to use your own account without enterprise features license
207
+
208
+ ---
209
+
210
+ ## 📧 Contact & Support
211
+ If you have questions or need support:
212
+ - **Email**: [franck.blettner@nomana-it.fr](mailto:franck.blettner@nomana-it.fr)
213
+ - **GitHub Issues**: [Report an issue](https://github.com/fblettner/liberty-framework/issues)
214
+ - **Discussions**: Join the conversation in the **GitHub Discussions** section.
215
+
216
+ ---
217
+
218
+ ### ⭐ If you find Liberty Framework useful, consider giving it a star on GitHub!
219
+ ```bash
220
+ git clone https://github.com/fblettner/liberty-framework.git
221
+ cd liberty-framework
222
+ ```
223
+
224
+ 🚀 **Let's build the future of business applications together!** 🚀
@@ -1,6 +1,9 @@
1
1
  # 📖 Liberty Framework
2
2
  ### A Scalable and Extensible FastAPI and React Framework for Business Applications
3
3
 
4
+ ## Announcements
5
+ - **Release 6.0.46**: Implement call for custom rest api, add drop and create database for framework
6
+
4
7
  🚀 **Liberty Framework** is a powerful, modular, and extensible **FastAPI-based and React-based framework** designed to streamline backend development for business applications. It provides **database management, authentication, real-time socket communication, and more**, making it easy to deploy and scale enterprise solutions.
5
8
 
6
9
  - Online demo is available at [https://liberty.nomana-it.fr](https://liberty.nomana-it.fr)
@@ -76,4 +76,6 @@ class ApiController:
76
76
 
77
77
  async def ai_welcome(self, req: Request):
78
78
  return await self.apiRest.ai_welcome(req)
79
-
79
+
80
+ async def rest(self, req: Request):
81
+ return await self.apiRest.rest(req)
@@ -37,4 +37,10 @@ class SetupController:
37
37
  return self.alembic.revision(req)
38
38
 
39
39
  def current(self, req: Request):
40
- return self.alembic.current(req)
40
+ return self.alembic.current(req)
41
+
42
+ async def create(self, req: Request):
43
+ return await self.setupRest.create_database(req)
44
+
45
+ async def drop(self, req: Request):
46
+ return await self.setupRest.drop_database(req)
@@ -201,3 +201,6 @@
201
201
  {"timestamp": "2025-02-20T09:15:08.302464+00:00", "transactionName": "QueryDAO.applications", "level": "info", "method": "GET", "url": "http://localhost:5173/api/fmw/applications", "data": {"message": "Request failed with status code 500: undefined"}, "message": "Framework: Load Applications", "category": "http", "feature": "database-api", "isException": true}
202
202
  {"timestamp": "2025-02-20T09:15:08.303872+00:00", "transactionName": "loginUtils.getApplications", "level": "info", "method": null, "url": null, "data": {"status": "error", "items": [{"message": "Request failed with status code 500: undefined"}]}, "message": "Login: Failed to fetch applications", "category": "debug", "feature": "console", "isException": true}
203
203
  {"timestamp": "2025-02-20T09:20:53.819597+00:00", "transactionName": "QueryDAO.login", "level": "info", "method": "GET", "url": "http://localhost:5173/api/auth/user?user=admin&pool=libnsx1&mode=session", "data": {"message": "Request failed with status code 500: Error creating pool: Error creating pool: [Errno 8] nodename nor servname provided, or not known"}, "message": "User Login: Get User Properties", "category": "http", "feature": "database-api", "isException": true}
204
+ {"timestamp": "2025-02-26T15:16:17.684769+00:00", "transactionName": "APIDAO.post", "level": "info", "method": "POST", "url": "http://localhost:5173/api/rest?pool=default&mode=session&api=1", "data": null, "message": "REST: Failed POST API call", "category": "http", "feature": "rest-api", "isException": true}
205
+ {"timestamp": "2025-02-26T16:00:40.041233+00:00", "transactionName": "APIDAO.post", "level": "info", "method": "POST", "url": "http://localhost:5173/api/rest?pool=default&mode=session&api=1", "data": null, "message": "REST: Failed POST API call", "category": "http", "feature": "rest-api", "isException": true}
206
+ {"timestamp": "2025-02-26T16:27:09.583000+00:00", "transactionName": "APIDAO.post", "level": "info", "method": "POST", "url": "http://localhost:5173/api/rest?pool=default&mode=session&api=1", "data": null, "message": "REST: Failed POST API call", "category": "http", "feature": "rest-api", "isException": true}
@@ -810,3 +810,15 @@ Category: debug, Feature: console, IsException: True
810
810
  Method: GET, URL: http://localhost:5173/api/auth/user?user=admin&pool=libnsx1&mode=session
811
811
  Category: http, Feature: database-api, IsException: True
812
812
 
813
+ [2025-02-26T15:16:17.684769+00:00] [info] APIDAO.post - REST: Failed POST API call
814
+ Method: POST, URL: http://localhost:5173/api/rest?pool=default&mode=session&api=1
815
+ Category: http, Feature: rest-api, IsException: True
816
+
817
+ [2025-02-26T16:00:40.041233+00:00] [info] APIDAO.post - REST: Failed POST API call
818
+ Method: POST, URL: http://localhost:5173/api/rest?pool=default&mode=session&api=1
819
+ Category: http, Feature: rest-api, IsException: True
820
+
821
+ [2025-02-26T16:27:09.583000+00:00] [info] APIDAO.post - REST: Failed POST API call
822
+ Method: POST, URL: http://localhost:5173/api/rest?pool=default&mode=session&api=1
823
+ Category: http, Feature: rest-api, IsException: True
824
+
@@ -0,0 +1,44 @@
1
+ from pydantic import BaseModel
2
+
3
+
4
+ class SetupRequest(BaseModel):
5
+ host: str
6
+ port: int
7
+ database: str
8
+ user: str
9
+ password: str
10
+
11
+ SETUP_ERROR_MESSAGE = "Setup failed"
12
+ SETUP_RESPONSE_DESCRIPTION = "Installation successful"
13
+ SETUP_RESPONSE_EXAMPLE = {
14
+ "items": [],
15
+ "status": "success",
16
+ "count": 0
17
+ }
18
+
19
+ class CreateRequest(BaseModel):
20
+ host: str
21
+ port: int
22
+ database: str
23
+ user: str
24
+ password: str
25
+
26
+ CREATE_ERROR_MESSAGE = "Create database failed"
27
+ CREATE_RESPONSE_DESCRIPTION = "Create database successful"
28
+ CREATE_RESPONSE_EXAMPLE = {
29
+ "items": [],
30
+ "status": "success",
31
+ "count": 0
32
+ }
33
+
34
+ class DropRequest(BaseModel):
35
+ database: str
36
+ user: str
37
+
38
+ DROP_ERROR_MESSAGE = "Drop database failed"
39
+ DROP_RESPONSE_DESCRIPTION = "Drop Database successful"
40
+ DROP_RESPONSE_EXAMPLE = {
41
+ "items": [],
42
+ "status": "success",
43
+ "count": 0
44
+ }
@@ -230,7 +230,7 @@ def setup_api_routes(app, controller: ApiController, jwt: JWT):
230
230
  ):
231
231
  return await controller.close(req)
232
232
 
233
-
233
+
234
234
  @router.get(
235
235
  "/db/query",
236
236
  response_model=GetSuccessResponse, # Specify the success response schema
@@ -426,4 +426,66 @@ def setup_api_routes(app, controller: ApiController, jwt: JWT):
426
426
  return await controller.ai_welcome(req)
427
427
 
428
428
 
429
+ @router.post(
430
+ "/rest",
431
+ response_model=PostSuccessResponse, # Specify the success response schema
432
+ responses={
433
+ 200: response_200(PostSuccessResponse, POST_APIDB_RESPONSE_DESCRIPTION, POST_APIDB_RESPONSE_EXAMPLE),
434
+ 400: response_400("Request body cannot be empty."),
435
+ 422: response_422(),
436
+ 500: response_500(PostErrorResponse, POST_APIDB_ERROR_EXAMPLE),
437
+ },
438
+ summary="REST - Call Post Api",
439
+ description="Call a rest api (post).",
440
+ tags=["Query"],
441
+ )
442
+ async def post(
443
+ req: Request,
444
+ jwt: str = Depends(jwt.is_valid_jwt),
445
+ source: QuerySource = Query(None, description="The source to retrieve the query definition. Valid values: `framework`, `query`"),
446
+ type: QueryType = Query(None, description="The type of query, get data or metadata. Valid values: `table`, `columns`."),
447
+ pool: str = Query(None, description="The database pool alias to retrieve the query definition. (e.g., `default`, `libnsx1`)"),
448
+ mode: SessionMode = Query(None, description="The session mode, retrieve data from framework table or pool. Valid values: `framework`, `session`"),
449
+ query: int = Query(None, description="The query ID to execute. (e.g., `1`, `2`)"),
450
+ override_pool: Optional[str] = Query(None, description="Override the default pool set in the query definition. (e.g., `default`, `libnsx1`)"),
451
+ body: Dict[str, Any] = Body(..., description="JSON object with key-value pairs is required.")
452
+ ):
453
+ if not body: # Check if the body is empty
454
+ raise HTTPException(
455
+ status_code=400,
456
+ detail="Request body cannot be empty. JSON object with key-value pairs is required.",
457
+ )
458
+ return await controller.rest(req)
459
+
460
+ @router.get(
461
+ "/rest",
462
+ response_model=PostSuccessResponse, # Specify the success response schema
463
+ responses={
464
+ 200: response_200(PostSuccessResponse, POST_APIDB_RESPONSE_DESCRIPTION, POST_APIDB_RESPONSE_EXAMPLE),
465
+ 400: response_400("Request body cannot be empty."),
466
+ 422: response_422(),
467
+ 500: response_500(PostErrorResponse, POST_APIDB_ERROR_EXAMPLE),
468
+ },
469
+ summary="REST - Call Post Api",
470
+ description="Call a rest api (post).",
471
+ tags=["Query"],
472
+ )
473
+ async def get(
474
+ req: Request,
475
+ jwt: str = Depends(jwt.is_valid_jwt),
476
+ source: QuerySource = Query(None, description="The source to retrieve the query definition. Valid values: `framework`, `query`"),
477
+ type: QueryType = Query(None, description="The type of query, get data or metadata. Valid values: `table`, `columns`."),
478
+ pool: str = Query(None, description="The database pool alias to retrieve the query definition. (e.g., `default`, `libnsx1`)"),
479
+ mode: SessionMode = Query(None, description="The session mode, retrieve data from framework table or pool. Valid values: `framework`, `session`"),
480
+ query: int = Query(None, description="The query ID to execute. (e.g., `1`, `2`)"),
481
+ override_pool: Optional[str] = Query(None, description="Override the default pool set in the query definition. (e.g., `default`, `libnsx1`)"),
482
+ body: Dict[str, Any] = Body(..., description="JSON object with key-value pairs is required.")
483
+ ):
484
+ if not body: # Check if the body is empty
485
+ raise HTTPException(
486
+ status_code=400,
487
+ detail="Request body cannot be empty. JSON object with key-value pairs is required.",
488
+ )
489
+ return await controller.rest(req)
490
+
429
491
  app.include_router(router, prefix="/api")
@@ -8,7 +8,7 @@ from fastapi import APIRouter, Request
8
8
 
9
9
  from app.controllers.setup_controller import SetupController
10
10
  from app.models.base import ErrorResponse, SuccessResponse, response_200, response_422, response_500
11
- from app.models.setup import SETUP_ERROR_MESSAGE, SETUP_RESPONSE_DESCRIPTION, SETUP_RESPONSE_EXAMPLE, SetupRequest
11
+ from app.models.setup import CREATE_ERROR_MESSAGE, CREATE_RESPONSE_DESCRIPTION, CREATE_RESPONSE_EXAMPLE, DROP_ERROR_MESSAGE, DROP_RESPONSE_DESCRIPTION, DROP_RESPONSE_EXAMPLE, SETUP_ERROR_MESSAGE, SETUP_RESPONSE_DESCRIPTION, SETUP_RESPONSE_EXAMPLE, CreateRequest, DropRequest, SetupRequest
12
12
 
13
13
 
14
14
  def setup_setup_routes(app, controller: SetupController):
@@ -205,4 +205,42 @@ def setup_setup_routes(app, controller: SetupController):
205
205
  ):
206
206
  return controller.current(req)
207
207
 
208
- app.include_router(router, prefix="/api")
208
+
209
+ @router.post(
210
+ "/db/create",
211
+ summary="DATABASE - Create",
212
+ description="Create database for new application",
213
+ tags=["Database"],
214
+ response_model=SuccessResponse,
215
+ responses={
216
+ 200: response_200(SuccessResponse, CREATE_RESPONSE_DESCRIPTION, CREATE_RESPONSE_EXAMPLE),
217
+ 422: response_422(),
218
+ 500: response_500(ErrorResponse, CREATE_ERROR_MESSAGE),
219
+ },
220
+ )
221
+ async def create(
222
+ req: Request,
223
+ body: CreateRequest,
224
+ ):
225
+ return await controller.create(req)
226
+
227
+ @router.post(
228
+ "/db/drop",
229
+ summary="DATABASE - Drop",
230
+ description="Drop an existing database",
231
+ tags=["Database"],
232
+ response_model=SuccessResponse,
233
+ responses={
234
+ 200: response_200(SuccessResponse, DROP_RESPONSE_EXAMPLE, DROP_RESPONSE_DESCRIPTION),
235
+ 422: response_422(),
236
+ 500: response_500(ErrorResponse, DROP_ERROR_MESSAGE),
237
+ },
238
+ )
239
+ async def drop(
240
+ req: Request,
241
+ body: DropRequest,
242
+ ):
243
+ return await controller.drop(req)
244
+
245
+ app.include_router(router, prefix="/api")
246
+
@@ -1,11 +1,15 @@
1
1
  # Description: API REST service for handling REST API requests.
2
2
  import logging
3
3
  import os
4
+ import re
5
+ from urllib.parse import urljoin, urlparse
4
6
 
7
+ from fastapi.responses import JSONResponse
5
8
  import httpx
6
9
  from pydantic import BaseModel
7
10
 
8
- from app.services.db_query import Query
11
+ from app.services.db_query import Query, SessionMode
12
+ from app.utils.encrypt import Encryption
9
13
  logger = logging.getLogger(__name__)
10
14
 
11
15
  import json
@@ -14,14 +18,12 @@ from datetime import datetime, timezone
14
18
  from app.utils.logs import LogHandler
15
19
  from app.logs import get_logs_json_path, get_logs_text_path
16
20
 
21
+ defaultPool = "default"
22
+
17
23
  class ApiType:
18
24
  internal = "INTERNAL"
19
25
  external = "EXTERNAL"
20
26
 
21
- class ApiFramework:
22
- CreateFrameworkDatabase = "CreateFrameworkDatabase"
23
- DropFrameworkDatabase = "DropFrameworkDatabase"
24
-
25
27
  class AIResponse(BaseModel):
26
28
  message: str
27
29
  is_truncated: bool
@@ -32,6 +34,95 @@ class Rest:
32
34
  self.logs_handler = LogHandler()
33
35
  self.queryRest = queryRest
34
36
 
37
+ async def rest(self, req: Request):
38
+ try:
39
+ query_params = req.query_params
40
+
41
+ """Extracts OpenAI API URL and Key from MODULE_ID = 'AI'."""
42
+ query = {
43
+ "QUERY": 34,
44
+ "POOL": query_params.get("mode") == SessionMode.framework and defaultPool or query_params.get("pool"),
45
+ "CRUD": "GET",
46
+ }
47
+ context = {
48
+ "row_offset": 0,
49
+ "row_limit": 1000,
50
+ "where": {"API_ID":query_params.get("api")},
51
+ }
52
+ # Get the target query using the framework query method
53
+ target_query = await self.queryRest.db_pools.get_pool("default").db_dao.get_framework_query(
54
+ query, self.queryRest.db_pools.get_pool("default").db_type
55
+ )
56
+
57
+ api = await self.queryRest.db_pools.get_pool("default").db_dao.get(target_query, context)
58
+ rows = api.get("rows")
59
+
60
+ if not api.get("rows"):
61
+ raise ValueError("No API found")
62
+
63
+ row = rows[0] # Extract the first row (dictionary)
64
+
65
+ api_type = row.get("API_SOURCE")
66
+ method = row.get("API_METHOD")
67
+ url = row.get("API_URL")
68
+ user = row.get("API_USER")
69
+ password = row.get("API_PASSWORD")
70
+ body = row.get("API_BODY")
71
+
72
+ # Convert API_BODY from JSON string format to a Python dictionary
73
+ body_dict = json.loads(body)
74
+
75
+ # 🔹 Ensure request body is retrieved properly
76
+ req_body = await req.json()
77
+
78
+ # Perform variable substitution in body
79
+ body_str = json.dumps(body_dict) # Convert dictionary to string for replacement
80
+ for key, value in req_body.items():
81
+ variable = rf"\${key.upper()}"
82
+ body_str = re.sub(variable, str(value), body_str)
83
+
84
+ # Convert back to dictionary
85
+ parsed_body = json.loads(body_str)
86
+ if api_type == ApiType.internal:
87
+ base_url = str(req.base_url)
88
+ full_url = urljoin(base_url, url)
89
+ else:
90
+ # Check if `url` is already a full external URL
91
+ parsed_url = urlparse(url)
92
+ if parsed_url.scheme and parsed_url.netloc:
93
+ full_url = url # Use the full external URL as is
94
+ else:
95
+ raise ValueError(f"Invalid external URL: {url}")
96
+
97
+ # 🔹 Make the API call
98
+ async with httpx.AsyncClient(timeout=60.0) as client:
99
+ response = await client.post(full_url, json=parsed_body)
100
+ if response.status_code == 200:
101
+ response_data = response.json()
102
+ else:
103
+ response_data = {
104
+ "error": f"Failed request with status code {response.status_code}",
105
+ "details": response.text
106
+ }
107
+ response_data = response.json()
108
+
109
+ return JSONResponse({
110
+ "items": response_data,
111
+ "status": "success",
112
+ "count": 0,
113
+ })
114
+ except Exception as err:
115
+ message = str(err)
116
+ return JSONResponse({
117
+ "items": [{"message": f"Error: {message}"}],
118
+ "status": "error",
119
+ "hasMore": False,
120
+ "limit": context.get("row_limit", 1000),
121
+ "offset": context.get("row_offset", 0),
122
+ "count": 0,
123
+ })
124
+
125
+
35
126
 
36
127
  async def push_log(self, req: Request):
37
128
  """
@@ -191,3 +191,7 @@ class Install:
191
191
  except Exception as e:
192
192
  logging.error(f"Update failed: {e}")
193
193
 
194
+
195
+
196
+
197
+