Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

andornaut/python-cli-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python CLI App

Project scaffolding to develop Command Line Interface (CLI) applications using Python.

Getting Started

Environment:

  • Operating system: Ubuntu 22.04
  • Python interpreter: Python 3.10
  1. Install python3 using Ansible and ansible-ctrl/roles/dev

  2. Install application and development dependencies into a virtualenv

    pipenv install --dev
  3. Activate the virtualenv

    pipenv shell
    python --version
    > Python 3.10.6
  4. Run a command

    # Run as a Python module
    python -m cliapp
    python -m cliapp hello --name andornaut
    
    # Run as a CLI application
    cliapp --version
    > cliapp v0.1.0

Dependencies

Name Description
black The uncompromising Python code formatter
pytest A framework that makes it easy to write small, readable tests
Typer Build great CLIs. Easy to code. Based on Python type hints.

Developing

See .vscode for VS Code integration files.

# Format Python files
black .

# Check code style
flake8

# Run tests
pytest

# Run only tests whose names contain "version"
pytest -k version

About

Project scaffolding to develop Command Line Interface (CLI) applications using Python

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages