Skip to main content

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.method addressing
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thoughtframe_python-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thoughtframe_python-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

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

Hashes for thoughtframe_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4cabc603cc8680c59be132792ed1b2f52253cdba10ecfec0d5e71feb415157b2
MD5 6084d7bc79b080705ad700eb6e65e23d
BLAKE2b-256 df6d2414d2cc251830731afd87c4c97911995c89a1d94e67ef6a801888b00ae7

See more details on using hashes here.

File details

Details for the file thoughtframe_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thoughtframe_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d39de5e5523a03c67044ea8e46c5f17f6550c46733ab8d11c5e65487cc6d841a
MD5 ed5670dbc0e7d19dabcc4ce80f04eedd
BLAKE2b-256 61bb57d6d8cb759be76dbaea0b76245911871b6d7a820cd03b1748942c0f47f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page