hammad-python 0.0.11__tar.gz → 0.0.12__tar.gz
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_python-0.0.11 → hammad_python-0.0.12}/.gitignore +1 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/PKG-INFO +4 -1
- hammad_python-0.0.12/docs/fonts/zed-mono-extended.ttf +0 -0
- hammad_python-0.0.12/docs/fonts/zed-sans-extended.ttf +0 -0
- hammad_python-0.0.12/docs/stylesheets/extras.css +351 -0
- hammad_python-0.0.12/docs/stylesheets/icon.svg +1 -0
- hammad_python-0.0.12/hammad/__init__.py +180 -0
- hammad_python-0.0.12/hammad/_core/__init__.py +1 -0
- hammad_python-0.0.12/hammad/_core/_utils/__init__.py +4 -0
- hammad_python-0.0.12/hammad/_core/_utils/_import_utils.py +182 -0
- hammad_python-0.0.12/hammad/ai/__init__.py +59 -0
- hammad_python-0.0.12/hammad/ai/_utils.py +142 -0
- hammad_python-0.0.12/hammad/ai/completions/__init__.py +44 -0
- hammad_python-0.0.12/hammad/ai/completions/client.py +729 -0
- hammad_python-0.0.12/hammad/ai/completions/create.py +686 -0
- hammad_python-0.0.12/hammad/ai/completions/types.py +711 -0
- hammad_python-0.0.12/hammad/ai/completions/utils.py +374 -0
- hammad_python-0.0.12/hammad/ai/embeddings/__init__.py +35 -0
- hammad_python-0.0.12/hammad/ai/embeddings/client/__init__.py +1 -0
- hammad_python-0.0.12/hammad/ai/embeddings/client/base_embeddings_client.py +26 -0
- hammad_python-0.0.12/hammad/ai/embeddings/client/fastembed_text_embeddings_client.py +200 -0
- hammad_python-0.0.12/hammad/ai/embeddings/client/litellm_embeddings_client.py +288 -0
- hammad_python-0.0.12/hammad/ai/embeddings/create.py +159 -0
- hammad_python-0.0.12/hammad/ai/embeddings/types.py +69 -0
- hammad_python-0.0.12/hammad/base/__init__.py +35 -0
- {hammad_python-0.0.11/hammad/based → hammad_python-0.0.12/hammad/base}/fields.py +23 -23
- {hammad_python-0.0.11/hammad/based → hammad_python-0.0.12/hammad/base}/model.py +124 -14
- hammad_python-0.0.12/hammad/base/utils.py +280 -0
- hammad_python-0.0.12/hammad/cache/__init__.py +48 -0
- hammad_python-0.0.12/hammad/cache/base_cache.py +181 -0
- hammad_python-0.0.12/hammad/cache/cache.py +169 -0
- hammad_python-0.0.12/hammad/cache/decorators.py +261 -0
- hammad_python-0.0.12/hammad/cache/file_cache.py +80 -0
- hammad_python-0.0.12/hammad/cache/ttl_cache.py +74 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/cli/__init__.py +10 -2
- {hammad_python-0.0.11/hammad/cli/styles → hammad_python-0.0.12/hammad/cli}/animations.py +79 -23
- hammad_python-0.0.11/hammad/cli/plugins/__init__.py → hammad_python-0.0.12/hammad/cli/plugins.py +85 -90
- hammad_python-0.0.12/hammad/cli/styles/__init__.py +55 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/cli/styles/settings.py +4 -0
- hammad_python-0.0.12/hammad/configuration/__init__.py +35 -0
- {hammad_python-0.0.11/hammad/data/types/files → hammad_python-0.0.12/hammad/configuration}/configuration.py +96 -7
- hammad_python-0.0.12/hammad/data/__init__.py +39 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/collections/__init__.py +4 -2
- hammad_python-0.0.12/hammad/data/collections/collection.py +452 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/collections/vector_collection.py +118 -12
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/databases/__init__.py +2 -2
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/databases/database.py +383 -32
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/json/__init__.py +2 -2
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/logging/__init__.py +13 -5
- hammad_python-0.0.12/hammad/logging/decorators.py +834 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/logging/logger.py +442 -22
- hammad_python-0.0.12/hammad/multimodal/__init__.py +24 -0
- {hammad_python-0.0.11/hammad/data/types/files → hammad_python-0.0.12/hammad/multimodal}/audio.py +21 -6
- {hammad_python-0.0.11/hammad/data/types/files → hammad_python-0.0.12/hammad/multimodal}/image.py +5 -5
- hammad_python-0.0.12/hammad/multithreading/__init__.py +304 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/__init__.py +2 -2
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/converters.py +1 -1
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/__init__.py +2 -2
- hammad_python-0.0.12/hammad/text/__init__.py +82 -0
- hammad_python-0.0.12/hammad/text/converters.py +723 -0
- hammad_python-0.0.11/hammad/text/utils/markdown/formatting.py → hammad_python-0.0.12/hammad/text/markdown.py +25 -23
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/text/text.py +12 -14
- hammad_python-0.0.12/hammad/types/__init__.py +11 -0
- {hammad_python-0.0.11/hammad/data/types/files → hammad_python-0.0.12/hammad/types}/file.py +18 -18
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/typing/__init__.py +138 -84
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/__init__.py +3 -2
- hammad_python-0.0.12/hammad/web/models.py +245 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/search/client.py +75 -23
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/utils.py +14 -5
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/yaml/__init__.py +2 -2
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/yaml/converters.py +1 -1
- hammad_python-0.0.12/mkdocs.yml +74 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/pyproject.toml +15 -1
- hammad_python-0.0.12/tests/ai/completions/test_ai_completions_create.py +241 -0
- hammad_python-0.0.12/tests/ai/completions/test_ai_completions_types.py +585 -0
- hammad_python-0.0.11/tests/based/test_core_based_fields.py → hammad_python-0.0.12/tests/base/test_base_fields.py +21 -18
- hammad_python-0.0.11/tests/based/test_core_based_model.py → hammad_python-0.0.12/tests/base/test_base_model.py +5 -1
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/cache/test_cache_cache.py +13 -8
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/cli/test_cli_plugins_animate.py +59 -2
- hammad_python-0.0.12/tests/configuration/test_configuration.py +0 -0
- hammad_python-0.0.12/tests/data/test_data_collections_vector_collection.py +495 -0
- hammad_python-0.0.12/tests/data/test_data_databases_database.py +725 -0
- hammad_python-0.0.12/tests/logging/test_logging_decorators.py +534 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/text/test_text_utils_converters.py +2 -2
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/text/test_text_utils_markdown_converters.py +47 -59
- {hammad_python-0.0.11 → hammad_python-0.0.12}/uv.lock +2259 -1307
- hammad_python-0.0.11/hammad/__init__.py +0 -67
- hammad_python-0.0.11/hammad/based/__init__.py +0 -52
- hammad_python-0.0.11/hammad/based/utils.py +0 -455
- hammad_python-0.0.11/hammad/cache/__init__.py +0 -30
- hammad_python-0.0.11/hammad/cache/_cache.py +0 -746
- hammad_python-0.0.11/hammad/cli/styles/__init__.py +0 -5
- hammad_python-0.0.11/hammad/data/__init__.py +0 -51
- hammad_python-0.0.11/hammad/data/collections/collection.py +0 -227
- hammad_python-0.0.11/hammad/data/types/__init__.py +0 -33
- hammad_python-0.0.11/hammad/data/types/files/__init__.py +0 -1
- hammad_python-0.0.11/hammad/data/types/files/document.py +0 -195
- hammad_python-0.0.11/hammad/logging/decorators.py +0 -432
- hammad_python-0.0.11/hammad/text/__init__.py +0 -37
- hammad_python-0.0.11/hammad/text/utils/__init__.py +0 -1
- hammad_python-0.0.11/hammad/text/utils/converters.py +0 -229
- hammad_python-0.0.11/hammad/text/utils/markdown/__init__.py +0 -1
- hammad_python-0.0.11/hammad/text/utils/markdown/converters.py +0 -506
- hammad_python-0.0.11/tests/data/test_data_collections_vector_collection.py +0 -256
- hammad_python-0.0.11/tests/data/test_data_databases_database.py +0 -306
- hammad_python-0.0.11/tests/logging/test_logging_decorators.py +0 -230
- {hammad_python-0.0.11 → hammad_python-0.0.12}/.python-version +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/LICENSE +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/README.md +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/cli/styles/types.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/cli/styles/utils.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/collections/base_collection.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/data/collections/searchable_collection.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/json/converters.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/py.typed +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/arbitrary_model.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/cacheable_model.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/fast_model.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/function_model.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/pydantic/models/subscriptable_model.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/http/__init__.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/http/client.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/openapi/__init__.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/openapi/client.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/hammad/web/search/__init__.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/cli/test_cli_plugins_input.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/cli/test_cli_plugins_print.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/cli/test_cli_styles_utils.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/data/test_data_collections_searchable_collection.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/json/test_json_converters.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/logging/test_logging_logger.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/pydantic/test_pydantic_converters.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/pydantic/test_pydantic_models.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/text/test_text_text.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/typing/test_typing_utils.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/web/test_web_toolkits_http_toolkit.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/web/test_web_toolkits_openapi_toolkit.py +0 -0
- {hammad_python-0.0.11 → hammad_python-0.0.12}/tests/web/test_web_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hammad-python
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.12
|
4
4
|
Summary: hammad - *Nightly* hyper-fast opinionated resources and modules built for quick development.
|
5
5
|
Author-email: Hammad Saeed <hammadaidev@gmail.com>
|
6
6
|
License-File: LICENSE
|
@@ -15,6 +15,7 @@ Requires-Dist: python-dotenv>=1.1.0
|
|
15
15
|
Requires-Dist: pyyaml>=6.0.2
|
16
16
|
Requires-Dist: rich>=13.9.4
|
17
17
|
Requires-Dist: selectolax>=0.3.30
|
18
|
+
Requires-Dist: sqlalchemy>=2.0.41
|
18
19
|
Requires-Dist: tantivy>=0.24.0
|
19
20
|
Requires-Dist: tenacity>=9.0.0
|
20
21
|
Requires-Dist: typing-inspect>=0.9.0
|
@@ -24,6 +25,8 @@ Requires-Dist: instructor>=1.9.0; extra == 'ai'
|
|
24
25
|
Requires-Dist: litellm>=1.72.4; extra == 'ai'
|
25
26
|
Requires-Dist: openai-agents>=0.0.19; extra == 'ai'
|
26
27
|
Requires-Dist: qdrant-client>=1.14.3; extra == 'ai'
|
28
|
+
Provides-Extra: fastembed
|
29
|
+
Requires-Dist: fastembed; extra == 'fastembed'
|
27
30
|
Provides-Extra: serve
|
28
31
|
Requires-Dist: fastapi>=0.115.8; extra == 'serve'
|
29
32
|
Requires-Dist: python-multipart>=0.0.19; extra == 'serve'
|
Binary file
|
Binary file
|
@@ -0,0 +1,351 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: "Zed Mono";
|
3
|
+
src: url("../fonts/zed-mono-extended.ttf") format("truetype");
|
4
|
+
font-weight: normal;
|
5
|
+
font-style: normal;
|
6
|
+
}
|
7
|
+
|
8
|
+
@font-face {
|
9
|
+
font-family: "Zed Sans";
|
10
|
+
src: url("../fonts/zed-sans-extended.ttf") format("truetype");
|
11
|
+
font-weight: normal;
|
12
|
+
font-style: normal;
|
13
|
+
}
|
14
|
+
|
15
|
+
:root {
|
16
|
+
--md-text-font: "Zed Sans";
|
17
|
+
}
|
18
|
+
|
19
|
+
:root {
|
20
|
+
--md-code-font: "Zed Mono";
|
21
|
+
}
|
22
|
+
|
23
|
+
/* Styling for code boxes */
|
24
|
+
.md-typeset pre {
|
25
|
+
border-radius: 6px;
|
26
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
27
|
+
}
|
28
|
+
|
29
|
+
.md-typeset code {
|
30
|
+
border-radius: 3px;
|
31
|
+
padding: 0.2em 0.4em;
|
32
|
+
}
|
33
|
+
|
34
|
+
[data-md-color-scheme="home-light"] {
|
35
|
+
--md-hue: 60deg;
|
36
|
+
|
37
|
+
--md-primary-fg-color: #F5F5F0; /* Soft Cream */
|
38
|
+
--md-primary-fg-color--light: #E8E8E3; /* Light Cream */
|
39
|
+
--md-primary-fg-color--dark: #DCDCD7; /* Muted Cream */
|
40
|
+
--md-primary-bg-color: #2D2D2D; /* Soft Charcoal */
|
41
|
+
--md-primary-bg-color--light: #3D3D3D; /* Medium Charcoal */
|
42
|
+
|
43
|
+
--md-accent-fg-color: #89CFF0; /* Baby Blue */
|
44
|
+
--md-accent-fg-color--transparent: #89CFF033; /* Baby Blue with transparency */
|
45
|
+
|
46
|
+
--md-default-fg-color: #2D2D2D; /* Soft Charcoal */
|
47
|
+
--md-default-fg-color--light: #3D3D3D; /* Medium Charcoal */
|
48
|
+
--md-default-fg-color--lighter: #4D4D4D; /* Light Charcoal */
|
49
|
+
--md-default-fg-color--lightest: #DCDCD7; /* Muted Cream */
|
50
|
+
--md-default-bg-color: #F5F5F0; /* Soft Cream */
|
51
|
+
--md-default-bg-color--light: #E8E8E3; /* Light Cream */
|
52
|
+
--md-default-bg-color--lighter: #DCDCD7; /* Muted Cream */
|
53
|
+
--md-default-bg-color--lightest: #E9C7B7; /* Soft Peach */
|
54
|
+
|
55
|
+
--md-code-fg-color: #4A4A4A; /* Soft Black */
|
56
|
+
--md-code-bg-color: #E8E8E3; /* Light Cream */
|
57
|
+
--md-code-hl-color: #DCDCD7; /* Muted Cream */
|
58
|
+
|
59
|
+
--md-code-hl-number-color: #F0A07C; /* Soft Coral */
|
60
|
+
--md-code-hl-special-color: #F0CF7C; /* Soft Yellow */
|
61
|
+
--md-code-hl-function-color: #D7B4D9; /* Soft Purple */
|
62
|
+
--md-code-hl-constant-color: #A8D7C2; /* Soft Mint */
|
63
|
+
--md-code-hl-keyword-color: #F0A07C; /* Soft Coral */
|
64
|
+
--md-code-hl-string-color: #BFD9A8; /* Soft Green */
|
65
|
+
--md-code-hl-name-color: #A8C4D9; /* Soft Blue */
|
66
|
+
--md-code-hl-operator-color: #A8D7C2; /* Soft Mint */
|
67
|
+
--md-code-hl-punctuation-color: #B4B4B4; /* Soft Gray */
|
68
|
+
--md-code-hl-comment-color: #C2C2C2; /* Light Gray */
|
69
|
+
--md-code-hl-generic-color: #8A8A8A; /* Medium Gray */
|
70
|
+
--md-code-hl-variable-color: #A8C4D9; /* Soft Blue */
|
71
|
+
|
72
|
+
--md-typeset-color: var(--md-default-fg-color);
|
73
|
+
--md-typeset-a-color: #E6A99F; /* Soft Terracotta */
|
74
|
+
|
75
|
+
--md-typeset-mark-color: #E9C7B780; /* Soft Peach with transparency */
|
76
|
+
|
77
|
+
--md-typeset-table-color: #DCDCD7; /* Muted Cream */
|
78
|
+
--md-typeset-table-color--light: #E8E8E3; /* Light Cream */
|
79
|
+
|
80
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
81
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
82
|
+
|
83
|
+
--md-warning-fg-color: #2D2D2D; /* Soft Charcoal */
|
84
|
+
--md-warning-bg-color: #E9C7B7; /* Soft Peach */
|
85
|
+
|
86
|
+
--md-footer-fg-color: #F5F5F0; /* Soft Cream */
|
87
|
+
--md-footer-fg-color--light: #E8E8E3; /* Light Cream */
|
88
|
+
--md-footer-fg-color--lighter: #DCDCD7; /* Muted Cream */
|
89
|
+
--md-footer-bg-color: #2D2D2D; /* Soft Charcoal */
|
90
|
+
--md-footer-bg-color--dark: #3D3D3D; /* Medium Charcoal */
|
91
|
+
|
92
|
+
--md-code-shadow-color: rgba(0, 0, 0, 0.05);
|
93
|
+
}
|
94
|
+
|
95
|
+
[data-md-color-scheme="home-dark"] {
|
96
|
+
--md-hue: 220deg;
|
97
|
+
|
98
|
+
--md-primary-fg-color: #2D2D2D; /* Soft Charcoal */
|
99
|
+
--md-primary-fg-color--light: #3D3D3D; /* Medium Charcoal */
|
100
|
+
--md-primary-fg-color--dark: #4D4D4D; /* Light Charcoal */
|
101
|
+
--md-primary-bg-color: #F5F5F0; /* Soft Cream */
|
102
|
+
--md-primary-bg-color--light: #E8E8E3; /* Light Cream */
|
103
|
+
|
104
|
+
--md-accent-fg-color: #89CFF0; /* Baby Blue */
|
105
|
+
--md-accent-fg-color--transparent: #89CFF033; /* Baby Blue with transparency */
|
106
|
+
|
107
|
+
--md-default-fg-color: #F5F5F0; /* Soft Cream */
|
108
|
+
--md-default-fg-color--light: #E8E8E3; /* Light Cream */
|
109
|
+
--md-default-fg-color--lighter: #DCDCD7; /* Muted Cream */
|
110
|
+
--md-default-fg-color--lightest: #1e1e1e; /* Soft Peach */
|
111
|
+
--md-default-bg-color: #2D2D2D; /* Soft Charcoal */
|
112
|
+
--md-default-bg-color--light: #3D3D3D; /* Medium Charcoal */
|
113
|
+
--md-default-bg-color--lighter: #4D4D4D; /* Light Charcoal */
|
114
|
+
--md-default-bg-color--lightest: #5D5D5D; /* Lighter Charcoal */
|
115
|
+
|
116
|
+
--md-code-fg-color: #E8E8E3; /* Light Cream */
|
117
|
+
--md-code-bg-color: #3D3D3D; /* Medium Charcoal */
|
118
|
+
--md-code-hl-color: #4D4D4D; /* Light Charcoal */
|
119
|
+
|
120
|
+
--md-code-hl-number-color: #FFB5A1; /* Light Coral */
|
121
|
+
--md-code-hl-special-color: #FFE5A1; /* Light Yellow */
|
122
|
+
--md-code-hl-function-color: #E8C6EA; /* Light Purple */
|
123
|
+
--md-code-hl-constant-color: #B8E8D4; /* Light Mint */
|
124
|
+
--md-code-hl-keyword-color: #FFB5A1; /* Light Coral */
|
125
|
+
--md-code-hl-string-color: #D1E8B8; /* Light Green */
|
126
|
+
--md-code-hl-name-color: #B8D5E8; /* Light Blue */
|
127
|
+
--md-code-hl-operator-color: #B8E8D4; /* Light Mint */
|
128
|
+
--md-code-hl-punctuation-color: #D1D1D1; /* Light Gray */
|
129
|
+
--md-code-hl-comment-color: #B8B8B8; /* Medium Gray */
|
130
|
+
--md-code-hl-generic-color: #E8E8E8; /* Off White */
|
131
|
+
--md-code-hl-variable-color: #B8D5E8; /* Light Blue */
|
132
|
+
|
133
|
+
--md-typeset-color: var(--md-default-fg-color);
|
134
|
+
--md-typeset-a-color: #E6A99F; /* Soft Terracotta */
|
135
|
+
|
136
|
+
--md-typeset-mark-color: #E9C7B780; /* Soft Peach with transparency */
|
137
|
+
|
138
|
+
--md-typeset-table-color: #4D4D4D; /* Light Charcoal */
|
139
|
+
--md-typeset-table-color--light: #3D3D3D; /* Medium Charcoal */
|
140
|
+
|
141
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
142
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
143
|
+
|
144
|
+
--md-warning-fg-color: #2D2D2D; /* Soft Charcoal */
|
145
|
+
--md-warning-bg-color: #E9C7B7; /* Soft Peach */
|
146
|
+
|
147
|
+
--md-footer-fg-color: #F5F5F0; /* Soft Cream */
|
148
|
+
--md-footer-fg-color--light: #E8E8E3; /* Light Cream */
|
149
|
+
--md-footer-fg-color--lighter: #DCDCD7; /* Muted Cream */
|
150
|
+
--md-footer-bg-color: #2D2D2D; /* Soft Charcoal */
|
151
|
+
--md-footer-bg-color--dark: #3D3D3D; /* Medium Charcoal */
|
152
|
+
|
153
|
+
--md-code-shadow-color: rgba(0, 0, 0, 0.2);
|
154
|
+
}
|
155
|
+
|
156
|
+
/* Apply theme-specific shadow to code boxes */
|
157
|
+
.md-typeset pre {
|
158
|
+
box-shadow: 0 2px 6px var(--md-code-shadow-color);
|
159
|
+
}
|
160
|
+
|
161
|
+
/* Ensure inline code uses theme background */
|
162
|
+
.md-typeset code:not(pre code) {
|
163
|
+
background-color: var(--md-code-bg-color);
|
164
|
+
color: var(--md-code-fg-color);
|
165
|
+
}
|
166
|
+
|
167
|
+
/* Add horizontal padding to headers */
|
168
|
+
.md-header_inner {
|
169
|
+
margin-left: 20px;
|
170
|
+
margin-right: 20px;
|
171
|
+
}
|
172
|
+
|
173
|
+
.md-header--lifted {
|
174
|
+
border-bottom-left-radius: 10px;
|
175
|
+
border-bottom-right-radius: 10px;
|
176
|
+
}
|
177
|
+
|
178
|
+
.md-tabs {
|
179
|
+
border-bottom-left-radius: 10px;
|
180
|
+
border-bottom-right-radius: 10px;
|
181
|
+
}
|
182
|
+
|
183
|
+
.md-header--shadow {
|
184
|
+
margin-left: 20px;
|
185
|
+
margin-right: 20px;
|
186
|
+
}
|
187
|
+
|
188
|
+
.md-footer {
|
189
|
+
border-top-left-radius: 10px;
|
190
|
+
border-top-right-radius: 10px;
|
191
|
+
margin-left: 20px;
|
192
|
+
margin-right: 20px;
|
193
|
+
}
|
194
|
+
|
195
|
+
.md-footer-meta {
|
196
|
+
margin-left: 20px;
|
197
|
+
margin-right: 20px;
|
198
|
+
}
|
199
|
+
|
200
|
+
.md-ellipsis {
|
201
|
+
position: relative;
|
202
|
+
}
|
203
|
+
|
204
|
+
.md-header__title .md-ellipsis {
|
205
|
+
position: relative;
|
206
|
+
}
|
207
|
+
|
208
|
+
.jupyter-wrapper .highlight pre {
|
209
|
+
background-color: #1e1e1e !important;
|
210
|
+
}
|
211
|
+
|
212
|
+
.jupyter-wrapper .CodeMirror {
|
213
|
+
background-color: #1e1e1e !important;
|
214
|
+
}
|
215
|
+
|
216
|
+
.grid.cards {
|
217
|
+
border-radius: 6px;
|
218
|
+
}
|
219
|
+
|
220
|
+
.md-footer-meta {
|
221
|
+
border-top-left-radius : 10px;
|
222
|
+
border-top-right-radius : 10px;
|
223
|
+
}
|
224
|
+
|
225
|
+
.md-nav__item--section {
|
226
|
+
font-family: var(--md-text-font);
|
227
|
+
color: var(--md-default-fg-color);
|
228
|
+
font-style: bold;
|
229
|
+
font-size: 1.2em;
|
230
|
+
}
|
231
|
+
|
232
|
+
.md-nav__link {
|
233
|
+
font-family: var(--md-text-font);
|
234
|
+
color: var(--md-default-fg-color);
|
235
|
+
font-style: normal;
|
236
|
+
font-size: 0.95em;
|
237
|
+
}
|
238
|
+
|
239
|
+
.jp-InputArea-editor {
|
240
|
+
background: var(--md-code-bg-color);
|
241
|
+
border-radius: 12px;
|
242
|
+
}
|
243
|
+
|
244
|
+
.highlight-ipynb {
|
245
|
+
font-family: var(--md-code-font) !important;
|
246
|
+
font-size: 16px !important;
|
247
|
+
}
|
248
|
+
|
249
|
+
/* Comments */
|
250
|
+
.highlight-ipynb .c1 {
|
251
|
+
color: var(--md-code-hl-comment-color) !important;
|
252
|
+
font-style: italic;
|
253
|
+
}
|
254
|
+
|
255
|
+
.highlight-ipynb .sd {
|
256
|
+
color: var(--md-code-hl-comment-color) !important;
|
257
|
+
font-style: italic;
|
258
|
+
}
|
259
|
+
|
260
|
+
.highlight-ipynb .s2 {
|
261
|
+
color: var(--md-code-hl-string-color) !important;
|
262
|
+
}
|
263
|
+
|
264
|
+
.highlight-ipynb .s1 {
|
265
|
+
color: var(--md-code-hl-string-color) !important;
|
266
|
+
}
|
267
|
+
|
268
|
+
/* Keywords ('import', 'def', etc.) */
|
269
|
+
.highlight-ipynb .kn {
|
270
|
+
color: var(--md-code-hl-keyword-color) !important;
|
271
|
+
font-style: italic;
|
272
|
+
}
|
273
|
+
|
274
|
+
.highlight-ipynb .k {
|
275
|
+
color: var(--md-code-hl-keyword-color) !important;
|
276
|
+
font-style: italic;
|
277
|
+
}
|
278
|
+
|
279
|
+
/* types */
|
280
|
+
.highlight-ipynb .nb {
|
281
|
+
color: var(--md-code-hl-constant-color) !important;
|
282
|
+
font-style: italic;
|
283
|
+
}
|
284
|
+
|
285
|
+
/* Names (function names, variable names, etc.) */
|
286
|
+
.highlight-ipynb .nn {
|
287
|
+
color: var(--md-code-hl-function-color) !important;
|
288
|
+
}
|
289
|
+
|
290
|
+
.highlight-ipynb .n {
|
291
|
+
color: var(--md-code-hl-name-color) !important;
|
292
|
+
}
|
293
|
+
|
294
|
+
/* Operators ('+', '-', '*', etc.) */
|
295
|
+
.highlight-ipynb .o {
|
296
|
+
color: var(--md-code-hl-operator-color) !important;
|
297
|
+
}
|
298
|
+
|
299
|
+
/* Parentheses */
|
300
|
+
.highlight-ipynb .p {
|
301
|
+
color: var(--md-code-hl-punctuation-color) !important;
|
302
|
+
}
|
303
|
+
|
304
|
+
.md-typeset blockquote {
|
305
|
+
color: var(--md-default-fg-color--lighter) !important;
|
306
|
+
margin-left: 0;
|
307
|
+
margin-right: 0;
|
308
|
+
}
|
309
|
+
|
310
|
+
.jp-InputPrompt {
|
311
|
+
flex: 0 0 var(--jp-cell-prompt-width);
|
312
|
+
padding: 6px;
|
313
|
+
font-family: var(--md-code-font);
|
314
|
+
letter-spacing: 1px;
|
315
|
+
line-height: 1.6;
|
316
|
+
font-size: var(--jp-code-font-size);
|
317
|
+
border: var(--jp-border-width) solid transparent;
|
318
|
+
}
|
319
|
+
|
320
|
+
.CodeMirror {
|
321
|
+
background-color: var(--md-code-bg-color) !important;
|
322
|
+
color: var(--md-code-fg-color) !important;
|
323
|
+
}
|
324
|
+
|
325
|
+
.jp-CodeMirrorEditor {
|
326
|
+
border-radius: 12px !important;
|
327
|
+
}
|
328
|
+
|
329
|
+
.jp-Editor {
|
330
|
+
border-radius: 12px !important;
|
331
|
+
}
|
332
|
+
|
333
|
+
.jp-InputArea-editor {
|
334
|
+
border-radius: 12px !important;
|
335
|
+
border: none !important;
|
336
|
+
padding: 8px !important;
|
337
|
+
background-color: #1e1e1e !important;
|
338
|
+
}
|
339
|
+
|
340
|
+
.jp-InputArea-prompt {
|
341
|
+
color: var(--md-code-fg-color) !important;
|
342
|
+
}
|
343
|
+
|
344
|
+
.jp-OutputArea-output {
|
345
|
+
background-color: #1e1e1e !important;
|
346
|
+
border-radius: 12px !important;
|
347
|
+
padding-left: 8px !important;
|
348
|
+
padding-right: 8px !important;
|
349
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
|
350
|
+
font-size: 14px !important;
|
351
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 15H6l7-14v8h5l-7 14z"></path></svg>
|
@@ -0,0 +1,180 @@
|
|
1
|
+
"""hammad-python
|
2
|
+
|
3
|
+
```markdown
|
4
|
+
## Happliy Accelerated Micro Modules (for) Application Development
|
5
|
+
```
|
6
|
+
"""
|
7
|
+
|
8
|
+
from typing import TYPE_CHECKING
|
9
|
+
from ._core._utils._import_utils import _auto_create_getattr_loader
|
10
|
+
|
11
|
+
|
12
|
+
if TYPE_CHECKING:
|
13
|
+
# hammad.ai
|
14
|
+
# NOTE:
|
15
|
+
# TO USE MODULES FROM THE `hammad.ai` EXTENSION,
|
16
|
+
# REQUIRES INSTALLATION OF THE `hammad-python[ai]` PACKAGE.
|
17
|
+
from .ai import (
|
18
|
+
create_completion,
|
19
|
+
async_create_completion,
|
20
|
+
create_embeddings,
|
21
|
+
async_create_embeddings,
|
22
|
+
)
|
23
|
+
|
24
|
+
# hammad.base
|
25
|
+
from .base import Model, field, create_model, is_field, is_model, validator
|
26
|
+
|
27
|
+
# hammad.cache
|
28
|
+
from .cache import Cache, cached, auto_cached, create_cache
|
29
|
+
|
30
|
+
# hammad.cli
|
31
|
+
from .cli import print, animate, input
|
32
|
+
|
33
|
+
# hammad.configuration
|
34
|
+
from .configuration import (
|
35
|
+
Configuration,
|
36
|
+
read_configuration_from_os_vars,
|
37
|
+
read_configuration_from_dotenv,
|
38
|
+
read_configuration_from_file,
|
39
|
+
read_configuration_from_url,
|
40
|
+
read_configuration_from_os_prefix,
|
41
|
+
)
|
42
|
+
|
43
|
+
# hammad.data
|
44
|
+
from .data import Collection, Database, create_collection, create_database
|
45
|
+
|
46
|
+
# hammad.json
|
47
|
+
from .json import encode_json, decode_json, convert_to_json_schema
|
48
|
+
|
49
|
+
# hammad.logging
|
50
|
+
from .logging import (
|
51
|
+
Logger,
|
52
|
+
create_logger,
|
53
|
+
trace,
|
54
|
+
trace_cls,
|
55
|
+
trace_function,
|
56
|
+
trace_http,
|
57
|
+
install_trace_http,
|
58
|
+
)
|
59
|
+
|
60
|
+
# hammad.multithreading
|
61
|
+
from .multithreading import (
|
62
|
+
run_parallel,
|
63
|
+
run_sequentially,
|
64
|
+
run_with_retry,
|
65
|
+
retry,
|
66
|
+
)
|
67
|
+
|
68
|
+
# hammad.pydantic
|
69
|
+
from .pydantic import (
|
70
|
+
convert_to_pydantic_field,
|
71
|
+
convert_to_pydantic_model,
|
72
|
+
)
|
73
|
+
|
74
|
+
# hammad.text
|
75
|
+
from .text import (
|
76
|
+
Text,
|
77
|
+
OutputText,
|
78
|
+
SimpleText,
|
79
|
+
convert_to_text,
|
80
|
+
convert_type_to_text,
|
81
|
+
convert_docstring_to_text,
|
82
|
+
)
|
83
|
+
|
84
|
+
# hammad.web
|
85
|
+
from .web import (
|
86
|
+
create_http_client,
|
87
|
+
create_openapi_client,
|
88
|
+
create_search_client,
|
89
|
+
search_news,
|
90
|
+
search_web,
|
91
|
+
run_web_request,
|
92
|
+
read_web_page,
|
93
|
+
read_web_pages,
|
94
|
+
extract_page_links,
|
95
|
+
)
|
96
|
+
|
97
|
+
# hammad.yaml
|
98
|
+
from .yaml import encode_yaml, decode_yaml, read_yaml_file
|
99
|
+
|
100
|
+
|
101
|
+
__all__ = (
|
102
|
+
# hammad.ai
|
103
|
+
"create_completion",
|
104
|
+
"async_create_completion",
|
105
|
+
"create_embeddings",
|
106
|
+
"async_create_embeddings",
|
107
|
+
# hammad.base
|
108
|
+
"Model",
|
109
|
+
"field",
|
110
|
+
"create_model",
|
111
|
+
# hammad.cache
|
112
|
+
"Cache",
|
113
|
+
"cached",
|
114
|
+
"auto_cached",
|
115
|
+
"create_cache",
|
116
|
+
# hammad.cli
|
117
|
+
"print",
|
118
|
+
"animate",
|
119
|
+
"input",
|
120
|
+
# hammad.configuration
|
121
|
+
"Configuration",
|
122
|
+
"read_configuration_from_os_vars",
|
123
|
+
"read_configuration_from_dotenv",
|
124
|
+
"read_configuration_from_file",
|
125
|
+
"read_configuration_from_url",
|
126
|
+
"read_configuration_from_os_prefix",
|
127
|
+
# hammad.data
|
128
|
+
"Collection",
|
129
|
+
"Database",
|
130
|
+
"create_collection",
|
131
|
+
"create_database",
|
132
|
+
# hammad.json
|
133
|
+
"encode_json",
|
134
|
+
"decode_json",
|
135
|
+
"convert_to_json_schema",
|
136
|
+
# hammad.logging
|
137
|
+
"Logger",
|
138
|
+
"create_logger",
|
139
|
+
"trace",
|
140
|
+
"trace_cls",
|
141
|
+
"trace_function",
|
142
|
+
"trace_http",
|
143
|
+
"install_trace_http",
|
144
|
+
# hammad.multithreading
|
145
|
+
"run_parallel",
|
146
|
+
"run_sequentially",
|
147
|
+
"run_with_retry",
|
148
|
+
"retry",
|
149
|
+
# hammad.pydantic
|
150
|
+
"convert_to_pydantic_field",
|
151
|
+
"convert_to_pydantic_model",
|
152
|
+
# hammad.text
|
153
|
+
"Text",
|
154
|
+
"OutputText",
|
155
|
+
"SimpleText",
|
156
|
+
"convert_to_text",
|
157
|
+
"convert_type_to_text",
|
158
|
+
"convert_docstring_to_text",
|
159
|
+
# hammad.web
|
160
|
+
"create_http_client",
|
161
|
+
"create_openapi_client",
|
162
|
+
"create_search_client",
|
163
|
+
"search_news",
|
164
|
+
"search_web",
|
165
|
+
"run_web_request",
|
166
|
+
"read_web_page",
|
167
|
+
"read_web_pages",
|
168
|
+
"extract_page_links",
|
169
|
+
# hammad.yaml
|
170
|
+
"encode_yaml",
|
171
|
+
"decode_yaml",
|
172
|
+
"read_yaml_file",
|
173
|
+
)
|
174
|
+
|
175
|
+
|
176
|
+
__getattr__ = _auto_create_getattr_loader(__all__)
|
177
|
+
|
178
|
+
|
179
|
+
def __dir__() -> list[str]:
|
180
|
+
return list(__all__)
|
@@ -0,0 +1 @@
|
|
1
|
+
"""hammad._core"""
|