Sitelet https://github.com/code-check/cli-template-python/tree/develop
Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.
 
 

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI App Template for Python

This is a template for creating CLI applications in Python.

You can build your console application in app/app.py

This template uses the argparse module. (For details see the official documentation.)

Recieving Inputs

In app.py is a function called main:

def main(args, options):

All input arguments are passed into args as an array.
If you want to use optional arguments, add them using argparse's parser.add_argument in cli.py

Outputting Results

Use the standard print() method to output results to stdout.

  print(result)

Installing External Libraries

If you want to use external libraries, do the following:

build:
  - pip install -r requirements.txt

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages