hammad-python 0.0.14__py3-none-any.whl → 0.0.15__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.
Files changed (101) hide show
  1. hammad_python-0.0.15.dist-info/METADATA +184 -0
  2. hammad_python-0.0.15.dist-info/RECORD +4 -0
  3. hammad/__init__.py +0 -1
  4. hammad/ai/__init__.py +0 -1
  5. hammad/ai/_utils.py +0 -142
  6. hammad/ai/completions/__init__.py +0 -45
  7. hammad/ai/completions/client.py +0 -684
  8. hammad/ai/completions/create.py +0 -710
  9. hammad/ai/completions/settings.py +0 -100
  10. hammad/ai/completions/types.py +0 -792
  11. hammad/ai/completions/utils.py +0 -486
  12. hammad/ai/embeddings/__init__.py +0 -35
  13. hammad/ai/embeddings/client/__init__.py +0 -1
  14. hammad/ai/embeddings/client/base_embeddings_client.py +0 -26
  15. hammad/ai/embeddings/client/fastembed_text_embeddings_client.py +0 -200
  16. hammad/ai/embeddings/client/litellm_embeddings_client.py +0 -288
  17. hammad/ai/embeddings/create.py +0 -159
  18. hammad/ai/embeddings/types.py +0 -69
  19. hammad/cache/__init__.py +0 -40
  20. hammad/cache/base_cache.py +0 -181
  21. hammad/cache/cache.py +0 -169
  22. hammad/cache/decorators.py +0 -261
  23. hammad/cache/file_cache.py +0 -80
  24. hammad/cache/ttl_cache.py +0 -74
  25. hammad/cli/__init__.py +0 -33
  26. hammad/cli/animations.py +0 -573
  27. hammad/cli/plugins.py +0 -781
  28. hammad/cli/styles/__init__.py +0 -55
  29. hammad/cli/styles/settings.py +0 -139
  30. hammad/cli/styles/types.py +0 -358
  31. hammad/cli/styles/utils.py +0 -480
  32. hammad/data/__init__.py +0 -56
  33. hammad/data/collections/__init__.py +0 -34
  34. hammad/data/collections/base_collection.py +0 -58
  35. hammad/data/collections/collection.py +0 -452
  36. hammad/data/collections/searchable_collection.py +0 -556
  37. hammad/data/collections/vector_collection.py +0 -596
  38. hammad/data/configurations/__init__.py +0 -35
  39. hammad/data/configurations/configuration.py +0 -564
  40. hammad/data/databases/__init__.py +0 -21
  41. hammad/data/databases/database.py +0 -902
  42. hammad/data/models/__init__.py +0 -44
  43. hammad/data/models/base/__init__.py +0 -35
  44. hammad/data/models/base/fields.py +0 -546
  45. hammad/data/models/base/model.py +0 -1078
  46. hammad/data/models/base/utils.py +0 -280
  47. hammad/data/models/pydantic/__init__.py +0 -55
  48. hammad/data/models/pydantic/converters.py +0 -632
  49. hammad/data/models/pydantic/models/__init__.py +0 -28
  50. hammad/data/models/pydantic/models/arbitrary_model.py +0 -46
  51. hammad/data/models/pydantic/models/cacheable_model.py +0 -79
  52. hammad/data/models/pydantic/models/fast_model.py +0 -318
  53. hammad/data/models/pydantic/models/function_model.py +0 -176
  54. hammad/data/models/pydantic/models/subscriptable_model.py +0 -63
  55. hammad/data/types/__init__.py +0 -41
  56. hammad/data/types/file.py +0 -358
  57. hammad/data/types/multimodal/__init__.py +0 -24
  58. hammad/data/types/multimodal/audio.py +0 -96
  59. hammad/data/types/multimodal/image.py +0 -80
  60. hammad/data/types/text.py +0 -1066
  61. hammad/formatting/__init__.py +0 -38
  62. hammad/formatting/json/__init__.py +0 -21
  63. hammad/formatting/json/converters.py +0 -152
  64. hammad/formatting/text/__init__.py +0 -63
  65. hammad/formatting/text/converters.py +0 -723
  66. hammad/formatting/text/markdown.py +0 -131
  67. hammad/formatting/yaml/__init__.py +0 -26
  68. hammad/formatting/yaml/converters.py +0 -5
  69. hammad/logging/__init__.py +0 -35
  70. hammad/logging/decorators.py +0 -834
  71. hammad/logging/logger.py +0 -954
  72. hammad/mcp/__init__.py +0 -50
  73. hammad/mcp/client/__init__.py +0 -1
  74. hammad/mcp/client/client.py +0 -523
  75. hammad/mcp/client/client_service.py +0 -393
  76. hammad/mcp/client/settings.py +0 -178
  77. hammad/mcp/servers/__init__.py +0 -1
  78. hammad/mcp/servers/launcher.py +0 -1161
  79. hammad/performance/__init__.py +0 -36
  80. hammad/performance/imports.py +0 -231
  81. hammad/performance/runtime/__init__.py +0 -32
  82. hammad/performance/runtime/decorators.py +0 -142
  83. hammad/performance/runtime/run.py +0 -299
  84. hammad/py.typed +0 -0
  85. hammad/service/__init__.py +0 -49
  86. hammad/service/create.py +0 -532
  87. hammad/service/decorators.py +0 -285
  88. hammad/typing/__init__.py +0 -407
  89. hammad/web/__init__.py +0 -43
  90. hammad/web/http/__init__.py +0 -1
  91. hammad/web/http/client.py +0 -944
  92. hammad/web/models.py +0 -245
  93. hammad/web/openapi/__init__.py +0 -1
  94. hammad/web/openapi/client.py +0 -740
  95. hammad/web/search/__init__.py +0 -1
  96. hammad/web/search/client.py +0 -988
  97. hammad/web/utils.py +0 -472
  98. hammad_python-0.0.14.dist-info/METADATA +0 -70
  99. hammad_python-0.0.14.dist-info/RECORD +0 -99
  100. {hammad_python-0.0.14.dist-info → hammad_python-0.0.15.dist-info}/WHEEL +0 -0
  101. {hammad_python-0.0.14.dist-info → hammad_python-0.0.15.dist-info}/licenses/LICENSE +0 -0
