How to get argument from Command line for my python package

20 views Asked by At

So, i am building this python project let's name this as XYZ for now.

Now, regular behaviour of a python package is:

  1. you install the package from pip
  2. you import the package
  3. you use the contents of the package

But, what i want is that apart from above behaviour, i want to give argument directly to commmand line as a input to some function (after installing the package obviously), so that it can also be used in commandline.

For eg. it can be look like this

XYZ "argument" (--can be flags here)

What i thinking is, maybe i have to use environment variable to do this so i can set path to my package. Idk, but help me with this or some suggestions would be great! :)

0

There are 0 answers