Reference Python runtime for ThoughtFrame
Project description
ThoughtFrame Python Runtime
This repository provides the reference Python runtime for ThoughtFrame.
It defines the execution model, routing semantics, and transport adapters used to integrate Python modules into a ThoughtFrame system.
This package is not an application and does not run on its own. It is intended to be embedded, configured, and launched by a host system.
Purpose
ThoughtFrame supports multiple execution environments. This project defines the canonical Python-side runtime so that Python code can participate in a ThoughtFrame mesh in a predictable, disciplined way.
It exists to make it easy to build Python modules that:
- expose commands to ThoughtFrame
- receive structured requests
- return structured responses
- run synchronously or asynchronously
- communicate over standard transports
What This Provides
- A strict command routing protocol (
module.method) - Deterministic module resolution and dispatch
- A minimal dependency-injected runtime catalog
- Reference transport implementations:
- WebSocket-based command loop
- HTTP dispatch endpoint
- A Python module contract (
BaseFrameModule)
All transports delegate to the same routing and execution semantics.
What This Does Not Provide
- No application logic
- No domain-specific behavior
- No task scheduling
- No plugin discovery system
- No automatic startup or background processes
All lifecycle control is explicit and owned by the host system.
Core Concepts
ModuleManager
A deterministic service registry used to construct and resolve runtime components.
SystemCatalog
A stable access surface for runtime services such as routing, transport, and configuration utilities.
BaseFrameRouter
Enforces protocol correctness at runtime:
module.methodaddressing- exactly one request argument
- synchronous or asynchronous handlers
- strict resolution and validation
FrameConnection
A reference WebSocket transport implementing handshake, keepalive, and dispatch semantics.
BaseWebServer
A reference HTTP transport that delegates all execution to the router.
BaseFrameModule
The abstract base class for Python ThoughtFrame modules.
Execution Model
- Nothing executes on import
- All wiring happens during explicit configuration
- All runtime behavior is opt-in
- The host system controls startup, shutdown, and lifecycle
This makes the runtime safe to embed and easy to reason about.
Intended Usage
This package is designed to be depended on by:
- Python modules that expose functionality to ThoughtFrame
- Host systems that embed Python as an execution node
- Integration layers that need a stable Python runtime surface
Higher-level functionality belongs in separate packages.
Stability and Versioning
Public interfaces and protocol semantics are treated as API.
Breaking changes will require a major version bump. Non-breaking additions will be versioned conservatively.
License
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 thoughtframe_python-0.1.0.tar.gz.
File metadata
- Download URL: thoughtframe_python-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cabc603cc8680c59be132792ed1b2f52253cdba10ecfec0d5e71feb415157b2
|
|
| MD5 |
6084d7bc79b080705ad700eb6e65e23d
|
|
| BLAKE2b-256 |
df6d2414d2cc251830731afd87c4c97911995c89a1d94e67ef6a801888b00ae7
|
File details
Details for the file thoughtframe_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: thoughtframe_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39de5e5523a03c67044ea8e46c5f17f6550c46733ab8d11c5e65487cc6d841a
|
|
| MD5 |
ed5670dbc0e7d19dabcc4ce80f04eedd
|
|
| BLAKE2b-256 |
61bb57d6d8cb759be76dbaea0b76245911871b6d7a820cd03b1748942c0f47f3
|