First Check
Commit to Help
Example Code
import typer
def main(name: bytes):
typer.echo(name)
if __name__ == '__main__':
typer.run(main)
Description
It would be nice if we could add support for bytes in order to use it in contexts where bytes are expected (e.g. base64 encode/decode, password hashing, etc.)
Wanted Solution
Support for bytes type. Currently typer says:
RuntimeError: Type not yet supported: <class 'bytes'>
Wanted Code
import typer
def main(name: bytes):
typer.echo(name)
if __name__ == '__main__':
typer.run(main)
Alternatives
Always use encode/decode methods.
Operating System
macOS
Operating System Details
No response
Typer Version
0.7.0
Python Version
3.11.1
Additional Context
No response
First Check
Commit to Help
Example Code
Description
It would be nice if we could add support for bytes in order to use it in contexts where bytes are expected (e.g. base64 encode/decode, password hashing, etc.)
Wanted Solution
Support for bytes type. Currently
typersays:RuntimeError: Type not yet supported: <class 'bytes'>Wanted Code
Alternatives
Always use encode/decode methods.
Operating System
macOS
Operating System Details
No response
Typer Version
0.7.0
Python Version
3.11.1
Additional Context
No response