Here's how to build your codecheck challenge solution as a CLI application.
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 = argAll 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
Use the standard print() method to output results to stdout.
print(result)If you want to use external libraries, do the following:
- Write the library name and version in requirements.txt
- Add the following to codecheck.yml:
build:
- pip3 install -r requirements.txt