hammad-python 0.0.31__py3-none-any.whl → 0.0.33__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.
- ham/__init__.py +190 -0
- {hammad_python-0.0.31.dist-info → hammad_python-0.0.33.dist-info}/METADATA +5 -5
- hammad_python-0.0.33.dist-info/RECORD +6 -0
- hammad_python-0.0.31.dist-info/RECORD +0 -6
- {hammad_python-0.0.31.dist-info → hammad_python-0.0.33.dist-info}/WHEEL +0 -0
- {hammad_python-0.0.31.dist-info → hammad_python-0.0.33.dist-info}/licenses/LICENSE +0 -0
ham/__init__.py
CHANGED
@@ -4,7 +4,197 @@
|
|
4
4
|
## `hammad-python`
|
5
5
|
|
6
6
|
Fun bunch of stuff ***:)***
|
7
|
+
|
8
|
+
This module is a collection over various sub-packages that
|
9
|
+
define the `ham` namespace. These packages include:
|
10
|
+
|
11
|
+
- `hammad-python-core`
|
12
|
+
- `hammad-python-data`
|
13
|
+
- `hammad-python-genai`
|
14
|
+
- `hammad-python-http`
|
7
15
|
```
|
16
|
+
|
17
|
+
You can access a variety of the primary resources from these modules
|
18
|
+
directly from this top level module.
|
8
19
|
"""
|
9
20
|
|
10
21
|
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
22
|
+
|
23
|
+
from typing import TYPE_CHECKING
|
24
|
+
|
25
|
+
try:
|
26
|
+
from ham.core._internal import type_checking_importer
|
27
|
+
except ImportError:
|
28
|
+
from .core._internal import type_checking_importer # type: ignore
|
29
|
+
|
30
|
+
|
31
|
+
if TYPE_CHECKING:
|
32
|
+
try:
|
33
|
+
# ham.core
|
34
|
+
from ham.core._internal._logging import set_debug, set_verbose
|
35
|
+
from ham.core.cache import cached, auto_cached
|
36
|
+
from ham.core.cli import print, animate, input, log, log_iterable, log_progress
|
37
|
+
from ham.core.conversion import (
|
38
|
+
convert_to_text,
|
39
|
+
convert_to_json_schema,
|
40
|
+
convert_to_model,
|
41
|
+
convert_to_pydantic_model,
|
42
|
+
)
|
43
|
+
from ham.core.logging import get_logger, trace, trace_http
|
44
|
+
|
45
|
+
# ham.data
|
46
|
+
from ham.data.collections import (
|
47
|
+
create_collection,
|
48
|
+
)
|
49
|
+
|
50
|
+
# ham.genai
|
51
|
+
from ham.genai.models.embeddings import run_embedding_model
|
52
|
+
from ham.genai.models.language import run_language_model
|
53
|
+
from ham.genai.models.reranking import run_reranking_model
|
54
|
+
from ham.genai.models.multimodal import (
|
55
|
+
run_image_generation_model,
|
56
|
+
run_transcription_model,
|
57
|
+
run_tts_model,
|
58
|
+
)
|
59
|
+
from ham.genai.agents import create_agent, run_agent, run_agent_iter
|
60
|
+
from ham.genai.graphs import (
|
61
|
+
# NOTE: lol... uh i just really wanted everything to be lowercase..
|
62
|
+
# this may need a once over
|
63
|
+
BaseGraph as basegraph,
|
64
|
+
action as graphaction,
|
65
|
+
)
|
66
|
+
from ham.genai.prompted import (
|
67
|
+
prompted_fn as prompted,
|
68
|
+
contextualize,
|
69
|
+
itemize,
|
70
|
+
select,
|
71
|
+
tool,
|
72
|
+
)
|
73
|
+
from ham.genai.a2a import as_a2a_app
|
74
|
+
|
75
|
+
# ham.http
|
76
|
+
from ham.http import (
|
77
|
+
create_client,
|
78
|
+
create_openapi_client,
|
79
|
+
create_http_client,
|
80
|
+
create_mcp_client,
|
81
|
+
create_server,
|
82
|
+
create_fast_service,
|
83
|
+
function_server,
|
84
|
+
function_mcp_server,
|
85
|
+
run_web_request,
|
86
|
+
read_web_page,
|
87
|
+
read_web_pages,
|
88
|
+
run_web_search,
|
89
|
+
run_news_search,
|
90
|
+
extract_web_page_links,
|
91
|
+
create_search_client,
|
92
|
+
)
|
93
|
+
except ImportError:
|
94
|
+
from ham.core._internal import ( # type: ignore
|
95
|
+
set_debug,
|
96
|
+
set_verbose,
|
97
|
+
)
|
98
|
+
from ham.data import ( # type: ignore
|
99
|
+
create_collection,
|
100
|
+
)
|
101
|
+
from ham.genai import ( # type: ignore
|
102
|
+
create_agent,
|
103
|
+
run_agent,
|
104
|
+
run_agent_iter,
|
105
|
+
run_embedding_model,
|
106
|
+
run_language_model,
|
107
|
+
run_reranking_model,
|
108
|
+
run_image_generation_model,
|
109
|
+
run_transcription_model,
|
110
|
+
run_tts_model,
|
111
|
+
basegraph,
|
112
|
+
graphaction,
|
113
|
+
prompted,
|
114
|
+
contextualize,
|
115
|
+
itemize,
|
116
|
+
select,
|
117
|
+
tool,
|
118
|
+
)
|
119
|
+
from ham.http import ( # type: ignore
|
120
|
+
create_client,
|
121
|
+
create_openapi_client,
|
122
|
+
create_http_client,
|
123
|
+
create_mcp_client,
|
124
|
+
create_server,
|
125
|
+
create_fast_service,
|
126
|
+
function_server,
|
127
|
+
function_mcp_server,
|
128
|
+
run_web_request,
|
129
|
+
read_web_page,
|
130
|
+
read_web_pages,
|
131
|
+
run_web_search,
|
132
|
+
run_news_search,
|
133
|
+
extract_web_page_links,
|
134
|
+
create_search_client,
|
135
|
+
)
|
136
|
+
|
137
|
+
|
138
|
+
__all__ = (
|
139
|
+
# ham.core
|
140
|
+
"set_debug",
|
141
|
+
"set_verbose",
|
142
|
+
"cached",
|
143
|
+
"auto_cached",
|
144
|
+
"print",
|
145
|
+
"animate",
|
146
|
+
"input",
|
147
|
+
"log",
|
148
|
+
"log_iterable",
|
149
|
+
"log_progress",
|
150
|
+
"convert_to_text",
|
151
|
+
"convert_to_json_schema",
|
152
|
+
"convert_to_model",
|
153
|
+
"convert_to_pydantic_model",
|
154
|
+
"get_logger",
|
155
|
+
"trace",
|
156
|
+
"trace_http",
|
157
|
+
# ham.data
|
158
|
+
"create_collection",
|
159
|
+
# ham.genai
|
160
|
+
"create_agent",
|
161
|
+
"run_agent",
|
162
|
+
"run_agent_iter",
|
163
|
+
"run_embedding_model",
|
164
|
+
"run_language_model",
|
165
|
+
"run_reranking_model",
|
166
|
+
"run_image_generation_model",
|
167
|
+
"run_transcription_model",
|
168
|
+
"run_tts_model",
|
169
|
+
"basegraph",
|
170
|
+
"graphaction",
|
171
|
+
"prompted",
|
172
|
+
"contextualize",
|
173
|
+
"itemize",
|
174
|
+
"select",
|
175
|
+
"tool",
|
176
|
+
# ham.http
|
177
|
+
"create_client",
|
178
|
+
"create_openapi_client",
|
179
|
+
"create_http_client",
|
180
|
+
"create_mcp_client",
|
181
|
+
"create_server",
|
182
|
+
"create_fast_service",
|
183
|
+
"function_server",
|
184
|
+
"function_mcp_server",
|
185
|
+
"run_web_request",
|
186
|
+
"read_web_page",
|
187
|
+
"read_web_pages",
|
188
|
+
"run_web_search",
|
189
|
+
"run_news_search",
|
190
|
+
"extract_web_page_links",
|
191
|
+
"create_search_client",
|
192
|
+
)
|
193
|
+
|
194
|
+
|
195
|
+
__getattr__ = type_checking_importer(__all__)
|
196
|
+
|
197
|
+
|
198
|
+
def __dir__() -> list[str]:
|
199
|
+
"""Get the attributes of the hammad module."""
|
200
|
+
return __all__
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hammad-python
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.33
|
4
4
|
Summary: Personal Python utilities and tools
|
5
5
|
Author-email: Hammad Saeed <hammadaidev@gmail.com>
|
6
6
|
License: MIT License
|
@@ -26,10 +26,10 @@ License: MIT License
|
|
26
26
|
SOFTWARE.
|
27
27
|
License-File: LICENSE
|
28
28
|
Requires-Python: >=3.11
|
29
|
-
Requires-Dist: hammad-python-core>=0.0.
|
30
|
-
Requires-Dist: hammad-python-data>=0.0.
|
31
|
-
Requires-Dist: hammad-python-genai>=0.0.
|
32
|
-
Requires-Dist: hammad-python-http>=0.0.
|
29
|
+
Requires-Dist: hammad-python-core>=0.0.2
|
30
|
+
Requires-Dist: hammad-python-data>=0.0.2
|
31
|
+
Requires-Dist: hammad-python-genai>=0.0.2
|
32
|
+
Requires-Dist: hammad-python-http>=0.0.2
|
33
33
|
Description-Content-Type: text/markdown
|
34
34
|
|
35
35
|
## hammad-python
|
@@ -0,0 +1,6 @@
|
|
1
|
+
ham/__init__.py,sha256=J1ye-mmybVCdFvMaYJjYVNJa7CEME4W6bIzLuGsQvKE,5215
|
2
|
+
ham/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
hammad_python-0.0.33.dist-info/METADATA,sha256=V40VBFYdpwiyvii0DQMNRMFfTlmgh3-FWlbKPpAFabs,5454
|
4
|
+
hammad_python-0.0.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
hammad_python-0.0.33.dist-info/licenses/LICENSE,sha256=h74yFUWjbBaodcWG5wNmm30npjl8obVcxD-1nQfUp2I,1069
|
6
|
+
hammad_python-0.0.33.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
ham/__init__.py,sha256=MA_bJzOy-7HH-wzIPpMiWFlDq_6MwvRFtRinBFdHJ0Y,142
|
2
|
-
ham/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
hammad_python-0.0.31.dist-info/METADATA,sha256=IfpcOHTQGdS5OddkPu0V9MKX6646xdKJHDY0iQ3NQfc,5454
|
4
|
-
hammad_python-0.0.31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
hammad_python-0.0.31.dist-info/licenses/LICENSE,sha256=h74yFUWjbBaodcWG5wNmm30npjl8obVcxD-1nQfUp2I,1069
|
6
|
-
hammad_python-0.0.31.dist-info/RECORD,,
|
File without changes
|
File without changes
|