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,55 +0,0 @@
1
- """hammad.cli.styles
2
-
3
- Contains resources, types and other utilities in context of
4
- styling rendered content in the CLI. Most resources within this
5
- submodule are not meant for direct use."""
6
-
7
- from typing import TYPE_CHECKING
8
- from ...performance.imports import create_getattr_importer
9
-
10
- if TYPE_CHECKING:
11
- from .settings import (
12
- CLIStyleRenderableSettings,
13
- CLIStyleLiveSettings,
14
- CLIStyleBackgroundSettings,
15
- )
16
- from .types import (
17
- CLIStyleBackgroundType,
18
- CLIStyleBoxName,
19
- CLIStyleColorName,
20
- CLIStyleError,
21
- CLIStyleJustifyMethod,
22
- CLIStyleOverflowMethod,
23
- CLIStyleStyleName,
24
- CLIStyleType,
25
- CLIStyleVerticalOverflowMethod,
26
- )
27
- from .utils import live_render, style_renderable
28
-
29
-
30
- __all__ = (
31
- # hammad.cli.styles.settings
32
- "CLIStyleRenderableSettings",
33
- "CLIStyleLiveSettings",
34
- "CLIStyleBackgroundSettings",
35
- # hammad.cli.styles.types
36
- "CLIStyleBackgroundType",
37
- "CLIStyleBoxName",
38
- "CLIStyleColorName",
39
- "CLIStyleError",
40
- "CLIStyleJustifyMethod",
41
- "CLIStyleOverflowMethod",
42
- "CLIStyleStyleName",
43
- "CLIStyleType",
44
- "CLIStyleVerticalOverflowMethod",
45
- # hammad.cli.styles.utils
46
- "live_render",
47
- "style_renderable",
48
- )
49
-
50
-
51
- __getattr__ = create_getattr_importer(__all__)
52
-
53
-
54
- def __dir__() -> list[str]:
55
- return list(__all__)
@@ -1,139 +0,0 @@
1
- """hammad.cli.styles.settings"""
2
-
3
- from typing import Any
4
- from typing_extensions import TypedDict, NotRequired
5
-
6
- from .types import (
7
- CLIStyleColorName,
8
- CLIStyleBoxName,
9
- CLIStyleJustifyMethod,
10
- CLIStyleOverflowMethod,
11
- CLIStyleVerticalOverflowMethod,
12
- )
13
-
14
- __all__ = (
15
- "CLIStyleRenderableSettings",
16
- "CLIStyleBackgroundSettings",
17
- "CLIStyleLiveSettings",
18
- )
19
-
20
-
21
- class CLIStyleRenderableSettings(TypedDict, total=False):
22
- """Extended dictionary definition of settings that can be
23
- applied to style various renderable content. These settings
24
- extend the settings within `rich.text.Text` and
25
- `rich.style.Style`.
26
-
27
- When using various stylable modules in the `hammad` package,
28
- you can either define the `style` parameter with a rich string
29
- tag with a color / style name. or apply the `style_settings`
30
- parameter with these settings."""
31
-
32
- color: NotRequired[CLIStyleColorName]
33
- """The color of the renderable output or content."""
34
-
35
- # rich.text
36
-
37
- justify: NotRequired[CLIStyleJustifyMethod]
38
- """The justification of the renderable output or content."""
39
- overflow: NotRequired[CLIStyleOverflowMethod | int]
40
- """The overflow method of the renderable output or content."""
41
- no_wrap: NotRequired[bool]
42
- """Whether the renderable output or content should be wrapped."""
43
- end: NotRequired[str]
44
- """The end character of the renderable output or content."""
45
- tab_size: NotRequired[int]
46
- """The tab size of the renderable output or content."""
47
- spans: NotRequired[list[Any]]
48
- """The spans of the renderable output or content."""
49
-
50
- # rich.style
51
-
52
- bold: NotRequired[bool]
53
- """Whether the renderable output or content should be bold."""
54
- dim: NotRequired[bool]
55
- """Whether the renderable output or content should be dimmed."""
56
- italic: NotRequired[bool]
57
- """Whether the renderable output or content should be italicized."""
58
- underline: NotRequired[bool]
59
- """Whether the renderable output or content should be underlined."""
60
- blink: NotRequired[bool]
61
- """Whether the renderable output or content should blink."""
62
- blink2: NotRequired[bool]
63
- """Whether the renderable output or content should blink twice."""
64
- reverse: NotRequired[bool]
65
- """Whether the renderable output or content should be reversed."""
66
- conceal: NotRequired[bool]
67
- """Whether the renderable output or content should be concealed."""
68
- strike: NotRequired[bool]
69
- """Whether the renderable output or content should be struck through."""
70
- underline2: NotRequired[bool]
71
- """Whether the renderable output or content should be underlined twice."""
72
- frame: NotRequired[bool]
73
- """Whether the renderable output or content should be framed."""
74
- encircle: NotRequired[bool]
75
- """Whether the renderable output or content should be encircled."""
76
- overline: NotRequired[bool]
77
- """Whether the renderable output or content should be overlined."""
78
- link: NotRequired[str]
79
- """The link to be applied to the renderable output or content."""
80
-
81
-
82
- class CLIStyleBackgroundSettings(TypedDict, total=False):
83
- """Extended dictionary definition of settings that can be
84
- applied to style various background content. These settings
85
- extend the settings within `rich.box.Box` and `rich.panel.Panel`.
86
-
87
- When using various stylable modules in the `hammad` package,
88
- you can either define the `bg` parameter with a rich string
89
- tag with a color / style name. or apply the `bg_settings`
90
- parameter with these settings."""
91
-
92
- box: NotRequired[CLIStyleBoxName]
93
- """The box style to be applied to the background."""
94
- title: NotRequired[str]
95
- """The title of the background."""
96
- subtitle: NotRequired[str]
97
- """The subtitle of the background."""
98
- title_align: NotRequired[CLIStyleJustifyMethod]
99
- """The alignment of the title."""
100
- subtitle_align: NotRequired[CLIStyleJustifyMethod]
101
- """The alignment of the subtitle."""
102
- safe_box: NotRequired[bool]
103
- """Whether the box should be safe."""
104
- expand: NotRequired[bool]
105
- """Whether the box should be expanded."""
106
- style: NotRequired[CLIStyleRenderableSettings]
107
- """The style of the background."""
108
- border_style: NotRequired[CLIStyleRenderableSettings]
109
- """The style of the border."""
110
- width: NotRequired[int]
111
- """The width of the background."""
112
- height: NotRequired[int]
113
- """The height of the background."""
114
- padding: NotRequired[int]
115
- """The padding of the background."""
116
- highlight: NotRequired[bool]
117
- """Whether the background should be highlighted."""
118
-
119
-
120
- class CLIStyleLiveSettings(TypedDict, total=False):
121
- """Dictionary definition of settings for content rendered
122
- with `rich.live.Live`."""
123
-
124
- screen: NotRequired[bool]
125
- """Whether the live renderable should be displayed in a screen."""
126
- duration: NotRequired[float]
127
- """The duration of the live renderable."""
128
- refresh_rate: NotRequired[int]
129
- """The refresh rate of the live renderable."""
130
- auto_refresh: NotRequired[bool]
131
- """Whether the live renderable should be automatically refreshed."""
132
- transient: NotRequired[bool]
133
- """Whether the live renderable should be transient."""
134
- redirect_stdout: NotRequired[bool]
135
- """Whether the live renderable should redirect stdout."""
136
- redirect_stderr: NotRequired[bool]
137
- """Whether the live renderable should redirect stderr."""
138
- vertical_overflow: NotRequired[CLIStyleVerticalOverflowMethod]
139
- """The vertical overflow method of the live renderable."""
@@ -1,358 +0,0 @@
1
- """hammad.cli.styles.types"""
2
-
3
- from typing import Literal, Union
4
- from typing_extensions import TypeAliasType
5
-
6
- __all__ = (
7
- "CLIStyleError",
8
- "CLIStyleVerticalOverflowMethod",
9
- "CLIStyleJustifyMethod",
10
- "CLIStyleOverflowMethod",
11
- "CLIStyleColorName",
12
- "CLIStyleStyleName",
13
- "CLIStyleBoxName",
14
- "CLIStyleType",
15
- "CLIStyleBackgroundType",
16
- )
17
-
18
-
19
- class CLIStyleError(Exception):
20
- """Exception raised for any errors related to the
21
- rich styling of some rendered content."""
22
-
23
- def __init__(self, message: str) -> None:
24
- self.message = message
25
- super().__init__(self.message)
26
-
27
-
28
- CLIStyleVerticalOverflowMethod = TypeAliasType(
29
- "CLIStyleVerticalOverflowMethod",
30
- Literal[
31
- "crop",
32
- "ellipsis",
33
- "visible",
34
- ],
35
- )
36
- """Literal helper alias providing type hinting for the various compatible
37
- vertical overflow methods within the `rich` library."""
38
-
39
-
40
- CLIStyleJustifyMethod = TypeAliasType(
41
- "CLIStyleJustifyMethod",
42
- Literal[
43
- "left",
44
- "center",
45
- "right",
46
- ],
47
- )
48
- """Literal helper alias providing type hinting for the various compatible
49
- justify methods within the `rich` library."""
50
-
51
-
52
- CLIStyleOverflowMethod = TypeAliasType(
53
- "CLIStyleOverflowMethod",
54
- Literal[
55
- "crop",
56
- "fold",
57
- "ellipsis",
58
- "ignore",
59
- ],
60
- )
61
- """Literal helper alias providing type hinting for the various compatible
62
- overflow methods within the `rich` library."""
63
-
64
-
65
- CLIStyleColorName = TypeAliasType(
66
- "CLIStyleColorName",
67
- Literal[
68
- "black",
69
- "red",
70
- "green",
71
- "yellow",
72
- "blue",
73
- "magenta",
74
- "cyan",
75
- "white",
76
- "bright_black",
77
- "bright_red",
78
- "bright_green",
79
- "bright_yellow",
80
- "bright_blue",
81
- "bright_magenta",
82
- "bright_cyan",
83
- "bright_white",
84
- "grey0",
85
- "navy_blue",
86
- "dark_blue",
87
- "blue3",
88
- "blue1",
89
- "dark_green",
90
- "deep_sky_blue4",
91
- "dodger_blue3",
92
- "dodger_blue2",
93
- "green4",
94
- "spring_green4",
95
- "turquoise4",
96
- "deep_sky_blue3",
97
- "dodger_blue1",
98
- "dark_cyan",
99
- "light_sea_green",
100
- "deep_sky_blue2",
101
- "deep_sky_blue1",
102
- "green3",
103
- "spring_green3",
104
- "cyan3",
105
- "dark_turquoise",
106
- "turquoise2",
107
- "green1",
108
- "spring_green2",
109
- "spring_green1",
110
- "medium_spring_green",
111
- "cyan2",
112
- "cyan1",
113
- "purple4",
114
- "purple3",
115
- "blue_violet",
116
- "grey37",
117
- "medium_purple4",
118
- "slate_blue3",
119
- "royal_blue1",
120
- "chartreuse4",
121
- "pale_turquoise4",
122
- "steel_blue",
123
- "steel_blue3",
124
- "cornflower_blue",
125
- "dark_sea_green4",
126
- "cadet_blue",
127
- "sky_blue3",
128
- "chartreuse3",
129
- "sea_green3",
130
- "aquamarine3",
131
- "medium_turquoise",
132
- "steel_blue1",
133
- "sea_green2",
134
- "sea_green1",
135
- "dark_slate_gray2",
136
- "dark_red",
137
- "dark_magenta",
138
- "orange4",
139
- "light_pink4",
140
- "plum4",
141
- "medium_purple3",
142
- "slate_blue1",
143
- "wheat4",
144
- "grey53",
145
- "light_slate_grey",
146
- "medium_purple",
147
- "light_slate_blue",
148
- "yellow4",
149
- "dark_sea_green",
150
- "light_sky_blue3",
151
- "sky_blue2",
152
- "chartreuse2",
153
- "pale_green3",
154
- "dark_slate_gray3",
155
- "sky_blue1",
156
- "chartreuse1",
157
- "light_green",
158
- "aquamarine1",
159
- "dark_slate_gray1",
160
- "deep_pink4",
161
- "medium_violet_red",
162
- "dark_violet",
163
- "purple",
164
- "medium_orchid3",
165
- "medium_orchid",
166
- "dark_goldenrod",
167
- "rosy_brown",
168
- "grey63",
169
- "medium_purple2",
170
- "medium_purple1",
171
- "dark_khaki",
172
- "navajo_white3",
173
- "grey69",
174
- "light_steel_blue3",
175
- "light_steel_blue",
176
- "dark_olive_green3",
177
- "dark_sea_green3",
178
- "light_cyan3",
179
- "light_sky_blue1",
180
- "green_yellow",
181
- "dark_olive_green2",
182
- "pale_green1",
183
- "dark_sea_green2",
184
- "pale_turquoise1",
185
- "red3",
186
- "deep_pink3",
187
- "magenta3",
188
- "dark_orange3",
189
- "indian_red",
190
- "hot_pink3",
191
- "hot_pink2",
192
- "orchid",
193
- "orange3",
194
- "light_salmon3",
195
- "light_pink3",
196
- "pink3",
197
- "plum3",
198
- "violet",
199
- "gold3",
200
- "light_goldenrod3",
201
- "tan",
202
- "misty_rose3",
203
- "thistle3",
204
- "plum2",
205
- "yellow3",
206
- "khaki3",
207
- "light_yellow3",
208
- "grey84",
209
- "light_steel_blue1",
210
- "yellow2",
211
- "dark_olive_green1",
212
- "dark_sea_green1",
213
- "honeydew2",
214
- "light_cyan1",
215
- "red1",
216
- "deep_pink2",
217
- "deep_pink1",
218
- "magenta2",
219
- "magenta1",
220
- "orange_red1",
221
- "indian_red1",
222
- "hot_pink",
223
- "medium_orchid1",
224
- "dark_orange",
225
- "salmon1",
226
- "light_coral",
227
- "pale_violet_red1",
228
- "orchid2",
229
- "orchid1",
230
- "orange1",
231
- "sandy_brown",
232
- "light_salmon1",
233
- "light_pink1",
234
- "pink1",
235
- "plum1",
236
- "gold1",
237
- "light_goldenrod2",
238
- "navajo_white1",
239
- "misty_rose1",
240
- "thistle1",
241
- "yellow1",
242
- "light_goldenrod1",
243
- "khaki1",
244
- "wheat1",
245
- "cornsilk1",
246
- "grey100",
247
- "grey3",
248
- "grey7",
249
- "grey11",
250
- "grey15",
251
- "grey19",
252
- "grey23",
253
- "grey27",
254
- "grey30",
255
- "grey35",
256
- "grey39",
257
- "grey42",
258
- "grey46",
259
- "grey50",
260
- "grey54",
261
- "grey58",
262
- "grey62",
263
- "grey66",
264
- "grey70",
265
- "grey74",
266
- "grey78",
267
- "grey82",
268
- "grey85",
269
- "grey89",
270
- "grey93",
271
- "default",
272
- ],
273
- )
274
- """Literal helper alias providing type hinting for the various compatible color names
275
- within the `rich` library."""
276
-
277
-
278
- CLIStyleStyleName = TypeAliasType(
279
- "CLIStyleStyleName",
280
- Literal[
281
- "dim",
282
- "d",
283
- "bold",
284
- "b",
285
- "italic",
286
- "i",
287
- "underline",
288
- "u",
289
- "blink",
290
- "blink2",
291
- "reverse",
292
- "r",
293
- "conceal",
294
- "c",
295
- "strike",
296
- "s",
297
- "underline2",
298
- "uu",
299
- "frame",
300
- "encircle",
301
- "overline",
302
- "o",
303
- "on",
304
- "not",
305
- "link",
306
- "none",
307
- ],
308
- )
309
- """Literal helper alias providing type hinting for the various compatible
310
- style names within the `rich` library."""
311
-
312
-
313
- CLIStyleBoxName = TypeAliasType(
314
- "StyleBoxName",
315
- Literal[
316
- "ascii",
317
- "ascii2",
318
- "ascii_double_head",
319
- "square",
320
- "square_double_head",
321
- "minimal",
322
- "minimal_heavy_head",
323
- "minimal_double_head",
324
- "simple",
325
- "simple_head",
326
- "simple_heavy",
327
- "horizontals",
328
- "rounded",
329
- "heavy",
330
- "heavy_edge",
331
- "heavy_head",
332
- "double",
333
- "double_edge",
334
- "markdown",
335
- ],
336
- )
337
- """Literal helper alias providing type hinting for the various compatible
338
- box names within the `rich` library."""
339
-
340
-
341
- # ------------------------------------------------------------
342
- # 'Exported' (Hinted) Typed
343
-
344
-
345
- CLIStyleType = TypeAliasType(
346
- "CLIStyleType", Union[str | CLIStyleStyleName, CLIStyleColorName]
347
- )
348
- """Union helper alias for the accepted inputs within modules
349
- that incorporate the `style` parameter within the
350
- `hammad` package."""
351
-
352
-
353
- CLIStyleBackgroundType = TypeAliasType(
354
- "CLIStyleBackgroundType", Union[str | CLIStyleBoxName, CLIStyleColorName]
355
- )
356
- """Union helper alias for the accepted inputs within modules
357
- that incorporate the `bg` parameter within the
358
- `hammad` package."""