Skip to content

Commit c3246da

Browse files
committed
Merge branch 'main' of https://github.com/nk-ag/exospherehost into pathofdocs
2 parents ccbe066 + 6e22a24 commit c3246da

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ You can also visit the [official documentation site](https://docs.exosphere.host
109109

110110

111111

112+
## Open Source Commitment
113+
114+
We believe that humanity would not have been able to achieve the level of innovation and progress we have today without the support of open source and community, we want to be a part of this movement and support the open source community. In following ways:
115+
116+
1. We will be open sourcing majority of our codebase for exosphere.host and making it available to the community. We welcome all sort of contributions and feedback from the community and will be happy to collaborate with you.
117+
2. For whatever the profits which we generate from exosphere.host, we will be donating a portion of it to open source projects and communities. If you have any questions, suggestions or ideas.
118+
3. We would be further collaborating with various open source student programs to provide with the support and encourage and mentor the next generation of open source contributors.
119+
120+
Please feel free to reach out to us at [nivedit@exosphere.host](mailto:nivedit@exosphere.host). Lets push the boundaries of possibilities for humanity together!
121+
122+
112123
## Open Source Commitment
113124

114125
We believe that humanity would not have been able to achieve the level of innovation and progress we have today without the support of open source and community, we want to be a part of this movement and support the open source community. In following ways:

‎docs/docs/index.md‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,113 @@ Runtime(
138138

139139
The runtime will automatically reload and register the updated node.
140140

141+
### Create it
142+
143+
Create a file `main.py` with:
144+
145+
```python
146+
from exospherehost import Runtime, BaseNode
147+
from pydantic import BaseModel
148+
149+
class HelloWorldNode(BaseNode):
150+
class Inputs(BaseModel):
151+
name: str
152+
153+
class Outputs(BaseModel):
154+
message: str
155+
156+
class Secrets(BaseModel):
157+
pass
158+
159+
async def execute(self) -> Outputs:
160+
return self.Outputs(
161+
message=f"Hello, {self.inputs.name}!"
162+
)
163+
164+
# Initialize the runtime
165+
Runtime(
166+
namespace="MyProject",
167+
name="HelloWorld",
168+
nodes=[HelloWorldNode]
169+
).start()
170+
```
171+
172+
### Run it
173+
174+
Run the server with:
175+
176+
```bash
177+
uv run main.py
178+
```
179+
180+
### Check it
181+
182+
Your runtime is now running and ready to process workflows!
183+
184+
### Interactive Dashboard
185+
186+
Now go to your Exosphere dashboard to:
187+
188+
* View your registered nodes
189+
* Create and manage graph templates
190+
* Trigger workflows
191+
* Monitor execution states
192+
* Debug and troubleshoot
193+
194+
Ref: [Dashboard Guide](./exosphere/dashboard.md)
195+
196+
## Example flow
197+
198+
Now modify the file `main.py` to add more complex processing:
199+
200+
```python
201+
from exospherehost import Runtime, BaseNode
202+
from pydantic import BaseModel
203+
import json
204+
205+
class DataProcessorNode(BaseNode):
206+
class Inputs(BaseModel):
207+
data: str
208+
operation: str
209+
210+
class Outputs(BaseModel):
211+
result: str
212+
status: str
213+
214+
class Secrets(BaseModel):
215+
api_key: str
216+
217+
async def execute(self) -> Outputs:
218+
# Parse the input data
219+
try:
220+
data = json.loads(self.inputs.data)
221+
except:
222+
return self.Outputs(
223+
result="",
224+
status="error: invalid json"
225+
)
226+
227+
# Process based on operation
228+
if self.inputs.operation == "transform":
229+
result = {"transformed": data, "processed": True}
230+
else:
231+
result = {"original": data, "processed": False}
232+
233+
return self.Outputs(
234+
result=json.dumps(result),
235+
status="success"
236+
)
237+
238+
# Initialize the runtime
239+
Runtime(
240+
namespace="MyProject",
241+
name="DataProcessor",
242+
nodes=[DataProcessorNode]
243+
).start()
244+
```
245+
246+
The runtime will automatically reload and register the updated node.
247+
141248

142249
## Open Source Commitment
143250

0 commit comments

Comments
 (0)