wappa 0.1.1__py3-none-any.whl → 0.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

wappa/cli/main.py CHANGED
@@ -17,21 +17,28 @@ app = typer.Typer(help="Wappa WhatsApp Business Framework CLI")
17
17
  def _resolve_module_name(file_path: str) -> tuple[str, Path]:
18
18
  """
19
19
  Convert a file path to a Python module name and working directory.
20
-
21
- Examples:
20
+
21
+ Handles both flat and nested project structures:
22
22
  main.py -> ("main", Path("."))
23
- examples/redis_demo/main.py -> ("main", Path("examples/redis_demo"))
23
+ app/main.py -> ("app.main", Path(".")) # Use dotted import from project root
24
+ examples/redis_demo/main.py -> ("examples.redis_demo.main", Path("."))
24
25
 
25
26
  Returns:
26
27
  tuple[str, Path]: (module_name, working_directory)
27
28
  """
28
29
  # Convert to Path object for better handling
29
30
  path = Path(file_path)
30
-
31
- # Get the directory and filename
32
- working_dir = path.parent if path.parent != Path(".") else Path(".")
33
- module_name = path.stem # Just the filename without extension
34
-
31
+
32
+ # Always use current directory as working dir and create dotted module name
33
+ working_dir = Path(".")
34
+
35
+ # Convert path to dotted module name (remove .py extension)
36
+ if path.suffix == ".py":
37
+ path = path.with_suffix("")
38
+
39
+ # Convert path separators to dots for Python import
40
+ module_name = str(path).replace(os.path.sep, ".")
41
+
35
42
  return module_name, working_dir
36
43
 
37
44
 
@@ -9,7 +9,7 @@ from typing import Any
9
9
 
10
10
  from pydantic import BaseModel
11
11
 
12
- from ..domain.interfaces.cache_interface import ICache
12
+ from ...domain.interfaces.cache_interface import ICache
13
13
  from .handlers.state_handler import JSONStateHandler
14
14
  from .handlers.table_handler import JSONTable
15
15
  from .handlers.user_handler import JSONUser
@@ -5,8 +5,8 @@ Creates JSON-backed cache instances using file-based storage
5
5
  with ICache adapters for uniform interface.
6
6
  """
7
7
 
8
- from ..domain.interfaces.cache_factory import ICacheFactory
9
- from ..domain.interfaces.cache_interface import ICache
8
+ from ...domain.interfaces.cache_factory import ICacheFactory
9
+ from ...domain.interfaces.cache_interface import ICache
10
10
  from .cache_adapters import (
11
11
  JSONStateCacheAdapter,
12
12
  JSONTableCacheAdapter,
@@ -9,7 +9,7 @@ from typing import Any
9
9
 
10
10
  from pydantic import BaseModel
11
11
 
12
- from ..domain.interfaces.cache_interface import ICache
12
+ from ...domain.interfaces.cache_interface import ICache
13
13
  from .handlers.state_handler import MemoryStateHandler
14
14
  from .handlers.table_handler import MemoryTable
15
15
  from .handlers.user_handler import MemoryUser
@@ -5,8 +5,8 @@ Creates memory-backed cache instances using in-memory storage
5
5
  with ICache adapters for uniform interface.
6
6
  """
7
7
 
