Tags: pytest
API endpoints and web URLs are, thankfully, more secure than ever, usually requiring encrypted HTTPS. Python works well as an HTTPS client, and pytest simplifies testing Python-based tools or libraries. Tools like VCR.py or the combination of pytest-httpserver and trustme provide an additional testing layer that is fast and convenient, and well-suited for HTTPS work. This will help with family gatherings. Let me show you.
With Typer, you can write command line tools in Python, intuitively and easily. At the same time, Typer is flexible enough to handle the complexity thrown at it.
In Part 2, we explored how to write tests and mocks using pytest and pytest_httpx for the synchronous version of the client, which was built in Part 1.
In Part 1, we built a simple Wikipedia search tool using Python and HTTPX.
The Python Standard Library’s own argparse package is the officially recommended way to construct a command line interface (CLI) in Python.
The Click package makes it easy to develop a pretty command line interface (CLI) for your Python project.
The Python Fire package provides a way to develop a command line interface (CLI) in Python, automatically, with very minimal extra code. The package comes from Google but is “not an official Google product”.