Skip to main content

Tiny CLI argument parser inspired by Typer

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fun_args-0.0.3.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fun_args-0.0.3-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file fun_args-0.0.3.tar.gz.

File metadata

  • Download URL: fun_args-0.0.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for fun_args-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1c16f579fa6b578a7f6ac80ecc4df4bc03e2e40fbbd73a12f1be1eb55efb5907
MD5 63f19f50cd47d5c65943223a9578c45c
BLAKE2b-256 0a2a702cc6c8d67ce6e43cbf57de964c4b10edc574fb744cda24c588a1de6c34

See more details on using hashes here.

File details

Details for the file fun_args-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: fun_args-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for fun_args-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee5bf79a0aeb3e3400f553c1649640934ba3bbd4521e1106e0a8b3e60d8b165
MD5 64e3fc3ad0b00f67a3ba6a73ef39adfb
BLAKE2b-256 574b647c066857158ae32f10781e48bc4a162fc560066695967be758e8510142

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page