Sitelet https://github.com/code-check/cli-template-python/tree/refactor_readme
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 Applications with Python

Here's how to build your codecheck challenge solution as a CLI application.

Requirements

  • Python2 (For the version see our docs .)
  • The standard library's argparse module

Recieve Inputs

In app/app.py is a function called main. Build your console application there.

def main(args, options):
  for arg in args:
    # Replace below line with your code.
    result = arg

All stdin 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

Output Results

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

  print(result)

Install 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