Howdy everyone, In this article, we will be building a CLI application with Typer and Python. we will build a to-do application with CRUD(Create Read

Build Your First CLI Application With Typer

submited by
Style Pass
2022-01-15 09:30:03

Howdy everyone, In this article, we will be building a CLI application with Typer and Python. we will build a to-do application with CRUD(Create Read Update Delete) functionality.

Typer is a python library for building CLI applications with python and type hints. it provides a lot of features and some of them are

Virtual environment is an isolated environment that keeps your dependencies isolated so your global environment does not affect it.

We will be using venv to create a virtual environment. venv is a python module for creating lightweight "virtual environments".

Now our basic project structure is ready, we can move forward and create our todo package which will contain our to-do CLI business logic.

Python has a straightforward packaging system. you have to create the __init__.py file inside the folder and python will treat that folder as a package.

Here we are adding __app_name__ and __version__ for our todo package. also, we are adding an ERRORS dictionary with error codes like SUCCESS, ID_ERROR, etc.

Leave a Comment