On this page
  1. expose-interface
  2. Role
  3. Install
  4. Quickstart
  5. When to Reach for It
  6. Gotchas & Pitfalls
  7. Pairs With
  8. Metadata

expose-interface

Prev: compose-application | Up: projects | Next: expose-api
Rel: wispsy, Frameworks, recipes
Ref: wispsy on GitHub
Tags: #public #wispsy #project #frameworks #tier/core


Role

Export ordinary Python functions and bound methods as command-line programs using only the standard library (Python 3.11+, zero runtime dependencies), with nested Interface mounts, Context injection, and sync/async invocation.

Install

python -m pip install expose-interface==0.1.0

Quickstart

from expose_interface import Interface, argument, flag, option

app = Interface("hello", description="Greeting programs.")

@app.program
@argument("name")
@option("--count", "-n", help="Number of greetings.")
@flag("--color", "-G", help="Enable color.")
def greet(name: str, *, count: int = 1, color: bool = False):
    for _ in range(count):
        print(f"Hello, {name}!")

main = app.main

When to Reach for It

Gotchas & Pitfalls

Pairs With


Metadata

type: project-card
slug: expose-interface
org: wispsy
repo: wispsy/expose-interface
package: expose-interface
version: 0.1.0
requires_python: ">=3.11"
layer: frameworks
topic: wispsy-framework
status: active
language: python
source_docs: README.md, docs/

Linked from

Related notes