Skip to content

maximka76667/fun_args

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Fun Args Package

Simple argument passing library inspired by Typer

from fun_args import argumentize

# Your main with explicitly defined parameters
def main(name: str, age: int = 25, smart = False):
    print(f"Hi, {name}")

# Don't forget to call my function
argumentize(main)

Now you in your terminal you can run: python filename.py --name Max --age 22

Supports both flagged and ordered parameters. E.g.

def main(a, b):
    print(a + b)

You could run in with python filename.py 2 7

And get 27, because by default everything's converted to strings

About

Tiny CLI argument parser inspired by Typer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages