Introducing FastAPI Httpbin

Douglas Muth
2 min readJan 29, 2023

--

It even has a logo!

I write a lot of back end code and sometimes have to make use of HTTP endpoints. Sometimes I want to test those endpoints. I used to use httpbin.org for my endpoint testing, but over time noticed that some of the endpoints were returning HTTP 5xx errors. Some investigation reveals that the project seems to be abandoned, with open issues going all the way back to 2017. That’s not so good.

So I decided to build my own.

In this post I’d like to talk about FastAPI Httpbin. But before I can, I need to talk about FastAPI itself. FastAPI is a framework for building high-performance frameworks in Python based on Python type hints. The really neat thing about FastAPI is that your function definition for each endpoint is the source of truth — FastAPI handles argument validation for any calls to that endpoint, and generates the appropriate Swagger documentation for that endpoint.

I then went about building my own version of Httpbin, which I call FastAPI Httpbin. The source can be found here.

That’s about all I have for now, but I am actively developing this app, and I am open to any feature requests, bug fixes, or suggestions!

Original blog post.

--

--

Douglas Muth
Douglas Muth

Written by Douglas Muth

Engineer. AWS, CyberSec, DMARC, Docker, Splunk, White Mage. Staffs way too many cons. he/him. 28% Cheetah.

No responses yet