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/utils.py DELETED
@@ -1,472 +0,0 @@
1
- """hammad.web.utils"""
2
-
3
- import asyncio
4
- from typing import Any, Dict, Optional, Union, Literal, List, overload, TYPE_CHECKING
5
-
6
- if TYPE_CHECKING:
7
- from .http.client import HttpResponse
8
-
9
- from .models import (
10
- SearchResults,
11
- NewsResults,
12
- WebPageResult,
13
- WebPageResults,
14
- ExtractedLinks,
15
- HttpResponse as HttpResponseModel,
16
- )
17
-
18
- __all__ = (
19
- "run_web_request",
20
- "search_web",
21
- "read_web_page",
22
- "read_web_pages",
23
- "search_news",
24
- "extract_page_links",
25
- )
26
-
27
-
28
- # Module-level singleton for performance
29
- _search_client = None
30
-
31
-
32
- def _get_search_client():
33
- """Get a SearchClient instance using lazy import and singleton pattern."""
34
- global _search_client
35
- if _search_client is None:
36
- from .search.client import AsyncSearchClient as SearchClient
37
-
38
- _search_client = SearchClient()
39
- return _search_client
40
-
41
-
42
- @overload
43
- def run_web_request(
44
- type: Literal["http"],
45
- method: Literal["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
46
- url: str,
47
- *,
48
- headers: Optional[Dict[str, str]] = None,
49
- params: Optional[Dict[str, Any]] = None,
50
- json_data: Optional[Dict[str, Any]] = None,
51
- form_data: Optional[Dict[str, Any]] = None,
52
- content: Optional[Union[str, bytes]] = None,
53
- timeout: Optional[float] = None,
54
- follow_redirects: bool = True,
55
- base_url: Optional[str] = None,
56
- default_headers: Optional[Dict[str, str]] = None,
57
- verify_ssl: bool = True,
58
- # Semantic authentication parameters
59
- api_key: Optional[str] = None,
60
- api_key_header: str = "X-API-Key",
61
- bearer_token: Optional[str] = None,
62
- basic_auth: Optional[tuple[str, str]] = None,
63
- user_agent: Optional[str] = None,
64
- retry_attempts: int = 0,
65
- retry_delay: float = 1.0,
66
- ) -> "HttpResponse": ...
67
-
68
-
69
- @overload
70
- def run_web_request(
71
- type: Literal["openapi"],
72
- openapi_spec: Union[str, Dict[str, Any]],
73
- operation_id: str,
74
- *,
75
- parameters: Optional[Dict[str, Any]] = None,
76
- request_body: Optional[Dict[str, Any]] = None,
77
- headers: Optional[Dict[str, str]] = None,
78
- base_url: Optional[str] = None,
79
- default_headers: Optional[Dict[str, str]] = None,
80
- timeout: float = 30.0,
81
- follow_redirects: bool = True,
82
- verify_ssl: bool = True,
83
- # Semantic authentication parameters
84
- api_key: Optional[str] = None,
85
- api_key_header: str = "X-API-Key",
86
- bearer_token: Optional[str] = None,
87
- basic_auth: Optional[tuple[str, str]] = None,
88
- user_agent: Optional[str] = None,
89
- ) -> "HttpResponse": ...
90
-
91
-
92
- def run_web_request(
93
- type: Literal["http", "openapi"], *args, **kwargs
94
- ) -> "HttpResponse":
95
- """
96
- Create and execute a request using either HTTP or OpenAPI toolkits.
97
-
98
- This function initializes the appropriate toolkit and sends the request,
99
- returning the HTTP response.
100
-
101
- Args:
102
- type: Type of request - "http" for direct HTTP requests or "openapi" for OpenAPI operations
103
-
104
- HTTP-specific args:
105
- method: HTTP method
106
- url: Request URL
107
- headers: Request headers
108
- params: Query parameters
109
- json_data: JSON request body
110
- form_data: Form data
111
- content: Raw content
112
- timeout: Request timeout
113
- follow_redirects: Whether to follow redirects
114
- base_url: Base URL for requests
115
- default_headers: Default headers
116
- verify_ssl: Whether to verify SSL certificates
117
-
118
- OpenAPI-specific args:
119
- openapi_spec: OpenAPI specification (dict, JSON string, or YAML string)
120
- operation_id: OpenAPI operation ID to execute
121
- parameters: Operation parameters
122
- request_body: Request body for the operation
123
- headers: Additional headers
124
- base_url: Base URL override
125
- default_headers: Default headers
126
- timeout: Request timeout
127
- follow_redirects: Whether to follow redirects
128
- verify_ssl: Whether to verify SSL certificates
129
-
130
- Returns:
131
- HttpResponse object containing the response data
132
-
133
- Raises:
134
- ValueError: For invalid request type or missing required parameters
135
- HttpToolkitError: For HTTP-related errors
136
- OpenApiToolkitError: For OpenAPI-related errors
137
- """
138
-
139
- async def _run_web_request_async():
140
- if type == "http":
141
- if len(args) < 2:
142
- raise ValueError(
143
- "HTTP requests require method and url as positional arguments"
144
- )
145
-
146
- method, url = args[0], args[1]
147
-
148
- # Import here to avoid circular imports
149
- from .http.client import HttpClient as HttpToolkit
150
-
151
- # Initialize the HTTP toolkit
152
- toolkit = HttpToolkit(
153
- base_url=kwargs.get("base_url"),
154
- default_headers=kwargs.get("default_headers", {}),
155
- timeout=kwargs.get("timeout", 30.0),
156
- follow_redirects=kwargs.get("follow_redirects", True),
157
- verify_ssl=kwargs.get("verify_ssl", True),
158
- api_key=kwargs.get("api_key"),
159
- api_key_header=kwargs.get("api_key_header", "X-API-Key"),
160
- bearer_token=kwargs.get("bearer_token"),
161
- basic_auth=kwargs.get("basic_auth"),
162
- user_agent=kwargs.get("user_agent"),
163
- )
164
-
165
- # Execute the request based on method
166
- if method.upper() == "GET":
167
- return await toolkit.get(
168
- url,
169
- headers=kwargs.get("headers"),
170
- params=kwargs.get("params"),
171
- timeout=kwargs.get("timeout"),
172
- retry_attempts=kwargs.get("retry_attempts", 0),
173
- retry_delay=kwargs.get("retry_delay", 1.0),
174
- )
175
- elif method.upper() == "POST":
176
- return await toolkit.post(
177
- url,
178
- headers=kwargs.get("headers"),
179
- json_data=kwargs.get("json_data"),
180
- form_data=kwargs.get("form_data"),
181
- timeout=kwargs.get("timeout"),
182
- retry_attempts=kwargs.get("retry_attempts", 0),
183
- )
184
- elif method.upper() == "PUT":
185
- return await toolkit.put(
186
- url,
187
- headers=kwargs.get("headers"),
188
- json_data=kwargs.get("json_data"),
189
- form_data=kwargs.get("form_data"),
190
- timeout=kwargs.get("timeout"),
191
- retry_attempts=kwargs.get("retry_attempts", 0),
192
- )
193
- elif method.upper() == "PATCH":
194
- return await toolkit.patch(
195
- url,
196
- headers=kwargs.get("headers"),
197
- json_data=kwargs.get("json_data"),
198
- form_data=kwargs.get("form_data"),
199
- timeout=kwargs.get("timeout"),
200
- retry_attempts=kwargs.get("retry_attempts", 0),
201
- )
202
- elif method.upper() == "DELETE":
203
- return await toolkit.delete(
204
- url,
205
- headers=kwargs.get("headers"),
206
- timeout=kwargs.get("timeout"),
207
- retry_attempts=kwargs.get("retry_attempts", 0),
208
- )
209
- else:
210
- raise ValueError(f"Unsupported HTTP method: {method}")
211
-
212
- elif type == "openapi":
213
- from .openapi.client import OpenAPIClient as OpenApiToolkit
214
-
215
- if len(args) < 2:
216
- raise ValueError(
217
- "OpenAPI requests require openapi_spec and operation_id as positional arguments"
218
- )
219
-
220
- openapi_spec, operation_id = args[0], args[1]
221
-
222
- # Initialize the OpenAPI toolkit
223
- toolkit = OpenApiToolkit(
224
- openapi_spec=openapi_spec,
225
- base_url=kwargs.get("base_url"),
226
- default_headers=kwargs.get("default_headers"),
227
- timeout=kwargs.get("timeout", 30.0),
228
- follow_redirects=kwargs.get("follow_redirects", True),
229
- verify_ssl=kwargs.get("verify_ssl", True),
230
- api_key=kwargs.get("api_key"),
231
- api_key_header=kwargs.get("api_key_header", "X-API-Key"),
232
- bearer_token=kwargs.get("bearer_token"),
233
- basic_auth=kwargs.get("basic_auth"),
234
- user_agent=kwargs.get("user_agent"),
235
- )
236
-
237
- # Execute the OpenAPI operation
238
- return await toolkit.execute_operation(
239
- operation_id=operation_id,
240
- parameters=kwargs.get("parameters"),
241
- request_body=kwargs.get("request_body"),
242
- headers=kwargs.get("headers"),
243
- )
244
-
245
- else:
246
- raise ValueError(
247
- f"Invalid request type: {type}. Must be 'http' or 'openapi'"
248
- )
249
-
250
- return asyncio.run(_run_web_request_async())
251
-
252
-
253
- def search_web(
254
- query: str,
255
- *,
256
- max_results: int = 10,
257
- region: str = "wt-wt",
258
- safesearch: Literal["on", "moderate", "off"] = "moderate",
259
- timelimit: Optional[Literal["d", "w", "m", "y"]] = None,
260
- backend: Literal["auto", "html", "lite"] = "auto",
261
- retry_attempts: int = 3,
262
- retry_delay: float = 1.0,
263
- ) -> SearchResults:
264
- """
265
- Search the web using DuckDuckGo search.
266
-
267
- Args:
268
- query: Search query string
269
- max_results: Maximum number of results to return (default: 10)
270
- region: Search region (default: "wt-wt" for worldwide)
271
- safesearch: Safe search setting (default: "moderate")
272
- timelimit: Time limit for results (d=day, w=week, m=month, y=year)
273
- backend: Search backend to use (default: "auto")
274
- retry_attempts: Number of retry attempts for rate limit errors (default: 3)
275
- retry_delay: Initial delay between retries in seconds (default: 1.0)
276
-
277
- Returns:
278
- List of search result dictionaries with 'title', 'href', and 'body' keys
279
-
280
- Raises:
281
- ValueError: If query is empty
282
- Exception: If search fails after all retries
283
- """
284
-
285
- async def _search_web_async():
286
- client = _get_search_client()
287
- return await client.search_web(
288
- query=query,
289
- max_results=max_results,
290
- region=region,
291
- safesearch=safesearch,
292
- timelimit=timelimit,
293
- backend=backend,
294
- )
295
-
296
- return asyncio.run(_search_web_async())
297
-
298
-
299
- def read_web_page(
300
- url: str,
301
- *,
302
- timeout: float = 30.0,
303
- headers: Optional[Dict[str, str]] = None,
304
- extract_text: bool = True,
305
- extract_links: bool = False,
306
- extract_images: bool = False,
307
- css_selector: Optional[str] = None,
308
- ) -> WebPageResult:
309
- """
310
- Read and parse a single web page using selectolax.
311
-
312
- Args:
313
- url: URL to fetch and parse
314
- timeout: Request timeout in seconds (default: 30.0)
315
- headers: Optional HTTP headers to send
316
- extract_text: Whether to extract text content (default: True)
317
- extract_links: Whether to extract links (default: False)
318
- extract_images: Whether to extract images (default: False)
319
- css_selector: Optional CSS selector to extract specific elements
320
-
321
- Returns:
322
- Dictionary containing parsed content and metadata
323
-
324
- Raises:
325
- httpx.HTTPError: If request fails
326
- Exception: If parsing fails
327
- """
328
-
329
- async def _read_web_page_async():
330
- client = _get_search_client()
331
- return await client.read_web_page(
332
- url=url,
333
- timeout=timeout,
334
- headers=headers,
335
- extract_text=extract_text,
336
- extract_links=extract_links,
337
- extract_images=extract_images,
338
- css_selector=css_selector,
339
- )
340
-
341
- return asyncio.run(_read_web_page_async())
342
-
343
-
344
- def read_web_pages(
345
- urls: List[str],
346
- *,
347
- timeout: float = 30.0,
348
- headers: Optional[Dict[str, str]] = None,
349
- extract_text: bool = True,
350
- extract_links: bool = False,
351
- extract_images: bool = False,
352
- css_selector: Optional[str] = None,
353
- max_concurrent: int = 5,
354
- ) -> WebPageResults:
355
- """
356
- Read and parse multiple web pages concurrently using selectolax.
357
-
358
- Args:
359
- urls: List of URLs to fetch and parse
360
- timeout: Request timeout in seconds (default: 30.0)
361
- headers: Optional HTTP headers to send
362
- extract_text: Whether to extract text content (default: True)
363
- extract_links: Whether to extract links (default: False)
364
- extract_images: Whether to extract images (default: False)
365
- css_selector: Optional CSS selector to extract specific elements
366
- max_concurrent: Maximum number of concurrent requests (default: 5)
367
-
368
- Returns:
369
- List of dictionaries containing parsed content and metadata
370
-
371
- Raises:
372
- Exception: If any critical error occurs
373
- """
374
-
375
- async def _read_web_pages_async():
376
- client = _get_search_client()
377
- return await client.read_web_pages(
378
- urls=urls,
379
- timeout=timeout,
380
- headers=headers,
381
- extract_text=extract_text,
382
- extract_links=extract_links,
383
- extract_images=extract_images,
384
- css_selector=css_selector,
385
- max_concurrent=max_concurrent,
386
- )
387
-
388
- return asyncio.run(_read_web_pages_async())
389
-
390
-
391
- def search_news(
392
- query: str,
393
- *,
394
- max_results: int = 10,
395
- region: str = "wt-wt",
396
- safesearch: Literal["on", "moderate", "off"] = "moderate",
397
- timelimit: Optional[Literal["d", "w", "m"]] = None,
398
- ) -> NewsResults:
399
- """
400
- Search for news using DuckDuckGo news search.
401
-
402
- Args:
403
- query: Search query string
404
- max_results: Maximum number of results to return (default: 10)
405
- region: Search region (default: "wt-wt" for worldwide)
406
- safesearch: Safe search setting (default: "moderate")
407
- timelimit: Time limit for results (d=day, w=week, m=month)
408
-
409
- Returns:
410
- List of news result dictionaries with date, title, body, url, image, and source
411
-
412
- Raises:
413
- ValueError: If query is empty
414
- Exception: If search fails
415
- """
416
-
417
- async def _search_news_async():
418
- client = _get_search_client()
419
- return await client.search_news(
420
- query=query,
421
- max_results=max_results,
422
- region=region,
423
- safesearch=safesearch,
424
- timelimit=timelimit,
425
- )
426
-
427
- return asyncio.run(_search_news_async())
428
-
429
-
430
- def extract_page_links(
431
- url: str,
432
- *,
433
- timeout: float = 30.0,
434
- headers: Optional[Dict[str, str]] = None,
435
- css_selector: str = "a[href]",
436
- include_external: bool = True,
437
- include_internal: bool = True,
438
- base_url: Optional[str] = None,
439
- ) -> ExtractedLinks:
440
- """
441
- Extract links from a web page using selectolax.
442
-
443
- Args:
444
- url: URL to fetch and extract links from
445
- timeout: Request timeout in seconds (default: 30.0)
446
- headers: Optional HTTP headers to send
447
- css_selector: CSS selector for links (default: "a[href]")
448
- include_external: Whether to include external links (default: True)
449
- include_internal: Whether to include internal links (default: True)
450
- base_url: Base URL for resolving relative links (uses page URL if not provided)
451
-
452
- Returns:
453
- List of link dictionaries with href, text, title, and type (internal/external)
454
-
455
- Raises:
456
- httpx.HTTPError: If request fails
457
- Exception: If parsing fails
458
- """
459
-
460
- async def _extract_page_links_async():
461
- client = _get_search_client()
462
- return await client.extract_page_links(
463
- url=url,
464
- timeout=timeout,
465
- headers=headers,
466
- css_selector=css_selector,
467
- include_external=include_external,
468
- include_internal=include_internal,
469
- base_url=base_url,
470
- )
471
-
472
- return asyncio.run(_extract_page_links_async())
hammad/yaml/__init__.py DELETED
@@ -1,30 +0,0 @@
1
- """hammad.yaml
2
-
3
- Simply extends the `msgspec.yaml` submodule."""
4
-
5
- from typing import TYPE_CHECKING
6
- from .._core._utils._import_utils import _auto_create_getattr_loader
7
-
8
- if TYPE_CHECKING:
9
- from .converters import (
10
- Yaml,
11
- encode_yaml,
12
- decode_yaml,
13
- read_yaml_file,
14
- )
15
-
16
-
17
- __all__ = (
18
- "Yaml",
19
- "encode_yaml",
20
- "decode_yaml",
21
- "read_yaml_file",
22
- )
23
-
24
-
25
- __getattr__ = _auto_create_getattr_loader(__all__)
26
-
27
-
28
- def __dir__() -> list[str]:
29
- """Get the attributes of the yaml module."""
30
- return list(__all__)
hammad/yaml/converters.py DELETED
@@ -1,19 +0,0 @@
1
- """hammad.yaml.converters"""
2
-
3
- from msgspec.yaml import encode as encode_yaml, decode as decode_yaml
4
- from ..configuration.configuration import Configuration as Yaml
5
-
6
- __all__ = ("encode_yaml", "decode_yaml", "read_yaml_file", "Yaml")
7
-
8
-
9
- def read_yaml_file(path: str) -> Yaml:
10
- """Parses a YAML file to return a Configuration object.
11
- This utilizes the following file types:
12
-
13
- Args:
14
- path (str): The path to the YAML file.
15
-
16
- Returns:
17
- Yaml: A Configuration object.
18
- """
19
- return Yaml.from_file(path)
@@ -1,38 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hammad-python
3
- Version: 0.0.13
4
- Summary: hammad - *Nightly* hyper-fast opinionated resources and modules built for quick development.
5
- Author-email: Hammad Saeed <hammadaidev@gmail.com>
6
- License-File: LICENSE
7
- Requires-Python: >=3.11
8
- Requires-Dist: docstring-parser>=0.16
9
- Requires-Dist: duckduckgo-search>=8.0.4
10
- Requires-Dist: httpx>=0.28.1
11
- Requires-Dist: msgspec>=0.19.0
12
- Requires-Dist: prompt-toolkit>=3.0.51
13
- Requires-Dist: pydantic>=2.11.5
14
- Requires-Dist: python-dotenv>=1.1.0
15
- Requires-Dist: pyyaml>=6.0.2
16
- Requires-Dist: rich>=13.9.4
17
- Requires-Dist: selectolax>=0.3.30
18
- Requires-Dist: sqlalchemy>=2.0.41
19
- Requires-Dist: tantivy>=0.24.0
20
- Requires-Dist: tenacity>=9.0.0
21
- Requires-Dist: typing-inspect>=0.9.0
22
- Requires-Dist: uvloop>=0.21.0
23
- Provides-Extra: ai
24
- Requires-Dist: instructor>=1.9.0; extra == 'ai'
25
- Requires-Dist: litellm>=1.72.4; extra == 'ai'
26
- Requires-Dist: openai-agents>=0.0.19; extra == 'ai'
27
- Requires-Dist: qdrant-client>=1.14.3; extra == 'ai'
28
- Provides-Extra: fastembed
29
- Requires-Dist: fastembed; extra == 'fastembed'
30
- Provides-Extra: serve
31
- Requires-Dist: fastapi>=0.115.8; extra == 'serve'
32
- Requires-Dist: python-multipart>=0.0.19; extra == 'serve'
33
- Requires-Dist: sse-starlette>=1.1.0; extra == 'serve'
34
- Requires-Dist: uvicorn>=0.34.0; extra == 'serve'
35
- Description-Content-Type: text/markdown
36
-
37
- # hammad-python
38
- hammadpy - *Nightly* hyper-fast opinionated resources and modules built for quick development.
@@ -1,85 +0,0 @@
1
- hammad/__init__.py,sha256=q812SgfUvft8HbB1HLDfuBgt0dBpnTnHc1uprM3HOec,3962
2
- hammad/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- hammad/_core/__init__.py,sha256=AOFUkG80nF2WSgQQSdFE_kehH77gBskKYrzKSNogi8Q,19
4
- hammad/_core/_utils/__init__.py,sha256=pqNuAShC-0BJ4td85wrwSfXk7zOo1RFde-oO3VUA_iQ,133
5
- hammad/_core/_utils/_import_utils.py,sha256=uO1XWolUV8Zcu1ZVeTAr6-_Zvwwvxjxew-te968kP0E,6048
6
- hammad/ai/__init__.py,sha256=vfIDw17dy4ZKL44U7iz4-R5OzUQJFtQs1tAdWaNOWpI,1380
7
- hammad/ai/_utils.py,sha256=axsCHv66zfjjhlEbxaF_049fClHjQgHtUReXs8nsMwc,3950
8
- hammad/ai/completions/__init__.py,sha256=7JiR29M-AI5XOcD5lY85GolJcb0B6Jm67I7bbCz6n0g,1058
9
- hammad/ai/completions/client.py,sha256=ulobB3PTY-hY7JTgMyqiguKhKTE8EivSDW_P1_6H3J8,27387
10
- hammad/ai/completions/create.py,sha256=jXqBzZ0-K9BzVQX4X70sN8WYYnbcJL_1ZJelgDYd0fw,29970
11
- hammad/ai/completions/types.py,sha256=9kD_eiZHZ52lKt72y4Nnfb9PmY7jWhq9Ncv5x4spRRI,25575
12
- hammad/ai/completions/utils.py,sha256=Y9GVl_buljRDrbG0THG9398jJKy4wZc689D4PHiWfJc,13138
13
- hammad/ai/embeddings/__init__.py,sha256=4KduX3CTfYG8acp9Smhvqhf_24o4eCZsq4c85fE1IXI,1105
14
- hammad/ai/embeddings/create.py,sha256=voVD6WLvoyIgqIMYOmJKJFxUho8ZIl0YDfbgM4X6B6w,6590
15
- hammad/ai/embeddings/types.py,sha256=O6MgrGl6431-cH5sRLyNz7BXIehVyfpMDqrCe4wHxyA,1761
16
- hammad/ai/embeddings/client/__init__.py,sha256=F2SO89Q6xOYQWNfvAONBJdDLoXIsCxON6I1BxpjEkGQ,34
17
- hammad/ai/embeddings/client/base_embeddings_client.py,sha256=EMT8jDMa0TKIV9XA9Tx9ze7eJ882OuCLL9KucI2EezQ,600
18
- hammad/ai/embeddings/client/fastembed_text_embeddings_client.py,sha256=814inmH6YgA8mi0hSBKT2P-sCALaiotWNzlsMewQ-Z0,6945
19
- hammad/ai/embeddings/client/litellm_embeddings_client.py,sha256=7aFspROjacnAA79jm7f0stzlSi4EHwEgZqI7Im2gNic,10031
20
- hammad/base/__init__.py,sha256=PooFQh69XNCeySLj2bfAuwn5xMI2kesl3WjRmsxukiw,818
21
- hammad/base/fields.py,sha256=n02Qqq1AkcxwGCGEjcBSu63uWSkcyfxisATr7nwc7DA,19173
22
- hammad/base/model.py,sha256=_qyJ3IRJTwRXqZsYMpuYP8FTbMfLgh75VbTrTt1Wqx8,39121
23
- hammad/base/utils.py,sha256=kmdWqDcCTB7y4w5pdAfyrOfpzqj1hjKILIklAwbvNxM,9957
24
- hammad/cache/__init__.py,sha256=W5CK3JvbfHzS_-KmGIS_ZtjnXuXRjWGmSKaT2eeftEE,1104
25
- hammad/cache/base_cache.py,sha256=kYJS2IcQtxhzT7BQBFtOWnhw4VkvAapPhAVkfbW5IeY,6353
26
- hammad/cache/cache.py,sha256=bzDXxjSolrSdIxqES2VMfVZZGTk_8k4x9n0AW4tlifs,4621
27
- hammad/cache/decorators.py,sha256=olYLK5x4JkxHpA8WIiplI45QYmNIzyGjNMrTKNRCSQg,9599
28
- hammad/cache/file_cache.py,sha256=XjLJxM4Ql65OABxz8q1DtA_s8HZQJKywCw6MNVnC6YE,2485
29
- hammad/cache/ttl_cache.py,sha256=-0pJ4lkVgg1OIb98bQFub9n6f4zgWVs-dQfKZe_DmpE,2153
30
- hammad/cli/__init__.py,sha256=81UslbyYQ3-2tJNYQv1pHe5R0_nufAAo6ktpDeuEskQ,758
31
- hammad/cli/animations.py,sha256=_ILMhyT_02FlLMhROe6br0Fhz2EVEwgOyKHY55qWsJY,20541
32
- hammad/cli/plugins.py,sha256=61cljGF_V03_6xrBhO0tR-rrlgB44veHh5HXcxMTM3Y,26932
33
- hammad/cli/styles/__init__.py,sha256=4HE20exLpIQgPGFt6KnCbjiYaK95fXvFJBGGjJZTwMM,1388
34
- hammad/cli/styles/settings.py,sha256=irChf9RsMij3djx_n9D9duoVIzxLCpd9-BlKl6U_OLk,5532
35
- hammad/cli/styles/types.py,sha256=vNIeQY_23m10K8qVT7Iy-PMwosGL-La-UAZKszHJjEE,7911
36
- hammad/cli/styles/utils.py,sha256=BGFwQIEJHWlTAXed8ZxHeI_phLfEdh-_Mok2fe-jn7g,19356
37
- hammad/configuration/__init__.py,sha256=d1ztew6E-7SsJa_yiBOfXULRAnuFcCCel_MkyrDajXs,852
38
- hammad/configuration/configuration.py,sha256=Ssty95LALoS9QiviZByXHGyMMe43m63un-Ycz4DFeNw,17732
39
- hammad/data/__init__.py,sha256=1PzfRx0bsv0AYkGlssCHxWE4zjSpnSTK_tG3uy6RZ-4,884
40
- hammad/data/collections/__init__.py,sha256=jOl1B1avTYhrHuKi27Iq2n48CDTG9Id8W2xMagEiJ6I,838
41
- hammad/data/collections/base_collection.py,sha256=ZRht7OZjLIT8GxNvMgNxTarbCTY6EUUurEkGHZ3Rsy4,1419
42
- hammad/data/collections/collection.py,sha256=MWjyY3YqZa3U9WH3Br8v-Q_FLP5XWf3p0lIMGzfIeJ4,15758
43
- hammad/data/collections/searchable_collection.py,sha256=vCV_JgMwB57QRi4Cri6dfEUzLCyTBN58_JfWEKL2h_0,21361
44
- hammad/data/collections/vector_collection.py,sha256=f7GIbJdElmIzqcApcCCxmbXgAXng2EY20n2ttBopwE0,21129
45
- hammad/data/databases/__init__.py,sha256=hPg0ujYlS6cqrNsI5CMqTtXWivXPuxm3nyY7_q63nxs,425
46
- hammad/data/databases/database.py,sha256=7ngi-oWAsmAdtLTvpT4axw5ftcMzqsCtJmfmjzw5etk,31160
47
- hammad/json/__init__.py,sha256=-7laMbXoayDBlFDYw9wGgMJSRJ_pnUsI30jJvQsK54M,481
48
- hammad/json/converters.py,sha256=gXWJRN6OlzqDoL69nZqtyn8ET22Sxv7znso-VVamDR4,5480
49
- hammad/logging/__init__.py,sha256=NbZO9drdBqYj33MKkISIdSI-xEVqtorxQNAyPL6ySpg,726
50
- hammad/logging/decorators.py,sha256=xhHRA7WhesgdVMSwK_JvqZhGb90GF3TbYco13Y7aY0w,30119
51
- hammad/logging/logger.py,sha256=8q-7anLeZk07QlPszdt_qzsQPaeuZyDHevV8C6R_okk,31451
52
- hammad/multimodal/__init__.py,sha256=58zgdyWQTW9_YNED8mlOKBK6AgBjeuteOcvE3QZANRs,444
53
- hammad/multimodal/audio.py,sha256=cnmjfnLAQxlh7b8EfDlfk541PzzLL102bOlj5atDSPA,2777
54
- hammad/multimodal/image.py,sha256=eRlsCu1oSdlRtcJ8zGlD4np77pvqWMCDPU6FNJ6zNmg,2265
55
- hammad/multithreading/__init__.py,sha256=akEIhZndORW1dg3HvfVjDaYJv4IyB_fP6DQt1fH_ums,10788
56
- hammad/pydantic/__init__.py,sha256=5ZZfqSrXEapkDcEM5kcOcjs4_tfKlxHyIhK1u-veb3I,1017
57
- hammad/pydantic/converters.py,sha256=vlxVoPMY6IpwH4U1B0iVnW3p6VC8M7tINx8o9FU1JOI,20203
58
- hammad/pydantic/models/__init__.py,sha256=N8-B-_pAZ7mGpzEeE1M65hda8iQC-SWjDnzIS3gRTg8,671
59
- hammad/pydantic/models/arbitrary_model.py,sha256=XSsB2hMC3bCHwyLXepe1D_S3M57yaWG5QUBo3pAoG_M,1524
60
- hammad/pydantic/models/cacheable_model.py,sha256=JDzV5kZrgEPovE3M2bF4scoCAoGEhISeMhc69cifDfM,2809
61
- hammad/pydantic/models/fast_model.py,sha256=WVJxcUQydScQLhzMOh88Kn2WIFtN5cel_srI6UL3kVk,11716
62
- hammad/pydantic/models/function_model.py,sha256=pMtCM2slqJso77L5WuCMoNtm3gO_OMoSe87tgODaZJM,6300
63
- hammad/pydantic/models/subscriptable_model.py,sha256=yJ-PpaXPu0eKEktNrGizj5rOSHLGclDAGjwtnYYAcgY,1706
64
- hammad/text/__init__.py,sha256=xt4wjg5XvGMIEkr2mD5s__V6QHLX9C0GTIAtquNiyZM,1853
65
- hammad/text/converters.py,sha256=LmgyPGrRQrvyNZQlWOiTKfnSQcEtSlTznN7blPIv6Qk,23800
66
- hammad/text/markdown.py,sha256=13vS7HmBZIrktua5JoI1CBmigQkk7gJzndEzYkMYjvU,3402
67
- hammad/text/text.py,sha256=Fjp0n6upyXLlzecamcY7xzx1j2rFlda_2qPoiyYinVo,33309
68
- hammad/types/__init__.py,sha256=0ouYhOy3FydxEn4GUXbWWZ-5FMgLsU2NnQzyaCgKqBQ,336
69
- hammad/types/file.py,sha256=o3JSqQyCcKmRtAzk4oltnmzXZ60STL0VEiunOGfNVfk,11102
70
- hammad/typing/__init__.py,sha256=jQEwoJVMdgk1VQTLyMiJaU7l5P8JIvcvwcjMazE7iSo,10923
71
- hammad/web/__init__.py,sha256=WQYIzWKMG7p1WqONX2P6V-jagmBK2TLe_1N4fio4lUE,1078
72
- hammad/web/models.py,sha256=q9d4_3UPvHcvG_HuULxKHQuNrllA2S-3CSP3HdU21Cs,5637
73
- hammad/web/utils.py,sha256=7jf_esoIwctKg1qxSaN6yAgzeo70HT1IdSVqoNdHFSQ,15815
74
- hammad/web/http/__init__.py,sha256=jn9Rn7Yg2cypD7duTTNFuW2wQZx9B63Bde4RJJeDYU0,22
75
- hammad/web/http/client.py,sha256=N_w9WFwolrb43BTNbmi2feHJBoB7Z8PX-XOsHyS6efo,33147
76
- hammad/web/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
- hammad/web/openapi/client.py,sha256=1pXz7KAO_0pN4kQZoWKWskXDYGiJ535TsPO1GGCiC0E,26816
78
- hammad/web/search/__init__.py,sha256=e9A6znPIiZCz-4secyHbUs0uUGf5yAqW6wGacgx961U,24
79
- hammad/web/search/client.py,sha256=4VEhctFf_4LRxM2TXsEssSW6tbaZnu0NYaIVMYQrJNs,35434
80
- hammad/yaml/__init__.py,sha256=0w5YV4fOF33-9AyfKJcWhhCOnzrBOyzJAHXJLvTLml8,547
81
- hammad/yaml/converters.py,sha256=h2tb7IxlXVvjQs_E2uyTo6LTklUzTVh8lehur-p6iGs,527
82
- hammad_python-0.0.13.dist-info/METADATA,sha256=172JcN_IATs1WVRuluJTmq3d1qbQR48LKY-HQnxrOp4,1430
83
- hammad_python-0.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- hammad_python-0.0.13.dist-info/licenses/LICENSE,sha256=h74yFUWjbBaodcWG5wNmm30npjl8obVcxD-1nQfUp2I,1069
85
- hammad_python-0.0.13.dist-info/RECORD,,