You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-7Lines changed: 47 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,39 @@ under the License.
53
53
54
54
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).
55
55
56
+
## Quick Start (2 minutes)
57
+
58
+
Get started with Apache Hamilton in just a few lines of code:
59
+
60
+
```python
61
+
# Step 1: Install (run in terminal)
62
+
# pip install sf-hamilton
63
+
64
+
# Step 2: Define your functions (nodes in the DAG)
65
+
defA() -> int:
66
+
return1
67
+
68
+
defB(A: int) -> int:
69
+
return A +1
70
+
71
+
# Step 3: Execute the DAG
72
+
from hamilton import driver
73
+
74
+
dr = driver.Driver({}, __name__)
75
+
result = dr.execute(["B"])
76
+
77
+
print(result)
78
+
79
+
Expected output: {'B': 2}
80
+
81
+
## What’s happening?
82
+
83
+
Each function becomes a node in the DAG
84
+
Dependencies are defined through function parameters
85
+
Hamilton automatically builds and executes the dependency graph
86
+
87
+
This is the simplest possible pipeline — from here, you can scale to ML workflows, ETL pipelines, and production data systems.
88
+
56
89
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 DAGfor you!
57
90
58
91
<div align="center">
@@ -70,19 +103,26 @@ Apache Hamilton brings modularity and structure to any Python application moving
70
103
71
104
# Installation
72
105
73
-
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.
106
+
Apache Hamilton supports Python 3.8+. We include the optional visualization dependency to display our Apache Hamilton DAG. For visualizations, Graphviz needs to be installed on your system separately.
74
107
75
-
```bash
76
108
pip install "sf-hamilton[visualization]"
77
-
```
109
+
📦 Install Graphviz (required for visualization)
110
+
111
+
If you want to visualize DAGs, ensure Graphviz is installed on your system:
112
+
113
+
Mac : brew install graphviz
78
114
79
-
To use the Apache Hamilton UI, install the `ui` and `sdk` dependencies.
115
+
Ubuntu : sudo apt-get install graphviz
116
+
117
+
Windows : Download and install from: https://graphviz.org/download/
118
+
119
+
⚠️ Make sure Graphviz is added to your system PATH.
120
+
121
+
To use the Apache Hamilton UI, install the ui and sdk dependencies:
80
122
81
-
```bash
82
123
pip install "sf-hamilton[ui,sdk]"
83
-
```
84
124
85
-
To try Apache Hamilton in the browser, visit [www.tryhamilton.dev](https://www.tryhamilton.dev/?utm_source=README)
125
+
To try Apache Hamilton in the browser, visit [Try Hamilton](https://www.tryhamilton.dev/?utm_source=README)
0 commit comments