hammad-python 0.0.13__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 (87) 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 -180
  4. hammad/_core/__init__.py +0 -1
  5. hammad/_core/_utils/__init__.py +0 -4
  6. hammad/_core/_utils/_import_utils.py +0 -182
  7. hammad/ai/__init__.py +0 -59
  8. hammad/ai/_utils.py +0 -142
  9. hammad/ai/completions/__init__.py +0 -44
  10. hammad/ai/completions/client.py +0 -729
  11. hammad/ai/completions/create.py +0 -686
  12. hammad/ai/completions/types.py +0 -711
  13. hammad/ai/completions/utils.py +0 -374
  14. hammad/ai/embeddings/__init__.py +0 -35
  15. hammad/ai/embeddings/client/__init__.py +0 -1
  16. hammad/ai/embeddings/client/base_embeddings_client.py +0 -26
  17. hammad/ai/embeddings/client/fastembed_text_embeddings_client.py +0 -200
  18. hammad/ai/embeddings/client/litellm_embeddings_client.py +0 -288
  19. hammad/ai/embeddings/create.py +0 -159
  20. hammad/ai/embeddings/types.py +0 -69
  21. hammad/base/__init__.py +0 -35
  22. hammad/base/fields.py +0 -546
  23. hammad/base/model.py +0 -1078
  24. hammad/base/utils.py +0 -280
  25. hammad/cache/__init__.py +0 -48
  26. hammad/cache/base_cache.py +0 -181
  27. hammad/cache/cache.py +0 -169
  28. hammad/cache/decorators.py +0 -261
  29. hammad/cache/file_cache.py +0 -80
  30. hammad/cache/ttl_cache.py +0 -74
  31. hammad/cli/__init__.py +0 -33
  32. hammad/cli/animations.py +0 -604
  33. hammad/cli/plugins.py +0 -781
  34. hammad/cli/styles/__init__.py +0 -55
  35. hammad/cli/styles/settings.py +0 -139
  36. hammad/cli/styles/types.py +0 -358
  37. hammad/cli/styles/utils.py +0 -480
  38. hammad/configuration/__init__.py +0 -35
  39. hammad/configuration/configuration.py +0 -564
  40. hammad/data/__init__.py +0 -39
  41. hammad/data/collections/__init__.py +0 -34
  42. hammad/data/collections/base_collection.py +0 -58
  43. hammad/data/collections/collection.py +0 -452
  44. hammad/data/collections/searchable_collection.py +0 -556
  45. hammad/data/collections/vector_collection.py +0 -603
  46. hammad/data/databases/__init__.py +0 -21
  47. hammad/data/databases/database.py +0 -902
  48. hammad/json/__init__.py +0 -21
  49. hammad/json/converters.py +0 -152
  50. hammad/logging/__init__.py +0 -35
  51. hammad/logging/decorators.py +0 -834
  52. hammad/logging/logger.py +0 -954
  53. hammad/multimodal/__init__.py +0 -24
  54. hammad/multimodal/audio.py +0 -96
  55. hammad/multimodal/image.py +0 -80
  56. hammad/multithreading/__init__.py +0 -304
  57. hammad/py.typed +0 -0
  58. hammad/pydantic/__init__.py +0 -43
  59. hammad/pydantic/converters.py +0 -623
  60. hammad/pydantic/models/__init__.py +0 -28
  61. hammad/pydantic/models/arbitrary_model.py +0 -46
  62. hammad/pydantic/models/cacheable_model.py +0 -79
  63. hammad/pydantic/models/fast_model.py +0 -318
  64. hammad/pydantic/models/function_model.py +0 -176
  65. hammad/pydantic/models/subscriptable_model.py +0 -63
  66. hammad/text/__init__.py +0 -82
  67. hammad/text/converters.py +0 -723
  68. hammad/text/markdown.py +0 -131
  69. hammad/text/text.py +0 -1066
  70. hammad/types/__init__.py +0 -11
  71. hammad/types/file.py +0 -358
  72. hammad/typing/__init__.py +0 -407
  73. hammad/web/__init__.py +0 -43
  74. hammad/web/http/__init__.py +0 -1
  75. hammad/web/http/client.py +0 -944
  76. hammad/web/models.py +0 -245
  77. hammad/web/openapi/__init__.py +0 -0
  78. hammad/web/openapi/client.py +0 -740
  79. hammad/web/search/__init__.py +0 -1
  80. hammad/web/search/client.py +0 -988
  81. hammad/web/utils.py +0 -472
  82. hammad/yaml/__init__.py +0 -30
  83. hammad/yaml/converters.py +0 -19
  84. hammad_python-0.0.13.dist-info/METADATA +0 -38
  85. hammad_python-0.0.13.dist-info/RECORD +0 -85
  86. {hammad_python-0.0.13.dist-info → hammad_python-0.0.15.dist-info}/WHEEL +0 -0
  87. {hammad_python-0.0.13.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
- )
File without changes