Skip to content

Instantly share code, notes, and snippets.

@thibaud-opal
thibaud-opal / console.py
Last active November 26, 2022 11:47
Using typer with classes as commands
#!/usr/bin/env python3
from my_commands import PrintCommand
from my_lib import PrinterDriver
import os
import typer
app = typer.Typer()
myPrinter = PrinterDriver()
commands = {