wappa 0.1.5__tar.gz → 0.1.7__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.

Potentially problematic release.


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

Files changed (284) hide show
  1. {wappa-0.1.5 → wappa-0.1.7}/PKG-INFO +7 -25
  2. {wappa-0.1.5 → wappa-0.1.7}/pyproject.toml +7 -34
  3. {wappa-0.1.5 → wappa-0.1.7}/uv.lock +13 -47
  4. wappa-0.1.7/wappa/__init__.py +29 -0
  5. wappa-0.1.7/wappa/cli/examples/init/pyproject.toml +7 -0
  6. wappa-0.1.7/wappa/cli/examples/json_cache_example/.gitignore +69 -0
  7. wappa-0.1.7/wappa/cli/examples/json_cache_example/README.md +190 -0
  8. wappa-0.1.7/wappa/cli/examples/openai_transcript/.gitignore +10 -0
  9. wappa-0.1.7/wappa/cli/examples/openai_transcript/README.md +0 -0
  10. wappa-0.1.7/wappa/cli/examples/redis_cache_example/.gitignore +69 -0
  11. wappa-0.1.7/wappa/cli/examples/redis_cache_example/README.md +0 -0
  12. wappa-0.1.7/wappa/cli/examples/simple_echo_example/.gitignore +69 -0
  13. wappa-0.1.7/wappa/cli/examples/simple_echo_example/.python-version +1 -0
  14. wappa-0.1.7/wappa/cli/examples/simple_echo_example/README.md +0 -0
  15. wappa-0.1.7/wappa/cli/examples/simple_echo_example/pyproject.toml +9 -0
  16. wappa-0.1.7/wappa/cli/examples/wappa_full_example/.dockerignore +171 -0
  17. wappa-0.1.7/wappa/cli/examples/wappa_full_example/.gitignore +10 -0
  18. wappa-0.1.7/wappa/cli/examples/wappa_full_example/Dockerfile +85 -0
  19. wappa-0.1.7/wappa/cli/examples/wappa_full_example/RAILWAY_DEPLOYMENT.md +366 -0
  20. wappa-0.1.7/wappa/cli/examples/wappa_full_example/README.md +322 -0
  21. wappa-0.1.7/wappa/cli/examples/wappa_full_example/docker-compose.yml +170 -0
  22. wappa-0.1.7/wappa/cli/examples/wappa_full_example/nginx.conf +177 -0
  23. wappa-0.1.7/wappa/cli/examples/wappa_full_example/railway.toml +30 -0
  24. wappa-0.1.7/wappa/cli/main.py +530 -0
  25. wappa-0.1.7/wappa/cli/templates/__init__.py.template +0 -0
  26. wappa-0.1.7/wappa/cli/templates/env.template +37 -0
  27. wappa-0.1.7/wappa/cli/templates/gitignore.template +165 -0
  28. wappa-0.1.7/wappa/cli/templates/main.py.template +8 -0
  29. wappa-0.1.7/wappa/cli/templates/master_event.py.template +8 -0
  30. wappa-0.1.7/wappa/core/__init__.py +89 -0
  31. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/wappa_core_plugin.py +15 -5
  32. wappa-0.1.7/wappa/database/__init__.py +30 -0
  33. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/media_interface.py +57 -3
  34. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/models/media_result.py +43 -0
  35. wappa-0.1.7/wappa/messaging/__init__.py +57 -0
  36. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/handlers/whatsapp_media_handler.py +112 -4
  37. wappa-0.1.7/wappa/models/__init__.py +103 -0
  38. wappa-0.1.7/wappa/persistence/__init__.py +55 -0
  39. wappa-0.1.7/wappa/webhooks/__init__.py +66 -0
  40. wappa-0.1.7/wappa/webhooks/whatsapp/__init__.py +60 -0
  41. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/status_models.py +10 -0
  42. wappa-0.1.5/examples/echo_project/README.md +0 -372
  43. wappa-0.1.5/examples/echo_project/constants.py +0 -243
  44. wappa-0.1.5/examples/echo_project/echo_handler.py +0 -464
  45. wappa-0.1.5/examples/echo_project/interactive_builder.py +0 -437
  46. wappa-0.1.5/examples/echo_project/logic/__init__.py +0 -83
  47. wappa-0.1.5/examples/echo_project/logic/audio_echo.py +0 -145
  48. wappa-0.1.5/examples/echo_project/logic/button_activation.py +0 -91
  49. wappa-0.1.5/examples/echo_project/logic/button_prompt.py +0 -85
  50. wappa-0.1.5/examples/echo_project/logic/button_selection.py +0 -135
  51. wappa-0.1.5/examples/echo_project/logic/contact_echo.py +0 -237
  52. wappa-0.1.5/examples/echo_project/logic/cta_activation.py +0 -63
  53. wappa-0.1.5/examples/echo_project/logic/document_echo.py +0 -134
  54. wappa-0.1.5/examples/echo_project/logic/image_echo.py +0 -132
  55. wappa-0.1.5/examples/echo_project/logic/list_activation.py +0 -91
  56. wappa-0.1.5/examples/echo_project/logic/list_prompt.py +0 -84
  57. wappa-0.1.5/examples/echo_project/logic/list_selection.py +0 -166
  58. wappa-0.1.5/examples/echo_project/logic/location_activation.py +0 -63
  59. wappa-0.1.5/examples/echo_project/logic/location_echo.py +0 -150
  60. wappa-0.1.5/examples/echo_project/logic/message_confirmation.py +0 -114
  61. wappa-0.1.5/examples/echo_project/logic/metadata_extraction.py +0 -235
  62. wappa-0.1.5/examples/echo_project/logic/state_management.py +0 -283
  63. wappa-0.1.5/examples/echo_project/logic/text_echo.py +0 -138
  64. wappa-0.1.5/examples/echo_project/logic/user_storage.py +0 -157
  65. wappa-0.1.5/examples/echo_project/logic/video_echo.py +0 -132
  66. wappa-0.1.5/examples/echo_project/main.py +0 -154
  67. wappa-0.1.5/examples/echo_project/media/README.md +0 -63
  68. wappa-0.1.5/examples/echo_project/media/WeDancin_RawImg.png +0 -0
  69. wappa-0.1.5/examples/echo_project/media/audio.ogg +0 -5
  70. wappa-0.1.5/examples/echo_project/media/cf592_POST.png +0 -0
  71. wappa-0.1.5/examples/echo_project/media/document.pdf +0 -49
  72. wappa-0.1.5/examples/echo_project/media/image.png +0 -0
  73. wappa-0.1.5/examples/echo_project/media/video.mp4 +0 -5
  74. wappa-0.1.5/examples/echo_project/media_processor.py +0 -472
  75. wappa-0.1.5/examples/echo_project/state_manager.py +0 -416
  76. wappa-0.1.5/examples/echo_project/test_architecture.py +0 -48
  77. wappa-0.1.5/examples/simple_echo/main.py +0 -402
  78. wappa-0.1.5/examples/simple_wappa/main.py +0 -259
  79. wappa-0.1.5/wappa/__init__.py +0 -85
  80. wappa-0.1.5/wappa/cli/main.py +0 -206
  81. wappa-0.1.5/wappa/core/__init__.py +0 -6
  82. wappa-0.1.5/wappa/database/__init__.py +0 -18
  83. wappa-0.1.5/wappa/domain/interfaces/webhooks/__init__.py +0 -1
  84. wappa-0.1.5/wappa/messaging/__init__.py +0 -7
  85. wappa-0.1.5/wappa/persistence/json/handlers/__init__.py +0 -1
  86. wappa-0.1.5/wappa/persistence/json/handlers/utils/__init__.py +0 -1
  87. wappa-0.1.5/wappa/persistence/memory/handlers/__init__.py +0 -1
  88. wappa-0.1.5/wappa/persistence/memory/handlers/utils/__init__.py +0 -1
  89. wappa-0.1.5/wappa/schemas/webhooks/__init__.py +0 -3
  90. wappa-0.1.5/wappa/webhooks/__init__.py +0 -17
  91. wappa-0.1.5/wappa/webhooks/whatsapp/__init__.py +0 -6
  92. {wappa-0.1.5 → wappa-0.1.7}/.gitignore +0 -0
  93. {wappa-0.1.5 → wappa-0.1.7}/.python-version +0 -0
  94. {wappa-0.1.5 → wappa-0.1.7}/LICENSE +0 -0
  95. {wappa-0.1.5 → wappa-0.1.7}/README.md +0 -0
  96. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/__init__.py +0 -0
  97. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/controllers/__init__.py +0 -0
  98. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/controllers/webhook_controller.py +0 -0
  99. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/dependencies/__init__.py +0 -0
  100. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/dependencies/whatsapp_dependencies.py +0 -0
  101. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/dependencies/whatsapp_media_dependencies.py +0 -0
  102. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/middleware/__init__.py +0 -0
  103. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/middleware/error_handler.py +0 -0
  104. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/middleware/owner.py +0 -0
  105. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/middleware/request_logging.py +0 -0
  106. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/__init__.py +0 -0
  107. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/health.py +0 -0
  108. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/webhooks.py +0 -0
  109. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/__init__.py +0 -0
  110. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/whatsapp_interactive.py +0 -0
  111. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/whatsapp_media.py +0 -0
  112. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/whatsapp_messages.py +0 -0
  113. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/whatsapp_specialized.py +0 -0
  114. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp/whatsapp_templates.py +0 -0
  115. {wappa-0.1.5 → wappa-0.1.7}/wappa/api/routes/whatsapp_combined.py +0 -0
  116. {wappa-0.1.5 → wappa-0.1.7}/wappa/cli/__init__.py +0 -0
  117. {wappa-0.1.5/examples/redis_cache_example → wappa-0.1.7/wappa/cli/examples/init}/.gitignore +0 -0
  118. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/config/__init__.py +0 -0
  119. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/config/settings.py +0 -0
  120. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/events/__init__.py +0 -0
  121. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/events/default_handlers.py +0 -0
  122. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/events/event_dispatcher.py +0 -0
  123. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/events/event_handler.py +0 -0
  124. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/events/webhook_factory.py +0 -0
  125. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/factory/__init__.py +0 -0
  126. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/factory/plugin.py +0 -0
  127. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/factory/wappa_builder.py +0 -0
  128. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/logging/__init__.py +0 -0
  129. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/logging/context.py +0 -0
  130. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/logging/logger.py +0 -0
  131. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/__init__.py +0 -0
  132. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/auth_plugin.py +0 -0
  133. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/cors_plugin.py +0 -0
  134. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/custom_middleware_plugin.py +0 -0
  135. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/database_plugin.py +0 -0
  136. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/rate_limit_plugin.py +0 -0
  137. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/redis_plugin.py +0 -0
  138. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/plugins/webhook_plugin.py +0 -0
  139. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/types.py +0 -0
  140. {wappa-0.1.5 → wappa-0.1.7}/wappa/core/wappa_app.py +0 -0
  141. {wappa-0.1.5 → wappa-0.1.7}/wappa/database/adapter.py +0 -0
  142. {wappa-0.1.5 → wappa-0.1.7}/wappa/database/adapters/__init__.py +0 -0
  143. {wappa-0.1.5 → wappa-0.1.7}/wappa/database/adapters/mysql_adapter.py +0 -0
  144. {wappa-0.1.5 → wappa-0.1.7}/wappa/database/adapters/postgresql_adapter.py +0 -0
  145. {wappa-0.1.5 → wappa-0.1.7}/wappa/database/adapters/sqlite_adapter.py +0 -0
  146. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/__init__.py +0 -0
  147. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/builders/__init__.py +0 -0
  148. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/builders/message_builder.py +0 -0
  149. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/entities/__init__.py +0 -0
  150. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/enums/messenger_platform.py +0 -0
  151. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/factories/__init__.py +0 -0
  152. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/factories/media_factory.py +0 -0
  153. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/factories/message_factory.py +0 -0
  154. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/factories/messenger_factory.py +0 -0
  155. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/__init__.py +0 -0
  156. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/base_repository.py +0 -0
  157. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/cache_factory.py +0 -0
  158. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/cache_interface.py +0 -0
  159. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/expiry_repository.py +0 -0
  160. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/messaging_interface.py +0 -0
  161. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/pubsub_repository.py +0 -0
  162. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/repository_factory.py +0 -0
  163. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/shared_state_repository.py +0 -0
  164. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/state_repository.py +0 -0
  165. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/tables_repository.py +0 -0
  166. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/interfaces/user_repository.py +0 -0
  167. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/models/platforms/__init__.py +0 -0
  168. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/models/platforms/platform_config.py +0 -0
  169. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/services/__init__.py +0 -0
  170. {wappa-0.1.5 → wappa-0.1.7}/wappa/domain/services/tenant_credentials_service.py +0 -0
  171. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/__init__.py +0 -0
  172. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/client/__init__.py +0 -0
  173. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/client/whatsapp_client.py +0 -0
  174. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/handlers/__init__.py +0 -0
  175. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/handlers/whatsapp_interactive_handler.py +0 -0
  176. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/handlers/whatsapp_specialized_handler.py +0 -0
  177. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/handlers/whatsapp_template_handler.py +0 -0
  178. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/messenger/__init__.py +0 -0
  179. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/messenger/whatsapp_messenger.py +0 -0
  180. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/__init__.py +0 -0
  181. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/basic_models.py +0 -0
  182. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/interactive_models.py +0 -0
  183. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/media_models.py +0 -0
  184. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/specialized_models.py +0 -0
  185. {wappa-0.1.5 → wappa-0.1.7}/wappa/messaging/whatsapp/models/template_models.py +0 -0
  186. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/cache_factory.py +0 -0
  187. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/__init__.py +0 -0
  188. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/cache_adapters.py +0 -0
  189. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/state_handler.py +0 -0
  190. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/table_handler.py +0 -0
  191. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/user_handler.py +0 -0
  192. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/utils/file_manager.py +0 -0
  193. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/utils/key_factory.py +0 -0
  194. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/handlers/utils/serialization.py +0 -0
  195. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/json_cache_factory.py +0 -0
  196. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/json/storage_manager.py +0 -0
  197. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/__init__.py +0 -0
  198. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/cache_adapters.py +0 -0
  199. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/state_handler.py +0 -0
  200. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/table_handler.py +0 -0
  201. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/user_handler.py +0 -0
  202. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/utils/key_factory.py +0 -0
  203. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/utils/memory_store.py +0 -0
  204. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/handlers/utils/ttl_manager.py +0 -0
  205. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/memory_cache_factory.py +0 -0
  206. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/memory/storage_manager.py +0 -0
  207. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/README.md +0 -0
  208. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/__init__.py +0 -0
  209. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/cache_adapters.py +0 -0
  210. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/ops.py +0 -0
  211. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_cache_factory.py +0 -0
  212. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_client.py +0 -0
  213. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/__init__.py +0 -0
  214. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/state_handler.py +0 -0
  215. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/table.py +0 -0
  216. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/user.py +0 -0
  217. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/utils/__init__.py +0 -0
  218. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/utils/key_factory.py +0 -0
  219. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/utils/serde.py +0 -0
  220. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_handler/utils/tenant_cache.py +0 -0
  221. {wappa-0.1.5 → wappa-0.1.7}/wappa/persistence/redis/redis_manager.py +0 -0
  222. {wappa-0.1.5 → wappa-0.1.7}/wappa/processors/__init__.py +0 -0
  223. {wappa-0.1.5 → wappa-0.1.7}/wappa/processors/base_processor.py +0 -0
  224. {wappa-0.1.5 → wappa-0.1.7}/wappa/processors/factory.py +0 -0
  225. {wappa-0.1.5 → wappa-0.1.7}/wappa/processors/whatsapp_processor.py +0 -0
  226. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/__init__.py +0 -0
  227. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/__init__.py +0 -0
  228. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/base_message.py +0 -0
  229. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/base_status.py +0 -0
  230. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/base_webhook.py +0 -0
  231. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/types.py +0 -0
  232. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/webhook_interfaces/__init__.py +0 -0
  233. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/webhook_interfaces/base_components.py +0 -0
  234. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/core/webhook_interfaces/universal_webhooks.py +0 -0
  235. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/factory.py +0 -0
  236. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/__init__.py +0 -0
  237. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/base_models.py +0 -0
  238. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/__init__.py +0 -0
  239. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/audio.py +0 -0
  240. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/button.py +0 -0
  241. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/contact.py +0 -0
  242. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/document.py +0 -0
  243. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/errors.py +0 -0
  244. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/image.py +0 -0
  245. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/interactive.py +0 -0
  246. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/location.py +0 -0
  247. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/order.py +0 -0
  248. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/reaction.py +0 -0
  249. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/sticker.py +0 -0
  250. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/system.py +0 -0
  251. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/text.py +0 -0
  252. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/unsupported.py +0 -0
  253. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/message_types/video.py +0 -0
  254. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/status_models.py +0 -0
  255. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/validators.py +0 -0
  256. {wappa-0.1.5 → wappa-0.1.7}/wappa/schemas/whatsapp/webhook_container.py +0 -0
  257. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/__init__.py +0 -0
  258. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/base_message.py +0 -0
  259. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/base_status.py +0 -0
  260. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/base_webhook.py +0 -0
  261. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/types.py +0 -0
  262. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/webhook_interfaces/__init__.py +0 -0
  263. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/webhook_interfaces/base_components.py +0 -0
  264. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/core/webhook_interfaces/universal_webhooks.py +0 -0
  265. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/factory.py +0 -0
  266. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/base_models.py +0 -0
  267. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/__init__.py +0 -0
  268. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/audio.py +0 -0
  269. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/button.py +0 -0
  270. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/contact.py +0 -0
  271. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/document.py +0 -0
  272. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/errors.py +0 -0
  273. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/image.py +0 -0
  274. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/interactive.py +0 -0
  275. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/location.py +0 -0
  276. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/order.py +0 -0
  277. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/reaction.py +0 -0
  278. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/sticker.py +0 -0
  279. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/system.py +0 -0
  280. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/text.py +0 -0
  281. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/unsupported.py +0 -0
  282. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/message_types/video.py +0 -0
  283. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/validators.py +0 -0
  284. {wappa-0.1.5 → wappa-0.1.7}/wappa/webhooks/whatsapp/webhook_container.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wappa
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Open Source Framework to develop smart Workflows, Agents and full chat applications through WhatsApp
5
5
  Project-URL: Homepage, https://wappa.mimeia.com
