D
D
denislysenko2021-09-27 17:51:58
Python
denislysenko, 2021-09-27 17:51:58

How to write a command line utility?

You need to write a converter.py console utility that supports command line arguments.

python convert.py [--csv2parquet | --parquet2csv <src-filename> <dst-filename>] | [--get-schema <filename>] | [--help]


I can write a python file where all this will be executed, but how to make a command line utility out of this file?
That is, I know python and the pandas library, but how to write a console utility?
What are the steps I need to take to complete this task?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-09-27
@dmtrrr

https://docs.python.org/3/library/argparse.html

V
Vadim Shatalov, 2021-09-27
@netpastor

https://click.palletsprojects.com/en/8.0.x/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question