今回は、手軽なコマンドラインツール(CLI)を作るために、Pythonライブラリの「Typer」を使ってみよう。TyperはPythonでコマンドラインツールを簡単に作るための専用ライブラリだ。特徴は、Pythonの型ヒントを使って、コマンドの引数やオプションを自然に定義 ...
It seems as though more and more of the simple command-line tools and small scripts that used to be bash or small c programs are slowly turning into python programs. Of course, we will just have to ...
「Typer」とは、Pythonでコマンドラインツール(CLIツール)を簡単に作成するためのライブラリだ。PythonでWeb APIを開発するフレームワークとして有名な「FastAPI」の作者が開発している。Typerを使うと、関数を定義するだけで、Pythonの関数定義を解析して、自動 ...