8
- from ..domain.interfaces.cache_factory import ICacheFactory
9
- from ..domain.interfaces.cache_interface import ICache
8
+ from ...domain.interfaces.cache_factory import ICacheFactory
9
+ from ...domain.interfaces.cache_interface import ICache
10
10
  from .cache_adapters import (
11
11
  MemoryStateCacheAdapter,
12
12
  MemoryTableCacheAdapter,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wappa
3
- Version: 0.1.1
3
+ Version: 0.1.5
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
@@ -20,7 +20,7 @@ wappa/api/routes/whatsapp/whatsapp_messages.py,sha256=_CM_HDtrvC4HOk1Mhv4nvkTPNq
20
20
  wappa/api/routes/whatsapp/whatsapp_specialized.py,sha256=O5yYq5omYkEzGoB5hPsAbM1xUQ0ZEz2AO0i71PTSGag,18509
21
21
  wappa/api/routes/whatsapp/whatsapp_templates.py,sha256=xx-UvuOFDtADUbXrwsSEc-I9u2w_jHqlUO-9ZN1uIdY,15371
22
22
  wappa/cli/__init__.py,sha256=IAcBraY6UIX5UE2gUcMZBDrPS2CRxd84eVR3IMI8S14,148
23
- wappa/cli/main.py,sha256=qPn49S14ILRG9md-13ONU_TY7vPNUplwuwxlycXVpeA,6133
23
+ wappa/cli/main.py,sha256=gFhJSBrD9iNffX2dW2pP0KwxLGI0why-wrz8AiFPfrI,6452
24
24
  wappa/core/__init__.py,sha256=LbKtd10YiwBpjyYFtIUtIQrpQV-p94vR9LouQB17R88,149
25
25
  wappa/core/types.py,sha256=ez9aAXpD2D6GT7uNhw17XlZbQU_PYTcvGpWleAKEe24,2743
26
26
  wappa/core/wappa_app.py,sha256=0gmDdQr5-NZyEvFnHUHyZB_51RSl3nM57BMacey8GbY,18956
@@ -99,8 +99,8 @@ wappa/messaging/whatsapp/models/specialized_models.py,sha256=jus5IH5yKje2kph78UT
99
99
  wappa/messaging/whatsapp/models/template_models.py,sha256=rapAwbvJeJ4pqeDtSRyhoMZuVgiy-WFTmVVZCrcrpLA,8580
100
100
  wappa/persistence/cache_factory.py,sha256=428eCUWbo37fsSOPGCuMvjwqTn3FedCIeHBYf6oYKuA,2832
101
101
  wappa/persistence/json/__init__.py,sha256=YWGnYXGXzljpM6Vhgb9qC0En_ffg3g63jxflIIddxMI,371
102
- wappa/persistence/json/cache_adapters.py,sha256=lvuLOL5FKozM1FDiRSVb41D6zdDdHnycE87AnTwaFLE,10252
103
- wappa/persistence/json/json_cache_factory.py,sha256=h1DCNb4dI034OymGA6dXvzYG4n12u3iT4coLbCQjewU,2343
102
+ wappa/persistence/json/cache_adapters.py,sha256=mOOaERqeTsPmh4E-6W-Q36XmAEufUfT6b2SypbZt2FE,10253
103
+ wappa/persistence/json/json_cache_factory.py,sha256=dRM15u1gI-oiNsDRfTgggyEtZjAYfXweBliAdmHpS4c,2345
104
104
  wappa/persistence/json/storage_manager.py,sha256=Coi_KdXRotW8qtADsr7O_7JqREQhyCjom9jz9gAH5I8,9094
105
105
  wappa/persistence/json/handlers/__init__.py,sha256=idUBFqDp7OHCUKxz3w5gqBEms2QABjfvrnAJVlu08Dk,34
106
106
  wappa/persistence/json/handlers/state_handler.py,sha256=RGoqtRkUeapVCAkl-rrCS8PumOg0aUT_KOcRNJQMlR8,7442
@@ -111,8 +111,8 @@ wappa/persistence/json/handlers/utils/file_manager.py,sha256=AixndHURExCvL1x_Sfh
111
111
  wappa/persistence/json/handlers/utils/key_factory.py,sha256=8_8TyTxrtC7W_4PPmQbNF8r1FGV9cSpiiSocOutdIVc,353
112
112
  wappa/persistence/json/handlers/utils/serialization.py,sha256=h4aYy2_GfL4WZhd99V-_Wd9nJhi7AjuFhMd-aQmIb3o,3748
113
113
  wappa/persistence/memory/__init__.py,sha256=imjVX4o6JuH2LS7ndZHBc0KgLFAYnygFSjscdqIe2W4,385
114
- wappa/persistence/memory/cache_adapters.py,sha256=qsnRCv7wRQmtRKFDRrOjClWU4qdpwi71GKKB3w4Xnr0,10280
115
- wappa/persistence/memory/memory_cache_factory.py,sha256=dGQzh1BqslAgdZVImRA9RJGjZf_IZiQ0u1QV0hIjzoY,2491
114
+ wappa/persistence/memory/cache_adapters.py,sha256=AAuD6u-zHZ6LfDI4RKG8De3OnpzDzI4JBlbyk5ML-q8,10281
115
+ wappa/persistence/memory/memory_cache_factory.py,sha256=fEz2m0KDzJW2hnO7xQK4F3RtgvCFWVFDDYzN5fgynkI,2493
116
116
  wappa/persistence/memory/storage_manager.py,sha256=SzM8gb9SFd8VvTSU5CU3whVLAixifHiYxzXYaANbPJw,7582
117
117
  wappa/persistence/memory/handlers/__init__.py,sha256=SXciLGkttBZWhnSxUbyI3E-iAN71wPD0emJzUh0fgIA,36
118
118
  wappa/persistence/memory/handlers/state_handler.py,sha256=jV5i3Vj4vwPMZK05CLveN4IhNKqS7TLYr-Z_O1Ochs0,7456
@@ -204,8 +204,8 @@ wappa/webhooks/whatsapp/message_types/system.py,sha256=lrAwSTNokxjDkgCg7Hg33eb8s
204
204
  wappa/webhooks/whatsapp/message_types/text.py,sha256=u3gXGMNpJFDdaJWA0vhBGFTyAEzI2fyqvtaVvZwzAhA,14688
205
205
  wappa/webhooks/whatsapp/message_types/unsupported.py,sha256=5GxVcNNu2X5H1gZvze3iNNrZUrUs2DxmiL3bruS38RI,9532
206
206
  wappa/webhooks/whatsapp/message_types/video.py,sha256=NR081ZyNwxajmCbOw-LvPadU97Qksghxr_TWhWsZEz0,11271
207
- wappa-0.1.1.dist-info/METADATA,sha256=VfeOyDkZj4MxwxejJ3mxqYcC3oUCAxp8n5ZKexpJS98,16559
208
- wappa-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
209
- wappa-0.1.1.dist-info/entry_points.txt,sha256=KzfFZSK3VpWP4M-gpgh9AdKbhh4kOwiOI3q32e3NLHs,45
210
- wappa-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
211
- wappa-0.1.1.dist-info/RECORD,,
207
+ wappa-0.1.5.dist-info/METADATA,sha256=9R8Q62hhfveVeIMZ5tQXVe_Fji7sHqv73kGKsaYUT8U,16559
208
+ wappa-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
209
+ wappa-0.1.5.dist-info/entry_points.txt,sha256=KzfFZSK3VpWP4M-gpgh9AdKbhh4kOwiOI3q32e3NLHs,45
210
+ wappa-0.1.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
211
+ wappa-0.1.5.dist-info/RECORD,,
File without changes