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.2.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.2-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fun_args-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 57d61bb88968e3e7da16015a502c4c221d6db8a86329facd13c520481d9efa25
MD5 27d48bdffcca8a4c89f887448fc5f943
BLAKE2b-256 15ab051c633e41c95dfdfe29c1855e631a63ee880e4aabe25327ed822cb35b54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fun_args-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6daab5bb5006f2eec1f080be38a794989d07ef76a800d971031bafc7c84d64a
MD5 a0b58c64552d2aa5689a0dd0836bbb5a
BLAKE2b-256 f28dc3f869091a89fac59dc32339b0a2bcf4fb13db2e410a7d0eecaccf237f71

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