wallapop-mcp 0.2.0__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.
- wallapop_mcp/__init__.py +65 -0
- wallapop_mcp/cli/__init__.py +5 -0
- wallapop_mcp/cli/commands.py +1203 -0
- wallapop_mcp/cli/main.py +270 -0
- wallapop_mcp/cli/output.py +208 -0
- wallapop_mcp/client.py +1884 -0
- wallapop_mcp/config.py +297 -0
- wallapop_mcp/http.py +457 -0
- wallapop_mcp/ids.py +38 -0
- wallapop_mcp/mcp_server.py +543 -0
- wallapop_mcp/models.py +568 -0
- wallapop_mcp/publish.py +221 -0
- wallapop_mcp/py.typed +0 -0
- wallapop_mcp/session.py +92 -0
- wallapop_mcp/tokens.py +54 -0
- wallapop_mcp/weblogin.py +82 -0
- wallapop_mcp-0.2.0.dist-info/METADATA +153 -0
- wallapop_mcp-0.2.0.dist-info/RECORD +21 -0
- wallapop_mcp-0.2.0.dist-info/WHEEL +4 -0
- wallapop_mcp-0.2.0.dist-info/entry_points.txt +3 -0
- wallapop_mcp-0.2.0.dist-info/licenses/LICENSE +22 -0
wallapop_mcp/__init__.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""wallapop_mcp: typed Wallapop API client + CLI, without a browser.
|
|
2
|
+
|
|
3
|
+
Public surface (the v1 contract):
|
|
4
|
+
|
|
5
|
+
- ``Wallapop`` client with ``item``/``search``/``categories``/
|
|
6
|
+
``send_offer``/
|
|
7
|
+
``offer_response``/``counter_offer``/``send_message``/``conversation_thread``/
|
|
8
|
+
``inbox``/``make_offer_info`` and login/session helpers.
|
|
9
|
+
- Domain dataclasses ``Item``, ``Deal``, ``OfferEvent``, ``OfferState`` and the
|
|
10
|
+
derivations ``parse_offer_events``, ``offer_state_summary``, ``rank_deals``,
|
|
11
|
+
``parse_sdui_transactions``.
|
|
12
|
+
- ``resolve_internal_id`` for item references.
|
|
13
|
+
- ``ApiError`` / ``Response`` from the HTTP layer.
|
|
14
|
+
- Session aids ``load_credentials`` / ``load_session`` / ``save_session`` and
|
|
15
|
+
the session initializer ``build_client`` (which raises ``SessionError``
|
|
16
|
+
instead of exiting the interpreter).
|
|
17
|
+
- ``InvalidPrice`` for rejected price values.
|
|
18
|
+
|
|
19
|
+
The bundled CLI lives in ``wallapop_mcp.cli`` (entry point ``wallapop``) and is
|
|
20
|
+
not part of the library contract. Requires Python >= 3.10, zero mandatory
|
|
21
|
+
dependencies.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from .config import VERSION as __version__
|
|
25
|
+
from .config import CATEGORIES, load_credentials, load_session, save_session
|
|
26
|
+
from .http import ApiError, NotSentError, Response, TransportError, UnknownOutcomeError
|
|
27
|
+
from .ids import resolve_internal_id
|
|
28
|
+
from .models import (
|
|
29
|
+
Deal,
|
|
30
|
+
Item,
|
|
31
|
+
OfferEvent,
|
|
32
|
+
OfferState,
|
|
33
|
+
offer_state_summary,
|
|
34
|
+
parse_offer_events,
|
|
35
|
+
parse_sdui_transactions,
|
|
36
|
+
rank_deals,
|
|
37
|
+
)
|
|
38
|
+
from .client import InvalidPrice, Wallapop
|
|
39
|
+
from .session import SessionError, build_client
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"Wallapop",
|
|
43
|
+
"Item",
|
|
44
|
+
"Deal",
|
|
45
|
+
"OfferEvent",
|
|
46
|
+
"OfferState",
|
|
47
|
+
"parse_offer_events",
|
|
48
|
+
"offer_state_summary",
|
|
49
|
+
"rank_deals",
|
|
50
|
+
"parse_sdui_transactions",
|
|
51
|
+
"resolve_internal_id",
|
|
52
|
+
"ApiError",
|
|
53
|
+
"TransportError",
|
|
54
|
+
"NotSentError",
|
|
55
|
+
"UnknownOutcomeError",
|
|
56
|
+
"Response",
|
|
57
|
+
"InvalidPrice",
|
|
58
|
+
"SessionError",
|
|
59
|
+
"build_client",
|
|
60
|
+
"CATEGORIES",
|
|
61
|
+
"load_credentials",
|
|
62
|
+
"load_session",
|
|
63
|
+
"save_session",
|
|
64
|
+
"__version__",
|
|
65
|
+
]
|