hammad-python 0.0.10__py3-none-any.whl → 0.0.12__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.
- hammad/__init__.py +177 -10
- hammad/_core/__init__.py +1 -0
- hammad/_core/_utils/__init__.py +4 -0
- hammad/_core/_utils/_import_utils.py +182 -0
- hammad/ai/__init__.py +59 -0
- hammad/ai/_utils.py +142 -0
- hammad/ai/completions/__init__.py +44 -0
- hammad/ai/completions/client.py +729 -0
- hammad/ai/completions/create.py +686 -0
- hammad/ai/completions/types.py +711 -0
- hammad/ai/completions/utils.py +374 -0
- hammad/ai/embeddings/__init__.py +35 -0
- hammad/ai/embeddings/client/__init__.py +1 -0
- hammad/ai/embeddings/client/base_embeddings_client.py +26 -0
- hammad/ai/embeddings/client/fastembed_text_embeddings_client.py +200 -0
- hammad/ai/embeddings/client/litellm_embeddings_client.py +288 -0
- hammad/ai/embeddings/create.py +159 -0
- hammad/ai/embeddings/types.py +69 -0
- hammad/base/__init__.py +35 -0
- hammad/base/fields.py +546 -0
- hammad/base/model.py +1078 -0
- hammad/base/utils.py +280 -0
- hammad/cache/__init__.py +48 -0
- hammad/cache/base_cache.py +181 -0
- hammad/cache/cache.py +169 -0
- hammad/cache/decorators.py +261 -0
- hammad/cache/file_cache.py +80 -0
- hammad/cache/ttl_cache.py +74 -0
- hammad/cli/__init__.py +33 -0
- hammad/cli/animations.py +604 -0
- hammad/cli/plugins.py +781 -0
- hammad/cli/styles/__init__.py +55 -0
- hammad/cli/styles/settings.py +139 -0
- hammad/cli/styles/types.py +358 -0
- hammad/cli/styles/utils.py +480 -0
- hammad/configuration/__init__.py +35 -0
- hammad/configuration/configuration.py +564 -0
- hammad/data/__init__.py +39 -0
- hammad/data/collections/__init__.py +34 -0
- hammad/data/collections/base_collection.py +58 -0
- hammad/data/collections/collection.py +452 -0
- hammad/data/collections/searchable_collection.py +556 -0
- hammad/data/collections/vector_collection.py +603 -0
- hammad/data/databases/__init__.py +21 -0
- hammad/data/databases/database.py +902 -0
- hammad/json/__init__.py +21 -0
- hammad/{utils/json → json}/converters.py +4 -1
- hammad/logging/__init__.py +35 -0
- hammad/logging/decorators.py +834 -0
- hammad/logging/logger.py +954 -0
- hammad/multimodal/__init__.py +24 -0
- hammad/multimodal/audio.py +96 -0
- hammad/multimodal/image.py +80 -0
- hammad/multithreading/__init__.py +304 -0
- hammad/pydantic/__init__.py +43 -0
- hammad/{utils/pydantic → pydantic}/converters.py +2 -1
- hammad/pydantic/models/__init__.py +28 -0
- hammad/pydantic/models/arbitrary_model.py +46 -0
- hammad/pydantic/models/cacheable_model.py +79 -0
- hammad/pydantic/models/fast_model.py +318 -0
- hammad/pydantic/models/function_model.py +176 -0
- hammad/pydantic/models/subscriptable_model.py +63 -0
- hammad/text/__init__.py +82 -0
- hammad/text/converters.py +723 -0
- hammad/{utils/markdown/formatting.py → text/markdown.py} +25 -23
- hammad/text/text.py +1066 -0
- hammad/types/__init__.py +11 -0
- hammad/types/file.py +358 -0
- hammad/{utils/typing/utils.py → typing/__init__.py} +142 -15
- hammad/web/__init__.py +43 -0
- hammad/web/http/__init__.py +1 -0
- hammad/web/http/client.py +944 -0
- hammad/web/models.py +245 -0
- hammad/web/openapi/client.py +740 -0
- hammad/web/search/__init__.py +1 -0
- hammad/web/search/client.py +988 -0
- hammad/web/utils.py +472 -0
- hammad/yaml/__init__.py +30 -0
- hammad/yaml/converters.py +19 -0
- {hammad_python-0.0.10.dist-info → hammad_python-0.0.12.dist-info}/METADATA +16 -7
- hammad_python-0.0.12.dist-info/RECORD +85 -0
- hammad/cache.py +0 -675
- hammad/database.py +0 -447
- hammad/logger.py +0 -273
- hammad/types/color.py +0 -951
- hammad/utils/markdown/__init__.py +0 -0
- hammad/utils/markdown/converters.py +0 -506
- hammad/utils/pydantic/__init__.py +0 -0
- hammad/utils/text/__init__.py +0 -0
- hammad/utils/text/converters.py +0 -229
- hammad/utils/typing/__init__.py +0 -0
- hammad_python-0.0.10.dist-info/RECORD +0 -22
- /hammad/{utils/__init__.py → py.typed} +0 -0
- /hammad/{utils/json → web/openapi}/__init__.py +0 -0
- {hammad_python-0.0.10.dist-info → hammad_python-0.0.12.dist-info}/WHEEL +0 -0
- {hammad_python-0.0.10.dist-info → hammad_python-0.0.12.dist-info}/licenses/LICENSE +0 -0
hammad/text/__init__.py
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
"""hammad.text"""
|
2
|
+
|
3
|
+
from typing import TYPE_CHECKING
|
4
|
+
from .._core._utils._import_utils import _auto_create_getattr_loader
|
5
|
+
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from .converters import (
|
8
|
+
convert_collection_to_text,
|
9
|
+
convert_dataclass_to_text,
|
10
|
+
convert_dict_to_text,
|
11
|
+
convert_docstring_to_text,
|
12
|
+
convert_function_to_text,
|
13
|
+
convert_pydantic_to_text,
|
14
|
+
convert_type_to_text,
|
15
|
+
convert_to_text,
|
16
|
+
)
|
17
|
+
from .markdown import (
|
18
|
+
markdown_blockquote,
|
19
|
+
markdown_bold,
|
20
|
+
markdown_code,
|
21
|
+
markdown_code_block,
|
22
|
+
markdown_heading,
|
23
|
+
markdown_horizontal_rule,
|
24
|
+
markdown_italic,
|
25
|
+
markdown_link,
|
26
|
+
markdown_list_item,
|
27
|
+
markdown_table,
|
28
|
+
markdown_table_row,
|
29
|
+
)
|
30
|
+
from .text import (
|
31
|
+
BaseText,
|
32
|
+
Text,
|
33
|
+
OutputText,
|
34
|
+
OutputFormat,
|
35
|
+
HeadingStyle,
|
36
|
+
CodeSection,
|
37
|
+
SimpleText,
|
38
|
+
SchemaSection,
|
39
|
+
UserResponse,
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
__all__ = (
|
44
|
+
# hammad.text.converters
|
45
|
+
"convert_collection_to_text",
|
46
|
+
"convert_dataclass_to_text",
|
47
|
+
"convert_dict_to_text",
|
48
|
+
"convert_docstring_to_text",
|
49
|
+
"convert_function_to_text",
|
50
|
+
"convert_pydantic_to_text",
|
51
|
+
"convert_type_to_text",
|
52
|
+
"convert_to_text",
|
53
|
+
# hammad.text.markdown
|
54
|
+
"markdown_blockquote",
|
55
|
+
"markdown_bold",
|
56
|
+
"markdown_code",
|
57
|
+
"markdown_code_block",
|
58
|
+
"markdown_heading",
|
59
|
+
"markdown_horizontal_rule",
|
60
|
+
"markdown_italic",
|
61
|
+
"markdown_link",
|
62
|
+
"markdown_list_item",
|
63
|
+
"markdown_table",
|
64
|
+
"markdown_table_row",
|
65
|
+
# hammad.text.text
|
66
|
+
"BaseText",
|
67
|
+
"Text",
|
68
|
+
"OutputText",
|
69
|
+
"OutputFormat",
|
70
|
+
"HeadingStyle",
|
71
|
+
"CodeSection",
|
72
|
+
"SimpleText",
|
73
|
+
"SchemaSection",
|
74
|
+
"UserResponse",
|
75
|
+
)
|
76
|
+
|
77
|
+
|
78
|
+
__getattr__ = _auto_create_getattr_loader(__all__)
|
79
|
+
|
80
|
+
|
81
|
+
def __dir__() -> list[str]:
|
82
|
+
return list(__all__)
|