apache-hamilton 1.89.0__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.
- apache-hamilton-1.89.0/._PKG-INFO +0 -0
- apache-hamilton-1.89.0/DISCLAIMER +10 -0
- apache-hamilton-1.89.0/LICENSE +255 -0
- apache-hamilton-1.89.0/NOTICE +5 -0
- apache-hamilton-1.89.0/PKG-INFO +382 -0
- apache-hamilton-1.89.0/README.md +303 -0
- apache-hamilton-1.89.0/hamilton/__init__.py +24 -0
- apache-hamilton-1.89.0/hamilton/ad_hoc_utils.py +132 -0
- apache-hamilton-1.89.0/hamilton/async_driver.py +530 -0
- apache-hamilton-1.89.0/hamilton/base.py +466 -0
- apache-hamilton-1.89.0/hamilton/caching/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/caching/adapter.py +1476 -0
- apache-hamilton-1.89.0/hamilton/caching/cache_key.py +70 -0
- apache-hamilton-1.89.0/hamilton/caching/fingerprinting.py +288 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/base.py +241 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/file.py +140 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/memory.py +296 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/sqlite.py +283 -0
- apache-hamilton-1.89.0/hamilton/caching/stores/utils.py +40 -0
- apache-hamilton-1.89.0/hamilton/cli/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/cli/__main__.py +336 -0
- apache-hamilton-1.89.0/hamilton/cli/commands.py +127 -0
- apache-hamilton-1.89.0/hamilton/cli/logic.py +339 -0
- apache-hamilton-1.89.0/hamilton/common/__init__.py +75 -0
- apache-hamilton-1.89.0/hamilton/contrib/__init__.py +49 -0
- apache-hamilton-1.89.0/hamilton/data_quality/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/data_quality/base.py +163 -0
- apache-hamilton-1.89.0/hamilton/data_quality/default_validators.py +559 -0
- apache-hamilton-1.89.0/hamilton/data_quality/pandera_validators.py +121 -0
- apache-hamilton-1.89.0/hamilton/dataflows/__init__.py +741 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/README.md +7 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/__init__.py +54 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/author.md +9 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/requirements.txt +0 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/tags.json +7 -0
- apache-hamilton-1.89.0/hamilton/dataflows/template/valid_configs.jsonl +1 -0
- apache-hamilton-1.89.0/hamilton/dev_utils/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/dev_utils/deprecation.py +204 -0
- apache-hamilton-1.89.0/hamilton/driver.py +2254 -0
- apache-hamilton-1.89.0/hamilton/execution/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/execution/debugging_utils.py +57 -0
- apache-hamilton-1.89.0/hamilton/execution/executors.py +501 -0
- apache-hamilton-1.89.0/hamilton/execution/graph_functions.py +419 -0
- apache-hamilton-1.89.0/hamilton/execution/grouping.py +430 -0
- apache-hamilton-1.89.0/hamilton/execution/state.py +543 -0
- apache-hamilton-1.89.0/hamilton/experimental/__init__.py +27 -0
- apache-hamilton-1.89.0/hamilton/experimental/databackend.py +44 -0
- apache-hamilton-1.89.0/hamilton/experimental/decorators/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/experimental/decorators/parameterize_frame.py +234 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_async.py +29 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_cache.py +412 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_dask.py +28 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_databackends.py +175 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_ray.py +28 -0
- apache-hamilton-1.89.0/hamilton/experimental/h_spark.py +32 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/README +21 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/__init__.py +121 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/adapters.py +899 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/base.py +858 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/configuration.py +309 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/delayed.py +201 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/dependencies.py +245 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/expanders.py +1229 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/macros.py +1636 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/metadata.py +433 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/recursive.py +907 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers/validation.py +269 -0
- apache-hamilton-1.89.0/hamilton/function_modifiers_base.py +31 -0
- apache-hamilton-1.89.0/hamilton/graph.py +1123 -0
- apache-hamilton-1.89.0/hamilton/graph_types.py +258 -0
- apache-hamilton-1.89.0/hamilton/graph_utils.py +41 -0
- apache-hamilton-1.89.0/hamilton/htypes.py +453 -0
- apache-hamilton-1.89.0/hamilton/io/__init__.py +32 -0
- apache-hamilton-1.89.0/hamilton/io/data_adapters.py +215 -0
- apache-hamilton-1.89.0/hamilton/io/default_data_loaders.py +223 -0
- apache-hamilton-1.89.0/hamilton/io/materialization.py +500 -0
- apache-hamilton-1.89.0/hamilton/io/utils.py +158 -0
- apache-hamilton-1.89.0/hamilton/lifecycle/__init__.py +67 -0
- apache-hamilton-1.89.0/hamilton/lifecycle/api.py +832 -0
- apache-hamilton-1.89.0/hamilton/lifecycle/base.py +1130 -0
- apache-hamilton-1.89.0/hamilton/lifecycle/default.py +809 -0
- apache-hamilton-1.89.0/hamilton/log_setup.py +47 -0
- apache-hamilton-1.89.0/hamilton/models.py +92 -0
- apache-hamilton-1.89.0/hamilton/node.py +447 -0
- apache-hamilton-1.89.0/hamilton/plugins/README.md +29 -0
- apache-hamilton-1.89.0/hamilton/plugins/__init__.py +16 -0
- apache-hamilton-1.89.0/hamilton/plugins/dask_extensions.py +47 -0
- apache-hamilton-1.89.0/hamilton/plugins/dlt_extensions.py +160 -0
- apache-hamilton-1.89.0/hamilton/plugins/geopandas_extensions.py +49 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_dask.py +331 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_ddog.py +522 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_diskcache.py +163 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/__init__.py +22 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/__main__.py +67 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/cache.py +39 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/data_model.py +68 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/hook.py +219 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_experiments/server.py +378 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_kedro.py +152 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_logging.py +461 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_mlflow.py +335 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_narwhals.py +134 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_openlineage.py +399 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_opentelemetry.py +166 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_pandas.py +256 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_pandera.py +118 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_polars.py +305 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_polars_lazyframe.py +283 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_pyarrow.py +56 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_pydantic.py +128 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_ray.py +242 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_rich.py +141 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_schema.py +494 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_slack.py +100 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_spark.py +1376 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_threadpool.py +124 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_tqdm.py +121 -0
- apache-hamilton-1.89.0/hamilton/plugins/h_vaex.py +129 -0
- apache-hamilton-1.89.0/hamilton/plugins/huggingface_extensions.py +244 -0
- apache-hamilton-1.89.0/hamilton/plugins/ibis_extensions.py +93 -0
- apache-hamilton-1.89.0/hamilton/plugins/jupyter_magic.py +622 -0
- apache-hamilton-1.89.0/hamilton/plugins/kedro_extensions.py +116 -0
- apache-hamilton-1.89.0/hamilton/plugins/lightgbm_extensions.py +98 -0
- apache-hamilton-1.89.0/hamilton/plugins/matplotlib_extensions.py +107 -0
- apache-hamilton-1.89.0/hamilton/plugins/mlflow_extensions.py +215 -0
- apache-hamilton-1.89.0/hamilton/plugins/numpy_extensions.py +104 -0
- apache-hamilton-1.89.0/hamilton/plugins/pandas_extensions.py +1766 -0
- apache-hamilton-1.89.0/hamilton/plugins/plotly_extensions.py +149 -0
- apache-hamilton-1.89.0/hamilton/plugins/polars_extensions.py +71 -0
- apache-hamilton-1.89.0/hamilton/plugins/polars_implementations.py +25 -0
- apache-hamilton-1.89.0/hamilton/plugins/polars_lazyframe_extensions.py +310 -0
- apache-hamilton-1.89.0/hamilton/plugins/polars_post_1_0_0_extensions.py +824 -0
- apache-hamilton-1.89.0/hamilton/plugins/polars_pre_1_0_0_extension.py +849 -0
- apache-hamilton-1.89.0/hamilton/plugins/pydantic_extensions.py +98 -0
- apache-hamilton-1.89.0/hamilton/plugins/pyspark_pandas_extensions.py +47 -0
- apache-hamilton-1.89.0/hamilton/plugins/sklearn_plot_extensions.py +128 -0
- apache-hamilton-1.89.0/hamilton/plugins/spark_extensions.py +104 -0
- apache-hamilton-1.89.0/hamilton/plugins/vaex_extensions.py +51 -0
- apache-hamilton-1.89.0/hamilton/plugins/xgboost_extensions.py +90 -0
- apache-hamilton-1.89.0/hamilton/plugins/yaml_extensions.py +88 -0
- apache-hamilton-1.89.0/hamilton/registry.py +260 -0
- apache-hamilton-1.89.0/hamilton/settings.py +18 -0
- apache-hamilton-1.89.0/hamilton/telemetry.py +554 -0
- apache-hamilton-1.89.0/hamilton/version.py +18 -0
- apache-hamilton-1.89.0/pyproject.toml +283 -0
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Apache Hamilton (incubating) is an effort undergoing incubation at the Apache
|
|
2
|
+
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
|
|
3
|
+
|
|
4
|
+
Incubation is required of all newly accepted projects until a further review
|
|
5
|
+
indicates that the infrastructure, communications, and decision making process
|
|
6
|
+
have stabilized in a manner consistent with other successful ASF projects.
|
|
7
|
+
|
|
8
|
+
While incubation status is not necessarily a reflection of the completeness
|
|
9
|
+
or stability of the code, it does indicate that the project has yet to be
|
|
10
|
+
fully endorsed by the ASF.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
203
|
+
-------------------------------
|
|
204
|
+
|
|
205
|
+
hamilton/experimental/databackend.py is copied from https://github.com/machow/databackend
|
|
206
|
+
and is licensed under the MIT License.
|
|
207
|
+
|
|
208
|
+
MIT License
|
|
209
|
+
|
|
210
|
+
Copyright (c) 2024 databackend contributors
|
|
211
|
+
|
|
212
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
213
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
214
|
+
in the Software without restriction, including without limitation the rights
|
|
215
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
216
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
217
|
+
furnished to do so, subject to the following conditions:
|
|
218
|
+
|
|
219
|
+
The above copyright notice and this permission notice shall be included in all
|
|
220
|
+
copies or substantial portions of the Software.
|
|
221
|
+
|
|
222
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
223
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
224
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
225
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
226
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
227
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
228
|
+
SOFTWARE.
|
|
229
|
+
|
|
230
|
+
-------------------------------
|
|
231
|
+
|
|
232
|
+
contrib/hamilton/contrib/user/skrawcz/customize_embeddings/__init__.py is copied
|
|
233
|
+
from https://github.com/openai/openai-cookbook and is licensed under the MIT License.
|
|
234
|
+
|
|
235
|
+
MIT License
|
|
236
|
+
|
|
237
|
+
Copyright (c) 2025 OpenAI
|
|
238
|
+
|
|
239
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
240
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
241
|
+
in the Software without restriction, including without limitation the rights
|
|
242
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
243
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
244
|
+
furnished to do so, subject to the following conditions:
|
|
245
|
+
|
|
246
|
+
The above copyright notice and this permission notice shall be included in all
|
|
247
|
+
copies or substantial portions of the Software.
|
|
248
|
+
|
|
249
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
250
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
251
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
252
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
253
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
254
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
255
|
+
SOFTWARE.
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apache-hamilton
|
|
3
|
+
Version: 1.89.0
|
|
4
|
+
Summary: Hamilton, the micro-framework for creating dataframes.
|
|
5
|
+
Keywords: hamilton
|
|
6
|
+
Author-email: Stefan Krawczyk <stefank@cs.stanford.edu>, Elijah ben Izzy <elijah@dagworks.io>
|
|
7
|
+
Requires-Python: >=3.8.1, <4
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: NOTICE
|
|
21
|
+
Requires-Dist: numpy
|
|
22
|
+
Requires-Dist: pandas
|
|
23
|
+
Requires-Dist: typing_extensions > 4.0.0
|
|
24
|
+
Requires-Dist: typing_inspect
|
|
25
|
+
Requires-Dist: typer ; extra == "cli"
|
|
26
|
+
Requires-Dist: dask[complete] ; extra == "dask"
|
|
27
|
+
Requires-Dist: dask[array] ; extra == "dask-array"
|
|
28
|
+
Requires-Dist: dask[dataframe] ; extra == "dask-dataframe"
|
|
29
|
+
Requires-Dist: dask[diagnostics] ; extra == "dask-diagnostics"
|
|
30
|
+
Requires-Dist: dask[distributed] ; extra == "dask-distributed"
|
|
31
|
+
Requires-Dist: ddtrace<3.0 ; extra == "datadog"
|
|
32
|
+
Requires-Dist: diskcache ; extra == "diskcache"
|
|
33
|
+
Requires-Dist: fastapi ; extra == "experiments"
|
|
34
|
+
Requires-Dist: fastui ; extra == "experiments"
|
|
35
|
+
Requires-Dist: uvicorn ; extra == "experiments"
|
|
36
|
+
Requires-Dist: sf-hamilton-lsp ; extra == "lsp"
|
|
37
|
+
Requires-Dist: openlineage-python ; extra == "openlineage"
|
|
38
|
+
Requires-Dist: pandera ; extra == "pandera"
|
|
39
|
+
Requires-Dist: pydantic>=2.0 ; extra == "pydantic"
|
|
40
|
+
Requires-Dist: pyspark[pandas-on-spark, sql] ; extra == "pyspark"
|
|
41
|
+
Requires-Dist: ray>=2.0.0 ; extra == "ray"
|
|
42
|
+
Requires-Dist: pyarrow ; extra == "ray"
|
|
43
|
+
Requires-Dist: rich ; extra == "rich"
|
|
44
|
+
Requires-Dist: sf-hamilton-sdk ; extra == "sdk"
|
|
45
|
+
Requires-Dist: slack-sdk ; extra == "slack"
|
|
46
|
+
Requires-Dist: tqdm ; extra == "tqdm"
|
|
47
|
+
Requires-Dist: sf-hamilton-ui ; extra == "ui"
|
|
48
|
+
Requires-Dist: vaex ; extra == "vaex" and ( python_version <= '3.10')
|
|
49
|
+
Requires-Dist: graphviz ; extra == "visualization"
|
|
50
|
+
Requires-Dist: networkx ; extra == "visualization"
|
|
51
|
+
Project-URL: changelog, https://github.com/apache/hamilton/releases
|
|
52
|
+
Project-URL: documentation, https://hamilton.apache.org/en/latest/
|
|
53
|
+
Project-URL: homepage, https://www.tryhamilton.dev/
|
|
54
|
+
Project-URL: issues, https://github.com/apache/hamilton/issues
|
|
55
|
+
Project-URL: slack, https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g
|
|
56
|
+
Project-URL: source, https://github.com/apache/hamilton
|
|
57
|
+
Provides-Extra: cli
|
|
58
|
+
Provides-Extra: dask
|
|
59
|
+
Provides-Extra: dask-array
|
|
60
|
+
Provides-Extra: dask-dataframe
|
|
61
|
+
Provides-Extra: dask-diagnostics
|
|
62
|
+
Provides-Extra: dask-distributed
|
|
63
|
+
Provides-Extra: datadog
|
|
64
|
+
Provides-Extra: diskcache
|
|
65
|
+
Provides-Extra: experiments
|
|
66
|
+
Provides-Extra: lsp
|
|
67
|
+
Provides-Extra: openlineage
|
|
68
|
+
Provides-Extra: pandera
|
|
69
|
+
Provides-Extra: pydantic
|
|
70
|
+
Provides-Extra: pyspark
|
|
71
|
+
Provides-Extra: ray
|
|
72
|
+
Provides-Extra: rich
|
|
73
|
+
Provides-Extra: sdk
|
|
74
|
+
Provides-Extra: slack
|
|
75
|
+
Provides-Extra: tqdm
|
|
76
|
+
Provides-Extra: ui
|
|
77
|
+
Provides-Extra: vaex
|
|
78
|
+
Provides-Extra: visualization
|
|
79
|
+
<div align="center">
|
|
80
|
+
<h1><img src="https://github.com/apache/hamilton/assets/2328071/feb6abaa-b6d5-4271-a320-0ae4a18d8aa7" width="50"/> Apache Hamilton β portable & expressive <br> data transformation DAGs</h1>
|
|
81
|
+
<a href='https://hamilton.apache.org/?badge=latest'>
|
|
82
|
+
<img src='https://readthedocs.org/projects/hamilton/badge/?version=latest' alt='Documentation Status' />
|
|
83
|
+
</a><a href="https://www.python.org/downloads/" target="_blank">
|
|
84
|
+
<img src="https://img.shields.io/badge/python-3.8|%203.9|%203.10|%203.11|%203.12-blue.svg" alt="Python supported"/>
|
|
85
|
+
</a>
|
|
86
|
+
<a href="https://pypi.org/project/sf-hamilton/" target="_blank">
|
|
87
|
+
<img src="https://badge.fury.io/py/sf-hamilton.svg" alt="PyPi Version"/>
|
|
88
|
+
</a>
|
|
89
|
+
<a href="https://pepy.tech/project/sf-hamilton" target="_blank">
|
|
90
|
+
<img src="https://pepy.tech/badge/sf-hamilton" alt="Total Downloads"/>
|
|
91
|
+
</a>
|
|
92
|
+
<a href="https://pepy.tech/project/sf-hamilton" target="_blank">
|
|
93
|
+
<img src="https://static.pepy.tech/badge/sf-hamilton/month" alt="Total Monthly Downloads"/>
|
|
94
|
+
</a>
|
|
95
|
+
<br/>
|
|
96
|
+
<a target="_blank" href="https://linkedin.com/showcase/dagster" style="background:none">
|
|
97
|
+
<img src="https://img.shields.io/badge/DAGWorks-Follow-purple.svg?logo=linkedin" />
|
|
98
|
+
</a>
|
|
99
|
+
<a href="https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g" target="_blank">
|
|
100
|
+
<img src="https://img.shields.io/badge/Apache Hamilton-Join-purple.svg?logo=slack" alt="Apache Hamilton Slack"/>
|
|
101
|
+
</a>
|
|
102
|
+
<a href="https://twitter.com/hamilton_os" target="_blank">
|
|
103
|
+
<img src="https://img.shields.io/badge/HamiltonOS-Follow-purple.svg?logo=X"/>
|
|
104
|
+
</a>
|
|
105
|
+
<a href="https://twitter.com/dagworks" target="_blank">
|
|
106
|
+
<img src="https://img.shields.io/badge/DAGWorks-Follow-purple.svg?logo=X"/>
|
|
107
|
+
</a>
|
|
108
|
+
</div>
|
|
109
|
+
<br></br>
|
|
110
|
+
|
|
111
|
+
Apache Hamilton (incubating) is a lightweight Python library for directed acyclic graphs (DAGs) of data transformations. Your DAG is **portable**; it runs anywhere Python runs, whether it's a script, notebook, Airflow pipeline, FastAPI server, etc. Your DAG is **expressive**; Apache Hamilton has extensive features to define and modify the execution of a DAG (e.g., data validation, experiment tracking, remote execution).
|
|
112
|
+
|
|
113
|
+
To create a DAG, write regular Python functions that specify their dependencies with their parameters. As shown below, it results in readable code that can always be visualized. Apache Hamilton loads that definition and automatically builds the DAG for you!
|
|
114
|
+
|
|
115
|
+
<div align="center">
|
|
116
|
+
<img src="./docs/_static/abc_highlight.png" alt="Create a project" width="65%"/>
|
|
117
|
+
</div>
|
|
118
|
+
<div align="center">
|
|
119
|
+
Functions <code>B()</code> and <code>C()</code> refer to function <code>A</code> via their parameters
|
|
120
|
+
</div>
|
|
121
|
+
<br>
|
|
122
|
+
|
|
123
|
+
Apache Hamilton brings modularity and structure to any Python application moving data: ETL pipelines, ML workflows, LLM applications, RAG systems, BI dashboards, and the [Apache Hamilton UI](https://hamilton.apache.org/concepts/ui) allows you to automatically visualize, catalog, and monitor execution.
|
|
124
|
+
|
|
125
|
+
> Apache Hamilton is great for DAGs, but if you need loops or conditional logic to create an LLM agent or a simulation, take a look at our sister library [Burr](https://github.com/apache/burr) π€ .
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# Installation
|
|
129
|
+
|
|
130
|
+
Apache Hamilton supports Python 3.8+. We include the optional `visualization` dependency to display our Apache Hamilton DAG. For visualizations, [Graphviz](https://graphviz.org/download/) needs to be installed on your system separately.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pip install "sf-hamilton[visualization]"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
To use the Apache Hamilton UI, install the `ui` and `sdk` dependencies.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pip install "sf-hamilton[ui,sdk]"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
To try Apache Hamilton in the browser, visit [www.tryhamilton.dev](https://www.tryhamilton.dev/?utm_source=README)
|
|
143
|
+
|
|
144
|
+
# Why use Apache Hamilton?
|
|
145
|
+
|
|
146
|
+
Data teams write code to deliver business value, but few have the resources to standardize practices and provide quality assurance. Moving from proof-of-concept to production and cross-function collaboration (e.g., data science, engineering, ops) remain challenging for teams, big or small. Apache Hamilton is designed to help throughout a project's lifecycle:
|
|
147
|
+
|
|
148
|
+
- **Separation of concerns**. Apache Hamilton separates the DAG "definition" and "execution" which lets data scientists focus on solving problems and engineers manage production pipelines.
|
|
149
|
+
|
|
150
|
+
- **Effective collaboration**. The [Apache Hamilton UI provides a shared interface](https://hamilton.apache.org/hamilton-ui/ui/) for teams to inspect results and debug failures throughout the development cycle.
|
|
151
|
+
|
|
152
|
+
- **Low-friction dev to prod**. Use `@config.when()` to modify your DAG between execution environments instead of error-prone `if/else` feature flags. The notebook extension prevents the pain of migrating code from a notebook to a Python module.
|
|
153
|
+
|
|
154
|
+
- **Portable transformations**. Your DAG is [independent of infrastructure or orchestration](https://blog.dagworks.io/publish/posts/detail/145543927?referrer=%2Fpublish%2Fposts), meaning you can develop and debug locally and reuse code across contexts (local, Airflow, FastAPI, etc.).
|
|
155
|
+
|
|
156
|
+
- **Maintainable DAG definition**. Apache Hamilton [automatically builds the DAG from a single line of code whether it has 10 or 1000 nodes](https://hamilton.apache.org/concepts/driver/). It can also assemble multiple Python modules into a pipeline, encouraging modularity.
|
|
157
|
+
|
|
158
|
+
- **Expressive DAGs**. [Function modifiers](https://hamilton.apache.org/concepts/function-modifiers/) are a unique feature to keep your code [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) and reduce the complexity of maintaining large DAGs. Other frameworks inevitably lead to code redundancy or bloated functions.
|
|
159
|
+
|
|
160
|
+
- **Built-in coding style**. The Apache Hamilton DAG is [defined using Python functions](https://hamilton.apache.org/concepts/node/), encouraging modular, easy-to-read, self-documenting, and unit testable code.
|
|
161
|
+
|
|
162
|
+
- **Data and schema validation**. Decorate functions with `@check_output` to validate output properties, and raise warnings or exceptions. Add the `SchemaValidator()` adapter to automatically inspect dataframe-like objects (pandas, polars, Ibis, etc.) to track and validate their schema.
|
|
163
|
+
|
|
164
|
+
- **Built for plugins**. Apache Hamilton is designed to play nice with all tools and provides the right abstractions to create custom integrations with your stack. Our lively community will help you build what you need!
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
# Apache Hamilton UI
|
|
168
|
+
|
|
169
|
+
You can track the execution of your Apache Hamilton DAG in the [Apache Hamilton UI](https://hamilton.apache.org/hamilton-ui/ui/). It automatically populates a data catalog with lineage / tracing and provides execution observability to inspect results and debug errors. You can run it as a [local server](https://hamilton.apache.org/hamilton-ui/ui/#local-mode) or a [self-hosted application using Docker](https://hamilton.apache.org/hamilton-ui/ui/#docker-deployed-mode).
|
|
170
|
+
|
|
171
|
+
<p align="center">
|
|
172
|
+
<img src="./docs/_static/hamilton_1.jpeg" alt="Description1" width="30%" style="margin-right: 20px;"/>
|
|
173
|
+
<img src="./docs/_static/hamilton_2.jpeg" alt="Description2" width="30%" style="margin-right: 20px;"/>
|
|
174
|
+
<img src="./docs/_static/hamilton_3.jpeg" alt="Description3" width="30%"/>
|
|
175
|
+
</p>
|
|
176
|
+
<p align="center">
|
|
177
|
+
<em>DAG catalog, automatic dataset profiling, and execution tracking</em>
|
|
178
|
+
</p>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## Get started with the Apache Hamilton UI
|
|
182
|
+
|
|
183
|
+
1. To use the Apache Hamilton UI, install the dependencies (see `Installation` section) and start the server with
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
hamilton ui
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
2. On the first connection, create a `username` and a new project (the `project_id` should be `1`).
|
|
190
|
+
|
|
191
|
+
<div align="center">
|
|
192
|
+
<img src="./docs/_static/new_project.png" alt="Create a project" width="70%"/>
|
|
193
|
+
</div>
|
|
194
|
+
<br>
|
|
195
|
+
|
|
196
|
+
3. Track your Apache Hamilton DAG by creating a `HamiltonTracker` object with your `username` and `project_id` and adding it to your `Builder`. Now, your DAG will appear in the UI's catalog and all executions will be tracked!
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
from hamilton import driver
|
|
200
|
+
from hamilton_sdk.adapters import HamiltonTracker
|
|
201
|
+
import my_dag
|
|
202
|
+
|
|
203
|
+
# use your `username` and `project_id`
|
|
204
|
+
tracker = HamiltonTracker(
|
|
205
|
+
username="my_username",
|
|
206
|
+
project_id=1,
|
|
207
|
+
dag_name="hello_world",
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
# adding the tracker to the `Builder` will add the DAG to the catalog
|
|
211
|
+
dr = (
|
|
212
|
+
driver.Builder()
|
|
213
|
+
.with_modules(my_dag)
|
|
214
|
+
.with_adapters(tracker) # add your tracker here
|
|
215
|
+
.build()
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
# executing the `Driver` will track results
|
|
219
|
+
dr.execute(["C"])
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
# Documentation & learning resources
|
|
223
|
+
|
|
224
|
+
* π See the [official documentation](https://hamilton.apache.org/) to learn about the core concepts of Apache Hamilton.
|
|
225
|
+
|
|
226
|
+
* π¨βπ« Consult the [examples on GitHub](https://github.com/apache/hamilton/tree/main/examples) to learn about specific features or integrations with other frameworks.
|
|
227
|
+
|
|
228
|
+
* π° The [DAGWorks blog](https://blog.dagworks.io/) includes guides about how to build a data platform and narrative tutorials.
|
|
229
|
+
|
|
230
|
+
* πΊ Find video tutorials on the [DAGWorks YouTube channel](https://www.youtube.com/@DAGWorks-Inc)
|
|
231
|
+
|
|
232
|
+
* π£ Reach out via the [Apache Hamilton Slack community](https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g) for help and troubleshooting
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
# How does Apache Hamilton compare to X?
|
|
236
|
+
|
|
237
|
+
Apache Hamilton is not an orchestrator ([you might not need one](https://blog.dagworks.io/p/lean-data-automation-a-principal)), nor a feature store ([but you can use it to build one!](https://blog.dagworks.io/p/featurization-integrating-hamilton)). Its purpose is to help you structure and manage data transformations. If you know dbt, Apache Hamilton does for Python what dbt does for SQL.
|
|
238
|
+
|
|
239
|
+
Another way to frame it is to think about the different layers of a data stack. Apache Hamilton is at the **asset layer**. It helps you organize data transformations code (the **expression layer**), manage changes, and validate & test data.
|
|
240
|
+
|
|
241
|
+
<div align="center" style="width: 100%">
|
|
242
|
+
<table>
|
|
243
|
+
<colgroup>
|
|
244
|
+
<col style="width: 20%">
|
|
245
|
+
<col style="width: 40%">
|
|
246
|
+
<col style="width: 40%">
|
|
247
|
+
</colgroup>
|
|
248
|
+
<thead>
|
|
249
|
+
<tr>
|
|
250
|
+
<th>Layer</th>
|
|
251
|
+
<th>Purpose</th>
|
|
252
|
+
<th>Example Tools</th>
|
|
253
|
+
</tr>
|
|
254
|
+
</thead>
|
|
255
|
+
<tbody>
|
|
256
|
+
<tr>
|
|
257
|
+
<td>Orchestration</td>
|
|
258
|
+
<td>Operational system for the creation of assets</td>
|
|
259
|
+
<td>Airflow, Metaflow, Prefect, Dagster</td>
|
|
260
|
+
</tr>
|
|
261
|
+
<tr>
|
|
262
|
+
<td>Asset</td>
|
|
263
|
+
<td>Organize expressions into meaningful units <br> (e.g., dataset, ML model, table)</td>
|
|
264
|
+
<td><b>Apache Hamilton</b>, dbt, dlt, SQLMesh, <a href="https://github.com/apache/burr">Burr</a></td>
|
|
265
|
+
</tr>
|
|
266
|
+
<tr>
|
|
267
|
+
<td>Expression</td>
|
|
268
|
+
<td>Language to write data transformations</td>
|
|
269
|
+
<td>pandas, SQL, polars, Ibis, LangChain</td>
|
|
270
|
+
</tr>
|
|
271
|
+
<tr>
|
|
272
|
+
<td>Execution</td>
|
|
273
|
+
<td>Perform data transformations</td>
|
|
274
|
+
<td>Spark, Snowflake, DuckDB, RAPIDS</td>
|
|
275
|
+
</tr>
|
|
276
|
+
<tr>
|
|
277
|
+
<td>Data</td>
|
|
278
|
+
<td>Physical representation of data, inputs and outputs</td>
|
|
279
|
+
<td>S3, Postgres, file system, Snowflake</td>
|
|
280
|
+
</tr>
|
|
281
|
+
</tbody>
|
|
282
|
+
</table>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
See our page on [Why use Apache Hamilton?](https://hamilton.apache.org/get-started/why-hamilton/) and framework [code comparisons](https://hamilton.apache.org/code-comparisons/) for more information.
|
|
286
|
+
|
|
287
|
+
# π License
|
|
288
|
+
|
|
289
|
+
Apache Hamilton is released under the Apache 2.0 License. See [LICENSE](https://github.com/apache/hamilton/blob/main/LICENSE.md) for details.
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# π Community
|
|
293
|
+
## π¨βπ» Contributing
|
|
294
|
+
We're very supportive of changes by new contributors, big or small! Make sure to discuss potential changes by creating an issue or commenting on an existing one before opening a pull request. Good first contributions include creating an example or an integration with your favorite Python library!
|
|
295
|
+
|
|
296
|
+
To contribute, checkout our [contributing guidelines](https://github.com/apache/hamilton/blob/main/CONTRIBUTING.md), our [developer setup guide](https://github.com/apache/hamilton/blob/main/developer_setup.md), and our [Code of Conduct](https://github.com/apache/hamilton/blob/main/CODE_OF_CONDUCT.md).
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
## π Used by
|
|
300
|
+
Apache Hamilton was started at Stitch Fix before the original creators founded DAGWorks Inc! The library is battle-tested and has been supporting production use cases since 2019.
|
|
301
|
+
|
|
302
|
+
>Read more about the [origin story](https://multithreaded.stitchfix.com/blog/2021/10/14/functions-dags-hamilton/).
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
* [Stitch Fix](https://www.stitchfix.com/) β Time series forecasting
|
|
306
|
+
* [UK Government Digital Services](https://github.com/alphagov/govuk-feedback-analysis) β National feedback pipeline (processing & analysis)
|
|
307
|
+
* [IBM](https://www.ibm.com/) β Internal search and ML pipelines
|
|
308
|
+
* [Opendoor](https://www.opendoor.com/) β Manage PySpark pipelines
|
|
309
|
+
* [Lexis Nexis](https://www.lexisnexis.com/en-us/home.page) β Feature processing and lineage
|
|
310
|
+
* [Adobe](https://www.adobe.com/) β Prompt engineering research
|
|
311
|
+
* [WrenAI](https://github.com/Canner/WrenAI) β async text-to-SQL workflows
|
|
312
|
+
* [British Cycling](https://www.britishcycling.org.uk/) β Telemetry analysis
|
|
313
|
+
* [Oak Ridge & PNNL](https://pnnl.gov/) β Naturf project
|
|
314
|
+
* [ORNL](https://www.ornl.gov/)
|
|
315
|
+
* [Federal Reserve Board](https://www.federalreserve.gov/)
|
|
316
|
+
* [Joby Aviation](https://www.jobyaviation.com/) β Flight data processing
|
|
317
|
+
* [Two](https://www.two.inc/)
|
|
318
|
+
* [Transfix](https://transfix.io/) β Online featurization and prediction
|
|
319
|
+
* [Railofy](https://www.railofy.com) β Orchestrate pandas code
|
|
320
|
+
* [Habitat Energy](https://www.habitat.energy/) β Time-series feature engineering
|
|
321
|
+
* [KI-Insurance](https://www.ki-insurance.com/) β Feature engineering
|
|
322
|
+
* [Ascena Retail](https://www.ascena.com/) β Feature engineering
|
|
323
|
+
* [NaroHQ](https://www.narohq.com/)
|
|
324
|
+
* [EquipmentShare](https://www.equipmentshare.com/)
|
|
325
|
+
* [Everstream.ai](https://www.everstream.ai/)
|
|
326
|
+
* [Flectere](https://flectere.net/)
|
|
327
|
+
* [F33.ai](https://f33.ai/)
|
|
328
|
+
* [Kora Money](https://www.koramoney.com)
|
|
329
|
+
* [Capitec Bank](https://www.capitecbank.co.za/)
|
|
330
|
+
* [Best Egg](https://bestegg.com/)
|
|
331
|
+
* [RTV Euro AGD](https://www.euro.com.pl/)
|
|
332
|
+
* [Wealth.com](https://www.wealth.com/)
|
|
333
|
+
* [wren.ai](https://wren.ai/)
|
|
334
|
+
|
|
335
|
+
## π€ Code Contributors
|
|
336
|
+
[](https://github.com/apache/hamilton/graphs/contributors)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## π Special Mentions & π¦ Bug Hunters
|
|
340
|
+
|
|
341
|
+
Thanks to our awesome community and their active involvement in the Apache Hamilton library.
|
|
342
|
+
|
|
343
|
+
[Nils Olsson](https://github.com/nilsso), [MichaΕ Siedlaczek](https://github.com/elshize), [Alaa Abedrabbo](https://github.com/AAbedrabbo), [Shreya Datar](https://github.com/datarshreya), [Baldo Faieta](https://github.com/baldofaieta), [Anwar Brini](https://github.com/AnwarBrini), [Gourav Kumar](https://github.com/gms101), [Amos Aikman](https://github.com/amosaikman), [Ankush Kundaliya](https://github.com/akundaliya), [David Weselowski](https://github.com/j7zAhU), [Peter Robinson](https://github.com/Peter4137), [Seth Stokes](https://github.com/sT0v), [Louis Maddox](https://github.com/lmmx), [Stephen Bias](https://github.com/s-ducks), [Anup Joseph](https://github.com/AnupJoseph), [Jan Hurst](https://github.com/janhurst), [Flavia Santos](https://github.com/flaviassantos), [Nicolas Huray](https://github.com/nhuray), [Manabu Niseki](https://github.com/ninoseki), [Kyle Pounder](https://github.com/kpounder), [Alex Bustos](https://github.com/bustosalex1), [Andy Day](https://github.com/adayNU), [Alexander Cai](https://github.com/adzcai), [Nils MΓΌller-Wendt](https://github.com/ChronoJon), [Paul Larsen](https://github.com/munichpavel), [
|
|
344
|
+
Kemal Eren](https://github.com/kemaleren), [Jernej Frank](https://github.com/jernejfrank), [Noah Ridge](https://github.com/noahridge)
|
|
345
|
+
|
|
346
|
+
# π Citations
|
|
347
|
+
We'd appreciate citing Apache Hamilton by referencing one of the following:
|
|
348
|
+
|
|
349
|
+
```bibtex
|
|
350
|
+
@inproceedings{DBLP:conf/vldb/KrawczykI22,
|
|
351
|
+
title = {Hamilton: a modular open source declarative paradigm for high level
|
|
352
|
+
modeling of dataflows},
|
|
353
|
+
author = {Stefan Krawczyk and Elijah ben Izzy},
|
|
354
|
+
editor = {Satyanarayana R. Valluri and Mohamed Za{\"{\i}}t},
|
|
355
|
+
booktitle = {1st International Workshop on Composable Data Management Systems,
|
|
356
|
+
CDMS@VLDB 2022, Sydney, Australia, September 9, 2022},
|
|
357
|
+
year = {2022},
|
|
358
|
+
url = {https://cdmsworkshop.github.io/2022/Proceedings/ShortPapers/Paper6\_StefanKrawczyk.pdf},
|
|
359
|
+
timestamp = {Wed, 19 Oct 2022 16:20:48 +0200},
|
|
360
|
+
biburl = {https://dblp.org/rec/conf/vldb/KrawczykI22.bib},
|
|
361
|
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
```bibtex
|
|
365
|
+
@inproceedings{CEURWS:conf/vldb/KrawczykIQ22,
|
|
366
|
+
title = {Hamilton: enabling software engineering best practices for data transformations via generalized dataflow graphs},
|
|
367
|
+
author = {Stefan Krawczyk and Elijah ben Izzy and Danielle Quinn},
|
|
368
|
+
editor = {Cinzia Cappiello and Sandra Geisler and Maria-Esther Vidal},
|
|
369
|
+
booktitle = {1st International Workshop on Data Ecosystems co-located with 48th International Conference on Very Large Databases (VLDB 2022)},
|
|
370
|
+
pages = {41--50},
|
|
371
|
+
url = {https://ceur-ws.org/Vol-3306/paper5.pdf},
|
|
372
|
+
year = {2022}
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
# π Libraries built on / for Apache Hamilton
|
|
377
|
+
* [Hypster](https://github.com/gilad-rubin/hypster) - hyperparameter management
|
|
378
|
+
* [DSP Decision Engine](https://github.com/capitec/dsp-decision-engine) - decision trees
|
|
379
|
+
* [NaturF](https://github.com/IMMM-SFA/naturf/) - library for data transformation for weather forecasting
|
|
380
|
+
* [WrenAI](https://github.com/Canner/WrenAI) - RAG
|
|
381
|
+
* [FlowerPower](https://github.com/legout/flowerpower/) - Scheduler for Apache Hamilton
|
|
382
|
+
|