6
6
  Project-URL: Documentation, https://wappa.mimeia.com/docs
@@ -225,37 +225,19 @@ Requires-Dist: aiofiles>=24.1.0
225
225
  Requires-Dist: aiohttp>=3.11.0
226
226
  Requires-Dist: fastapi>=0.115.0
227
227
  Requires-Dist: hypercorn>=0.17.0
228
+ Requires-Dist: numpy>=2.2.0
229
+ Requires-Dist: openai>=1.69.0
230
+ Requires-Dist: opencv-python-headless>=4.11.0
231
+ Requires-Dist: pillow>=11.1.0
228
232
  Requires-Dist: pydantic-settings>=2.10.0
229
233
  Requires-Dist: pydantic>=2.8.0
230
234
  Requires-Dist: python-dotenv>=1.0.0
231
235
  Requires-Dist: python-multipart>=0.0.6
236
+ Requires-Dist: redis>=5.2.0
232
237
  Requires-Dist: rich>=13.0.0
238
+ Requires-Dist: sqlmodel>=0.0.24
233
239
  Requires-Dist: typer>=0.9.0
234
240
  Requires-Dist: uvicorn[standard]>=0.24.0
235
- Provides-Extra: ai
236
- Requires-Dist: numpy>=2.2.0; extra == 'ai'
237
- Requires-Dist: openai>=1.69.0; extra == 'ai'
238
- Provides-Extra: all
239
- Requires-Dist: numpy>=2.2.0; extra == 'all'
240
- Requires-Dist: openai>=1.69.0; extra == 'all'
241
- Requires-Dist: opencv-python-headless>=4.11.0; extra == 'all'
242
- Requires-Dist: pillow>=11.1.0; extra == 'all'
243
- Requires-Dist: redis>=5.2.0; extra == 'all'
244
- Requires-Dist: sqlmodel>=0.0.24; extra == 'all'
245
- Provides-Extra: database
246
- Requires-Dist: sqlmodel>=0.0.24; extra == 'database'
247
- Provides-Extra: dev
248
- Requires-Dist: black>=25.1.0; extra == 'dev'
249
- Requires-Dist: mypy>=1.0.0; extra == 'dev'
250
- Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
251
- Requires-Dist: pytest-asyncio>=1.1.0; extra == 'dev'
252
- Requires-Dist: pytest>=8.4.0; extra == 'dev'
253
- Requires-Dist: ruff>=0.9.0; extra == 'dev'
254
- Provides-Extra: media
255
- Requires-Dist: opencv-python-headless>=4.11.0; extra == 'media'
256
- Requires-Dist: pillow>=11.1.0; extra == 'media'
257
- Provides-Extra: redis
258
- Requires-Dist: redis>=5.2.0; extra == 'redis'
259
241
  Description-Content-Type: text/markdown