hammad/web/models.py DELETED
@@ -1,245 +0,0 @@
1
- """hammad.web.models
2
-
3
- Output models for web search and parsing functionality.
4
- """
5
-
6
- from __future__ import annotations
7
-
8
- from typing import List, Dict, Any, Optional, Union
9
- from typing_extensions import TypedDict, NotRequired
10
-
11
-
12
- # -----------------------------------------------------------------------------
13
- # Search Result Models
14
- # -----------------------------------------------------------------------------
15
-
16
-
17
- class SearchResult(TypedDict):
18
- """DuckDuckGo web search result."""
19
-
20
- title: str
21
- """Title of the search result."""
22
-
23
- href: str
24
- """URL of the search result."""
25
-
26
- body: str
27
- """Description/snippet of the search result."""
28
-
29
-
30
- class NewsResult(TypedDict):
31
- """DuckDuckGo news search result."""
32
-
33
- date: str
34
- """Publication date of the news article."""
35
-
36
- title: str
37
- """Title of the news article."""
38
-
39
- body: str
40
- """Description/snippet of the news article."""
41
-
42
- url: str
43
- """URL of the news article."""
44
-
45
- image: str
46
- """Image URL associated with the news article."""
47
-
48
- source: str
49
- """Source/publisher of the news article."""
50
-
51
-
52
- # -----------------------------------------------------------------------------
53
- # Web Page Parsing Models
54
- # -----------------------------------------------------------------------------
55
-
56
-
57
- class LinkInfo(TypedDict):
58
- """Information about a link extracted from a web page."""
59
-
60
- href: str
61
- """Absolute URL of the link."""
62
-
63
- text: str
64
- """Text content of the link."""
65
-
66
-
67
- class ImageInfo(TypedDict):
68
- """Information about an image extracted from a web page."""
69
-
70
- src: str
71
- """Source URL of the image."""
72
-
73
- alt: str
74
- """Alt text of the image."""
75
-
76
- title: str
77
- """Title attribute of the image."""
78
-
79
-
80
- class SelectedElement(TypedDict):
81
- """Information about a selected element from CSS selector."""
82
-
83
- tag: str
84
- """HTML tag name of the element."""
85
-
86
- text: str
87
- """Text content of the element."""
88
-
89
- html: str
90
- """HTML content of the element."""
91
-
92
- attributes: Dict[str, str]
93
- """Attributes of the element."""
94
-
95
-
96
- class WebPageResult(TypedDict):
97
- """Result from parsing a single web page."""
98
-
99
- url: str
100
- """URL of the parsed page."""
101
-
102
- status_code: int
103
- """HTTP status code of the response."""
104
-
105
- content_type: str
106
- """Content-Type header from the response."""
107
-
108
- title: str
109
- """Title of the web page."""
110
-
111
- text: str
112
- """Extracted text content of the page."""
113
-
114
- links: List[LinkInfo]
115
- """List of links found on the page."""
116
-
117
- images: List[ImageInfo]
118
- """List of images found on the page."""
119
-
120
- selected_elements: List[SelectedElement]
121
- """List of elements matching the CSS selector."""
122
-
123
-
124
- class WebPageErrorResult(TypedDict):
125
- """Result from a failed web page parsing attempt."""
126
-
127
- url: str
128
- """URL that failed to be parsed."""
129
-
130
- error: str
131
- """Error message describing what went wrong."""
132
-
133
- status_code: None
134
- """Always None for error results."""
135
-
136
- content_type: str
137
- """Always empty string for error results."""
138
-
139
- title: str
140
- """Always empty string for error results."""
141
-
142
- text: str
143
- """Always empty string for error results."""
144
-
145
- links: List[LinkInfo]
146
- """Always empty list for error results."""
147
-
148
- images: List[ImageInfo]
149
- """Always empty list for error results."""
150
-
151
- selected_elements: List[SelectedElement]
152
- """Always empty list for error results."""
153
-
154
-
155
- # -----------------------------------------------------------------------------
156
- # Enhanced Link Models
157
- # -----------------------------------------------------------------------------
158
-
159
-
160
- class ExtractedLink(TypedDict):
161
- """Information about a link extracted with classification."""
162
-
163
- href: str
164
- """Absolute URL of the link."""
165
-
166
- original_href: str
167
- """Original href attribute value (may be relative)."""
168
-
169
- text: str
170
- """Text content of the link."""
171
-
172
- title: str
173
- """Title attribute of the link."""
174
-
175
- type: str
176
- """Type of link: 'internal' or 'external'."""
177
-
178
-
179
- # -----------------------------------------------------------------------------
180
- # HTTP Request Models
181
- # -----------------------------------------------------------------------------
182
-
183
-
184
- class HttpResponse(TypedDict):
185
- """HTTP response from web requests."""
186
-
187
- status_code: int
188
- """HTTP status code."""
189
-
190
- headers: Dict[str, str]
191
- """Response headers."""
192
-
193
- content: Union[str, bytes]
194
- """Response content."""
195
-
196
- url: str
197
- """Final URL after redirects."""
198
-
199
- elapsed: float
200
- """Time elapsed for the request in seconds."""
201
-
202
- json: NotRequired[Optional[Dict[str, Any]]]
203
- """Parsed JSON content if Content-Type is JSON."""
204
-
205
- text: NotRequired[str]
206
- """Text content if response is text-based."""
207
-
208
-
209
- # -----------------------------------------------------------------------------
210
- # Batch Operation Models
211
- # -----------------------------------------------------------------------------
212
-
213
-
214
- WebPageResults = List[Union[WebPageResult, WebPageErrorResult]]
215
- """Results from batch web page parsing operations."""
216
-
217
- SearchResults = List[SearchResult]
218
- """Results from web search operations."""
219
-
220
- NewsResults = List[NewsResult]
221
- """Results from news search operations."""
222
-
223
- ExtractedLinks = List[ExtractedLink]
224
- """Results from link extraction operations."""
225
-
226
-
227
- __all__ = (
228
- # Search models
229
- "SearchResult",
230
- "NewsResult",
231
- "SearchResults",
232
- "NewsResults",
233
- # Web page models
234
- "LinkInfo",
235
- "ImageInfo",
236
- "SelectedElement",
237
- "WebPageResult",
238
- "WebPageErrorResult",
239
- "WebPageResults",
240
- # Link extraction models
241
- "ExtractedLink",
242
- "ExtractedLinks",
243
- # HTTP models
244
- "HttpResponse",
245
- )
@@ -1 +0,0 @@
1
- """hammad.web.openapi"""