Have you checked the argparser module? I believe it is a native module that lets you do exactly that.