News for hackers. Stuff that matters.
Re:The different uses of Python type hints by gaganyaan on Saturday April 15, 2023 @06:26PM (#35585223)
Type hints are great when using FastAPI. Your inputs are automatically validated, and you get a /docs endpoint that tells people what to expect from your API.

I'd say performance is far from the only reason to consider type hints.

Re:The different uses of Python type hints by maleldil on Saturday April 15, 2023 @06:44PM (#35585395)
Similarly for Typer, which is literally "the FastAPI of CLIs"[1]. Handy to type your `main` parameters and have CLI argument parsing. For more complicated cases, it's a wrapper around Click.

[1] https://typer.tiangolo.com/