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
@@ -1,131 +0,0 @@
1
- """hammad.formatting.text.markdown"""
2
-
3
- from typing import (
4
- List,
5
- Literal,
6
- Optional,
7
- )
8
-
9
- __all__ = (
10
- "markdown_bold",
11
- "markdown_italic",
12
- "markdown_code",
13
- "markdown_code_block",
14
- "markdown_heading",
15
- "markdown_link",
16
- "markdown_list_item",
17
- "markdown_table_row",
18
- "markdown_blockquote",
19
- "markdown_horizontal_rule",
20
- "markdown_table",
21
- )
22
-
23
-
24
- def markdown_bold(text: str) -> str:
25
- """Format text as bold in Markdown."""
26
- return f"**{text}**"
27
-
28
-
29
- def markdown_italic(text: str) -> str:
30
- """Format text as italic in Markdown."""
31
- return f"*{text}*"
32
-
33
-
34
- def markdown_code(text: str) -> str:
35
- """Format text as inline code in Markdown."""
36
- return f"`{text}`"
37
-
38
-
39
- def markdown_code_block(text: str, language: str = "") -> str:
40
- """Format text as a code block in Markdown."""
41
- return f"```{language}\n{text}\n```"
42
-
43
-
44
- def markdown_heading(text: str, level: int = 1) -> str:
45
- """Format text as a heading in Markdown."""
46
- if not 1 <= level <= 6:
47
- level = 1
48
- return f"{'#' * level} {text}"
49
-
50
-
51
- def markdown_link(text: str, url: str) -> str:
52
- """Format text as a link in Markdown."""
53
- return f"[{text}]({url})"
54
-
55
-
56
- def markdown_list_item(
57
- text: str, level: int = 0, ordered: bool = False, index: int = 1
58
- ) -> str:
59
- """Format text as a list item in Markdown."""
60
- indent = " " * level
61
- marker = f"{index}." if ordered else "-"
62
- return f"{indent}{marker} {text}"
63
-
64
-
65
- def markdown_table_row(cells: List[str], is_header: bool = False) -> str:
66
- """Format a table row in Markdown."""
67
- row = "| " + " | ".join(cells) + " |"
68
- if is_header:
69
- separator = "|" + "|".join([" --- " for _ in cells]) + "|"
70
- return f"{row}\n{separator}"
71
- return row
72
-
73
-
74
- def markdown_blockquote(text: str, level: int = 1) -> str:
75
- """Format text as a blockquote in Markdown."""
76
- prefix = ">" * level + " "
77
- lines = text.split("\n")
78
- return "\n".join(f"{prefix}{line}" for line in lines)
79
-
80
-
81
- def markdown_horizontal_rule() -> str:
82
- """Create a horizontal rule in Markdown."""
83
- return "---"
84
-
85
-
86
- def markdown_table(
87
- headers: List[str],
88
- rows: List[List[str]],
89
- alignment: Optional[List[Literal["left", "center", "right"]]] = None,
90
- ) -> str:
91
- """
92
- Create a Markdown table from headers and rows.
93
-
94
- Args:
95
- headers: List of header strings
96
- rows: List of row data (each row is a list of strings)
97
- alignment: Optional list of alignments for each column
98
-
99
- Returns:
100
- Formatted Markdown table
101
- """
102
- if not headers:
103
- return ""
104
-
105
- parts = []
106
-
107
- # Add header
108
- parts.append("| " + " | ".join(headers) + " |")
109
-
110
- # Add separator with alignment
111
- separators = []
112
- for i, header in enumerate(headers):
113
- if alignment and i < len(alignment):
114
- align = alignment[i]
115
- if align == "center":
116
- separators.append(" :---: ")
117
- elif align == "right":
118
- separators.append(" ---: ")
119
- else:
120
- separators.append(" --- ")
121
- else:
122
- separators.append(" --- ")
123
- parts.append("|" + "|".join(separators) + "|")
124
-
125
- # Add rows
126
- for row in rows:
127
- # Ensure row has same number of columns as headers
128
- padded_row = row + [""] * (len(headers) - len(row))
129
- parts.append("| " + " | ".join(padded_row[: len(headers)]) + " |")
130
-
131
- return "\n".join(parts)
@@ -1,26 +0,0 @@
1
- """hammad.formatting.yaml
2
-
3
- Simply extends the `msgspec.yaml` submodule."""
4
-
5
- from typing import TYPE_CHECKING
6
- from ...performance.imports import create_getattr_importer
7
-
8
- if TYPE_CHECKING:
9
- from .converters import (
10
- encode_yaml,
11
- decode_yaml,
12
- )
13
-
14
-
15
- __all__ = (
16
- "encode_yaml",
17
- "decode_yaml",
18
- )
19
-
20
-
21
- __getattr__ = create_getattr_importer(__all__)
22
-
23
-
24
- def __dir__() -> list[str]:
25
- """Get the attributes of the yaml module."""
26
- return list(__all__)
@@ -1,5 +0,0 @@
1
- """hammad.formatting.yaml.converters"""
2
-
3
- from msgspec.yaml import encode as encode_yaml, decode as decode_yaml
4
-
5
- __all__ = ("encode_yaml", "decode_yaml")
@@ -1,35 +0,0 @@
1
- """hammad.logging"""
2
-
3
- from typing import TYPE_CHECKING
4
- from ..performance.imports import create_getattr_importer
5
-
6
- if TYPE_CHECKING:
7
- from .logger import Logger, create_logger, create_logger_level, LoggerLevelName
8
- from .decorators import (
9
- trace_function,
10
- trace_cls,
11
- trace,
12
- trace_http,
13
- install_trace_http,
14
- )
15
-
16
-
17
- __all__ = (
18
- "Logger",
19
- "LoggerLevelName",
20
- "create_logger",
21
- "create_logger_level",
22
- "trace_function",
23
- "trace_cls",
24
- "trace",
25
- "trace_http",
26
- "install_trace_http",
27
- )
28
-
29
-
30
- __getattr__ = create_getattr_importer(__all__)
31
-
32
-
33
- def __dir__() -> list[str]:
34
- """Get the attributes of the logging module."""
35
- return list(__all__)