260
242
 
261
243
  # wappa
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "wappa"
7
- version = "0.1.5"
7
+ version = "0.1.7"
8
8
  description = "Open Source Framework to develop smart Workflows, Agents and full chat applications through WhatsApp"
9
9
  authors = [
10
10
  {name = "Sasha Canal", email = "contact@mimeia.com"},
@@ -25,8 +25,9 @@ classifiers = [
25
25
  "Topic :: Software Development :: Libraries :: Python Modules",
26
26
  ]
27
27
 
28
- # Core dependencies - minimal for basic functionality
28
+ # All dependencies included by default for simplicity
29
29
  dependencies = [
30
+ # Core framework
30
31
  "fastapi>=0.115.0",
31
32
  "uvicorn[standard]>=0.24.0",
32
33
  "hypercorn>=0.17.0",
@@ -38,46 +39,18 @@ dependencies = [
38
39
  "aiofiles>=24.1.0",
39
40
  "typer>=0.9.0",
40
41
  "rich>=13.0.0",
41
- ]
42
-
43
- [project.optional-dependencies]
44
- # Redis cache support
45
- redis = [
42
+ # Cache support
46
43
  "redis>=5.2.0",
47
- ]
48
-
49
- # Database support
50
- database = [
44
+ # Database support
51
45
  "sqlmodel>=0.0.24",
52
- ]
53
-
54
- # AI/ML features
55
- ai = [
46
+ # AI/ML features
56
47
  "openai>=1.69.0",
57
48
  "numpy>=2.2.0",
58
- ]
59
-
60
- # Image processing
61
- media = [
49
+ # Image processing
62
50
  "pillow>=11.1.0",
63
51
  "opencv-python-headless>=4.11.0",
64
52
  ]
65
53
 
66
- # Development tools
67
- dev = [
68
- "pytest>=8.4.0",
69
- "pytest-asyncio>=1.1.0",
70
- "ruff>=0.9.0",
71
- "black>=25.1.0",
72
- "mypy>=1.0.0",
73
- "pre-commit>=3.0.0",
74
- ]
75
-
76
- # Full installation with all features
77
- all = [
78
- "wappa[redis,database,ai,media]",
79
- ]
80
-
81
54
  [project.urls]
82
55
  Homepage = "https://wappa.mimeia.com"
83
56
  Documentation = "https://wappa.mimeia.com/docs"
@@ -1198,54 +1198,28 @@ wheels = [
1198
1198
 
1199
1199
  [[package]]
1200
1200
  name = "wappa"
1201
- version = "0.1.4"
1201
+ version = "0.1.7"
1202
1202
  source = { editable = "." }
1203
1203
  dependencies = [
1204
1204
  { name = "aiofiles" },
1205
1205
  { name = "aiohttp" },
1206
1206
  { name = "fastapi" },
1207
1207
  { name = "hypercorn" },
1208
+ { name = "numpy" },
1209
+ { name = "openai" },
1210
+ { name = "opencv-python-headless" },
1211
+ { name = "pillow" },
1208
1212
  { name = "pydantic" },
1209
1213
  { name = "pydantic-settings" },
1210
1214
  { name = "python-dotenv" },
1211
1215
  { name = "python-multipart" },
1216
+ { name = "redis" },
1212
1217
  { name = "rich" },
1218
+ { name = "sqlmodel" },
1213
1219
  { name = "typer" },
1214
1220
  { name = "uvicorn", extra = ["standard"] },
1215
1221
  ]
1216
1222
 
1217
- [package.optional-dependencies]
1218
- ai = [
1219
- { name = "numpy" },
1220
- { name = "openai" },
1221
- ]
1222
- all = [
1223
- { name = "numpy" },
1224
- { name = "openai" },
1225
- { name = "opencv-python-headless" },
1226
- { name = "pillow" },
1227
- { name = "redis" },
1228
- { name = "sqlmodel" },
1229
- ]
1230
- database = [
1231
- { name = "sqlmodel" },
1232
- ]
1233
- dev = [
1234
- { name = "black" },
1235
- { name = "mypy" },
1236
- { name = "pre-commit" },
1237
- { name = "pytest" },
1238
- { name = "pytest-asyncio" },
1239
- { name = "ruff" },
1240
- ]
1241
- media = [
1242
- { name = "opencv-python-headless" },
1243
- { name = "pillow" },
1244
- ]
1245
- redis = [
1246
- { name = "redis" },
1247
- ]
1248
-
1249
1223
  [package.dev-dependencies]
1250
1224
  dev = [
1251
1225
  { name = "black" },
@@ -1260,30 +1234,22 @@ dev = [
1260
1234
  requires-dist = [
1261
1235
  { name = "aiofiles", specifier = ">=24.1.0" },
1262
1236
  { name = "aiohttp", specifier = ">=3.11.0" },
1263
- { name = "black", marker = "extra == 'dev'", specifier = ">=25.1.0" },
1264
1237
  { name = "fastapi", specifier = ">=0.115.0" },
1265
1238
  { name = "hypercorn", specifier = ">=0.17.0" },
1266
- { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.0.0" },
1267
- { name = "numpy", marker = "extra == 'ai'", specifier = ">=2.2.0" },
1268
- { name = "openai", marker = "extra == 'ai'", specifier = ">=1.69.0" },
1269
- { name = "opencv-python-headless", marker = "extra == 'media'", specifier = ">=4.11.0" },
1270
- { name = "pillow", marker = "extra == 'media'", specifier = ">=11.1.0" },
1271
- { name = "pre-commit", marker = "extra == 'dev'", specifier = ">=3.0.0" },
1239
+ { name = "numpy", specifier = ">=2.2.0" },
1240
+ { name = "openai", specifier = ">=1.69.0" },
1241
+ { name = "opencv-python-headless", specifier = ">=4.11.0" },
1242
+ { name = "pillow", specifier = ">=11.1.0" },
1272
1243
  { name = "pydantic", specifier = ">=2.8.0" },
1273
1244
  { name = "pydantic-settings", specifier = ">=2.10.0" },
1274
- { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.4.0" },
1275
- { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=1.1.0" },
1276
1245
  { name = "python-dotenv", specifier = ">=1.0.0" },
1277
1246
  { name = "python-multipart", specifier = ">=0.0.6" },
1278
- { name = "redis", marker = "extra == 'redis'", specifier = ">=5.2.0" },
1247
+ { name = "redis", specifier = ">=5.2.0" },
1279
1248
  { name = "rich", specifier = ">=13.0.0" },
1280
- { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.9.0" },
1281
- { name = "sqlmodel", marker = "extra == 'database'", specifier = ">=0.0.24" },
1249
+ { name = "sqlmodel", specifier = ">=0.0.24" },
1282
1250
  { name = "typer", specifier = ">=0.9.0" },
1283
1251
  { name = "uvicorn", extras = ["standard"], specifier = ">=0.24.0" },
1284
- { name = "wappa", extras = ["redis", "database", "ai", "media"], marker = "extra == 'all'" },
1285
1252
  ]
1286
- provides-extras = ["redis", "database", "ai", "media", "dev", "all"]
1287
1253
 
1288
1254
  [package.metadata.requires-dev]
1289
1255
  dev = [
@@ -0,0 +1,29 @@
1
+ """
2
+ Wappa - Open Source WhatsApp Business Framework
3
+
4
+ A clean, modern Python library for building WhatsApp Business applications
5
+ with minimal setup and maximum flexibility.
6
+
7
+ Clean Import Interface (SRP Compliance):
8
+ - Only framework essentials exposed at top level
9
+ - Domain-specific imports available via wappa.domain paths
10
+ - Follows Clean Architecture principles
11
+ """
12
+
13
+ # Framework Essentials Only (SRP: Framework Foundation)
14
+ from .core.wappa_app import Wappa
15
+ from .core.events.event_handler import WappaEventHandler
16
+ from .core.factory import WappaBuilder, WappaPlugin
17
+
18
+ # Dynamic version from pyproject.toml
19
+ from .core.config.settings import settings
20
+
21
+ __version__ = settings.version
22
+
23
+ __all__ = [
24
+ # Core Framework Components
25
+ "Wappa",
26
+ "WappaEventHandler",
27
+ "WappaBuilder",
28
+ "WappaPlugin",
29
+ ]
@@ -0,0 +1,7 @@
1
+ [project]
2
+ name = "wappa-init"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.12"
5
+ dependencies = [
6
+ "wappa>=0.1.6",
7
+ ]
@@ -0,0 +1,69 @@
1
+ # Wappa
2
+ logs/
3
+
4
+ # Environment variables
5
+ .env
6
+ .env.local
7
+ .env.development
8
+ .env.production
9
+
10
+ # Python
11
+ __pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.so
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+
34
+ # Virtual environments
35
+ .venv/
36
+ venv/
37
+ ENV/
38
+ env/
39
+
40
+ # IDE
41
+ .vscode/
42
+ .idea/
43
+ *.swp
44
+ *.swo
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Logs
51
+ app/logs/
52
+ logs/
53
+ *.log
54
+
55
+ # Redis dumps
56
+ dump.rdb
57
+
58
+ # Temporary files
59
+ .tmp/
60
+ temp/
61
+ tmp/
62
+
63
+ # Coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ .pytest_cache/
@@ -0,0 +1,190 @@
1
+ # Wappa JSON Cache Example
2
+
3
+ This example demonstrates how to use Wappa's JSON cache backend with a complete WhatsApp bot implementation following SOLID architecture principles.
4
+
5
+ ## Overview
6
+
7
+ The JSON Cache Example shows how to build a WhatsApp bot that uses JSON file-based caching for:
8
+ - **User Cache**: User profiles and session data (JSON files)
9
+ - **Table Cache**: Message history and structured data (JSON files)
10
+ - **State Cache**: Application state management (JSON files)
11
+
12
+ ## Architecture
13
+
14
+ This example follows **SOLID principles** with a modular score-based architecture:
15
+
16
+ ```
17
+ app/
18
+ ├── main.py # FastAPI application with JSON cache
19
+ ├── master_event.py # Main event handler using SOLID architecture
20
+ ├── models/ # Pydantic data models
21
+ │ └── json_demo_models.py # User, MessageLog, StateHandler, CacheStats
22
+ ├── scores/ # Business logic modules (Single Responsibility)
23
+ │ ├── score_base.py # Abstract base for all scores
24
+ │ ├── score_user_management.py # User profile management
25
+ │ ├── score_message_history.py # Message logging & /HISTORY
26
+ │ ├── score_state_commands.py # /WAPPA, /EXIT commands
27
+ │ └── score_cache_statistics.py # /STATS command & monitoring
28
+ └── utils/ # Utility functions
29
+ ├── cache_utils.py # Cache key generation & TTL management
30
+ └── message_utils.py # Message parsing & formatting
31
+ ```
32
+
33
+ ## Features
34
+
35
+ ### Cache Operations
36
+ - **JSON File Storage**: All data stored in JSON files on disk
37
+ - **TTL Support**: Automatic expiration of cached data
38
+ - **Persistence**: Data survives application restarts
39
+ - **Performance**: Fast file-based operations with JSON serialization
40
+
41
+ ### Available Commands
42
+ - `/WAPPA` - Enter special state mode (cached in state layer)
43
+ - `/EXIT` - Exit special state mode
44
+ - `/HISTORY` - View your message history (from table cache)
45
+ - `/STATS` - View JSON cache statistics and health
46
+
47
+ ### Score Modules (SOLID Architecture)
48
+ Each score handles a single responsibility:
49
+
50
+ 1. **UserManagementScore**: User profiles, welcome messages
51
+ 2. **MessageHistoryScore**: Message logging, history retrieval
52
+ 3. **StateCommandsScore**: State management, special commands
53
+ 4. **CacheStatisticsScore**: Cache monitoring, performance metrics
54
+
55
+ ## Configuration
56
+
57
+ ### Environment Variables
58
+ ```bash
59
+ # WhatsApp Business API (required)
60
+ WHATSAPP_API_URL=https://graph.facebook.com/v18.0
61
+ WHATSAPP_ACCESS_TOKEN=your_access_token
62
+ WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id
63
+ WHATSAPP_VERIFY_TOKEN=your_webhook_verify_token
64
+ WHATSAPP_WEBHOOK_SECRET=your_webhook_secret
65
+
66
+ # Application Settings
67
+ PORT=8000
68
+ LOG_LEVEL=INFO
69
+ ENVIRONMENT=development
70
+ ```
71
+
72
+ **Note**: No Redis configuration needed - JSON cache uses the file system!
73
+
74
+ ## Running the Example
75
+
76
+ 1. **Install Dependencies**:
77
+ ```bash
78
+ cd json_cache_example
79
+ uv sync
80
+ ```
81
+
82
+ 2. **Set Environment Variables**:
83
+ ```bash
84
+ # Copy and edit .env file with your WhatsApp credentials
85
+ cp .env.example .env
86
+ ```
87
+
88
+ 3. **Run the Application**:
89
+ ```bash
90
+ uv run python -m app.main
91
+ ```
92
+
93
+ 4. **Test via WhatsApp**:
94
+ - Send any message to get welcomed
95
+ - Try `/WAPPA` to enter special state
96
+ - Send `/HISTORY` to view message history
97
+ - Send `/STATS` to see JSON cache statistics
98
+ - Send `/EXIT` to leave special state
99
+
100
+ ## JSON Cache Behavior
101
+
102
+ ### File Structure
103
+ ```
104
+ cache_data/
105
+ ├── user_cache/
106
+ │ └── user_profile_{phone_number}.json
107
+ ├── table_cache/
108
+ │ └── msg_history_{phone_number}.json
109
+ └── state_cache/
110
+ └── wappa_state_{phone_number}.json
111
+ ```
112
+
113
+ ### Cache Operations
114
+ - **Set**: Creates/updates JSON files with serialized Pydantic models
115
+ - **Get**: Reads and deserializes JSON files back to Pydantic models
116
+ - **Delete**: Removes JSON files from disk
117
+ - **TTL**: Files older than TTL are automatically cleaned up
118
+
119
+ ### Performance Characteristics
120
+ - **Speed**: Fast for small to medium datasets
121
+ - **Persistence**: Data survives restarts and crashes
122
+ - **Scalability**: Good for moderate traffic (hundreds of users)
123
+ - **Reliability**: No external dependencies, always available
124
+
125
+ ## Development
126
+
127
+ ### Adding New Score Modules
128
+ 1. Create new score in `app/scores/`
129
+ 2. Inherit from `ScoreBase`
130
+ 3. Implement `can_handle()` and `process()` methods
131
+ 4. Register in `master_event.py`
132
+
133
+ ### Cache Usage Patterns
134
+ ```python
135
+ # User cache example
136
+ user = User(phone_number="1234567890", user_name="John")
137
+ await self.user_cache.set("user_profile:1234567890", user, ttl=3600)
138
+ cached_user = await self.user_cache.get("user_profile:1234567890", models=User)
139
+
140
+ # Table cache example
141
+ message_log = MessageLog(user_id="1234567890")
142
+ await self.table_cache.set("msg_history:1234567890", message_log)
143
+
144
+ # State cache example
145
+ state = StateHandler()
146
+ state.activate_wappa()
147
+ await self.state_cache.set("wappa_state:1234567890", state, ttl=1800)
148
+ ```
149
+
150
+ ## Monitoring
151
+
152
+ ### Cache Statistics
153
+ Use `/STATS` command to monitor:
154
+ - File system connectivity
155
+ - Total operations count
156
+ - Cache hit/miss ratios
157
+ - Error rates and health status
158
+
159
+ ### Logging
160
+ Comprehensive logging with structured output:
161
+ - User operations (cache hits/misses)
162
+ - Message processing (success/failure)
163
+ - Command handling (state changes)
164
+ - Cache statistics (performance metrics)
165
+
166
+ ## Comparison with Redis
167
+
168
+ | Feature | JSON Cache | Redis Cache |
169
+ |---------|------------|-------------|
170
+ | **Setup** | No dependencies | Requires Redis server |
171
+ | **Persistence** | Always persistent | Configurable |
172
+ | **Performance** | Good (file I/O) | Excellent (memory) |
173
+ | **Scalability** | Moderate | High |
174
+ | **Reliability** | High (no external deps) | High (with proper setup) |
175
+ | **Development** | Simple | Requires Redis knowledge |
176
+
177
+ ## Use Cases
178
+
179
+ **JSON Cache is ideal for**:
180
+ - Development and testing environments
181
+ - Small to medium WhatsApp bots (< 1000 active users)
182
+ - Applications requiring guaranteed persistence
183
+ - Deployments without external dependencies
184
+ - Scenarios where setup simplicity is important
185
+
186
+ **Consider Redis for**:
187
+ - High-traffic applications (> 1000 concurrent users)
188
+ - Applications requiring sub-millisecond cache responses
189
+ - Distributed deployments
190
+ - Advanced Redis features (pub/sub, streams, etc.)
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1,69 @@
1
+ # Wappa
2
+ logs/
3
+
4
+ # Environment variables
5
+ .env
6
+ .env.local
7
+ .env.development
8
+ .env.production
9
+
10
+ # Python
11
+ __pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.so
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+
34
+ # Virtual environments
35
+ .venv/
36
+ venv/
37
+ ENV/
38
+ env/
39
+
40
+ # IDE
41
+ .vscode/
42
+ .idea/
43
+ *.swp
44
+ *.swo
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Logs
51
+ app/logs/
52
+ logs/
53
+ *.log
54
+
55
+ # Redis dumps
56
+ dump.rdb
57
+
58
+ # Temporary files
59
+ .tmp/
60
+ temp/
61
+ tmp/
62
+
63
+ # Coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ .pytest_cache/
@@ -0,0 +1,69 @@
1
+ # Wappa
2
+ logs/
3
+
4
+ # Environment variables
5
+ .env
6
+ .env.local
7
+ .env.development
8
+ .env.production
9
+
10
+ # Python
11
+ __pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.so
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+
34
+ # Virtual environments
35
+ .venv/
36
+ venv/
37
+ ENV/
38
+ env/
39
+
40
+ # IDE
41
+ .vscode/
42
+ .idea/
43
+ *.swp
44
+ *.swo
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Logs
51
+ app/logs/
52
+ logs/
53
+ *.log
54
+
55
+ # Redis dumps
56
+ dump.rdb
57
+
58
+ # Temporary files
59
+ .tmp/
60
+ temp/
61
+ tmp/
62
+
63
+ # Coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ .pytest_cache/
@@ -0,0 +1,9 @@
1
+ [project]
2
+ name = "simple-echo-example"
3
+ version = "0.1.0"
4
+ description = "Simple WhatsApp echo bot example using Wappa framework"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "wappa>=0.1.6",
9
+ ]