chassis2024

a flexible chassis for assembling Python programs from parts


Keywords
chassis, framework, infrastructure
License
BSD-3-Clause
Install
pip install chassis2024==1.0.0

Documentation

Chassis 2024

Automatically sequence infrastructure initialization and teardown.

Installation

pip install chassis2024

Brief Explanation

The idea is to make it so that you quickly reuse infrastructure components.

"Infrastructure" here means things like:

  • writing a lock file for your program
  • reading config files
  • setting up a GUI system (like tkinter), and running a main loop
  • populating and processing argparse
  • reading a persistence file, and writing back to it when closing

I wanted to make it trivial to combine these infrastructure together.

The central challenge was making sure that everything runs in the right order.

Learn More

Learn By Example (Tutorial Material):

  • πŸ™† "Hello, world!" -- see a "Hello, world!" example
    • concepts: infrastructure, the CHASSIS2024_SPEC, interfaces
    • infrastructure: basicrun
  • πŸ™† "(Echo!)" -- an "Echo" service, that responds to the CLI
    • concepts: using interfaces, words
    • infrastructure: argparse
  • ⚠ ε·₯δΊ‹δΈ­ -- Echo with persistence -- an "Echo" service that remembers prior invocations
    • concepts: execution specs
    • infrastructure: basicjsonpersistence
  • πŸ™… ??? -- writing infrastructure: a pid file
    • concepts: the execution graph, execution nodes
    • infrastructure: (???)

Learn By Concepts (Reference Material):

  • πŸ™… -- Infrastructure Packages -- infrastructure packages are marked with a special identifier, CHASSIS2024_SPEC
  • πŸ™… -- Execution Nodes, Execution Graph -- the execution graph, the key ordering principle behind the system
  • πŸ™… -- Interfaces -- "interfaces," a way that infrastructure pieces can find one another
  • πŸ™… -- Execution Spec -- the optional execution spec, which can configure execution