Jonathan Bowman

Tags: pytest

Two Methods for Testing HTTPS API Calls with Python and pytest and Also Communicating with the in-Laws

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.

Command Line Tools in Python with Typer and pytest: Type Hints Are Useful

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.

Getting Started with HTTPX, Part 4: pytest-asyncio and pytest_httpx (Asynchronous Version)

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.

Getting Started with HTTPX, Part 2: pytest and pytest_httpx

In Part 1, we built a simple Wikipedia search tool using Python and HTTPX.

Build and Test a Command Line Interface with Poetry, Python's argparse, and pytest

The Python Standard Library’s own argparse package is the officially recommended way to construct a command line interface (CLI) in Python.

Build and Test a Command Line Interface with Python, Poetry, Click, and pytest

The Click package makes it easy to develop a pretty command line interface (CLI) for your Python project.

Build and Test a Command Line Interface with Poetry, Python Fire, and pytest

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”.