Nodetool Core is the core library for Nodetool, providing the necessary functionality for building and running AI workflows.
Project description
NodeTool Core
Python Node System & Worker
NodeTool Core is the Python library that provides the node system and worker subprocess for NodeTool. The TypeScript server handles HTTP API, workflow orchestration, agents, and chat. Python handles node execution and local-compute providers (HuggingFace, MLX).
What's Here
- Node system —
BaseNode,ProcessingContext, type metadata - Worker subprocess —
python -m nodetool.workercommunicates with the TS server via WebSocket+MessagePack - Provider infrastructure — Base classes and registry for local-compute providers
- Media processing — Image, audio, video conversion utilities
- DSL — Graph construction and code generation helpers
- Models — Database models (Asset, Job, Secret, etc.)
- Storage — Abstract storage backends (memory, file, S3)
Quick Start
# Install
conda create -n nodetool python=3.11 pandoc ffmpeg -c conda-forge
conda activate nodetool
uv sync
# Run tests
uv run pytest -q
# Start worker (normally spawned by TS server)
python -m nodetool.worker
Writing Nodes
from nodetool.workflows.base_node import BaseNode
from nodetool.workflows.processing_context import ProcessingContext
class MyNode(BaseNode):
"""
Brief description
tags, keywords, for, search
"""
input_text: str = ""
async def process(self, context: ProcessingContext) -> str:
return self.input_text.upper()
Nodes use ProcessingContext for media conversion (image_to_pil, audio_from_numpy, etc.), secrets (get_secret), asset storage, and progress reporting.
Architecture
TS Server (Fastify)
├── HTTP API, WebSocket, Auth
├── Workflow orchestration (DAG scheduling)
├── Cloud providers (OpenAI, Anthropic, Gemini, ...)
└── Spawns Python worker subprocess
↕ WebSocket + MessagePack
Python Worker (this repo)
├── Node discovery & execution
├── Local providers (HuggingFace, MLX)
└── Media processing (ffmpeg, PIL, numpy)
External Node Packages
- nodetool-huggingface — HuggingFace model integrations + local provider
- nodetool-mlx — Apple Silicon optimized nodes + MLX provider
- nodetool-replicate — Replicate API integrations
- nodetool-fal — FAL AI service integrations
- nodetool-elevenlabs — ElevenLabs audio generation
- nodetool-apple — Apple platform integrations
Development
# Setup
conda activate nodetool
uv sync --group dev
# Run tests
uv run pytest -q
# Lint
uv run ruff check .
License
Learn More
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nodetool_core-0.7.1.tar.gz.
File metadata
- Download URL: nodetool_core-0.7.1.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3757d8e65fe4d74fe8eb5430eed7d6c7df2502b61ac225438cdd6ca46b74ac6
|
|
| MD5 |
908a0b033c5a04291930ee804173f6ab
|
|
| BLAKE2b-256 |
f5186e2ae9a774b645191d1c3c667a7435cbae0ae0efb61c53cd506f77c03fd6
|
Provenance
The following attestation bundles were made for nodetool_core-0.7.1.tar.gz:
Publisher:
publish-wheel.yml on nodetool-ai/nodetool-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nodetool_core-0.7.1.tar.gz -
Subject digest:
a3757d8e65fe4d74fe8eb5430eed7d6c7df2502b61ac225438cdd6ca46b74ac6 - Sigstore transparency entry: 1734915919
- Sigstore integration time:
-
Permalink:
nodetool-ai/nodetool-core@d8359d5204bd4c8dc37d651ffb7cbe9c14393ebc -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/nodetool-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-wheel.yml@d8359d5204bd4c8dc37d651ffb7cbe9c14393ebc -
Trigger Event:
push
-
Statement type:
File details
Details for the file nodetool_core-0.7.1-py3-none-any.whl.
File metadata
- Download URL: nodetool_core-0.7.1-py3-none-any.whl
- Upload date:
- Size: 528.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
672746c61a15cae2eae87ca2b135a35699694f0381e86ed445e198b66b1f8409
|
|
| MD5 |
d96b6d118b9e50c1f7064691607b2688
|
|
| BLAKE2b-256 |
0a9b7792390f0218289836a3c3f4ed52ab97a882d5046986952099fa302ae77f
|
Provenance
The following attestation bundles were made for nodetool_core-0.7.1-py3-none-any.whl:
Publisher:
publish-wheel.yml on nodetool-ai/nodetool-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nodetool_core-0.7.1-py3-none-any.whl -
Subject digest:
672746c61a15cae2eae87ca2b135a35699694f0381e86ed445e198b66b1f8409 - Sigstore transparency entry: 1734916028
- Sigstore integration time:
-
Permalink:
nodetool-ai/nodetool-core@d8359d5204bd4c8dc37d651ffb7cbe9c14393ebc -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/nodetool-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-wheel.yml@d8359d5204bd4c8dc37d651ffb7cbe9c14393ebc -
Trigger Event:
push
-
Statement type: