Ryan HeM to Python [email protected] • 1 year agoClick is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the "Command Line Interface Creation Kit". It's highly configurablepalletsprojects.comexternal-linkmessage-square4fedilinkarrow-up16arrow-down10
arrow-up16arrow-down1external-linkClick is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the "Command Line Interface Creation Kit". It's highly configurablepalletsprojects.comRyan HeM to Python [email protected] • 1 year agomessage-square4fedilink
minus-square@lwuy9v5link2•edit-21 year ago Traitlets Click is a library to make a CLI - e.g. """echo.py""" @click.command() @click.arg("foo") def echo(foo): print(foo) if __main__: echo() python ./echo.py "Hello World" vs Traitlets looks like a (really cool) type validation library? Pydantic is similar
minus-square@[email protected]linkfedilinkEnglish1•edit-21 year agoTraitlets also supports subcommands, command line arguments, etc. At its heart though, it’s more of a configuration library. (I’m very much still a novice coder so definitely take that into account lol!) https://traitlets.readthedocs.io/en/stable/config.html#command-line-arguments
Click is a library to make a CLI - e.g.
"""echo.py""" @click.command() @click.arg("foo") def echo(foo): print(foo) if __main__: echo()
vs Traitlets looks like a (really cool) type validation library? Pydantic is similar
Traitlets also supports subcommands, command line arguments, etc. At its heart though, it’s more of a configuration library.
(I’m very much still a novice coder so definitely take that into account lol!)
https://traitlets.readthedocs.io/en/stable/config.html#command-line-arguments