Ben·Sep 13, 2023Asynchronously stream response data to disc using PythonUsing the HTTPX and aiofiles libraries, a request can be made, and the response can be streamed asynchronously to disk using the following…
Ben·Jul 28, 2023Best way to make Async Requests with FastAPI… the HTTPX Request Client & Tenacity!It's very common to need to make requests from your API to other APIs. For years, Python developers heavily favored the Requests HTTP…A response icon3A response icon3
Ben·Jul 17, 2023Load testing REST APIs with Python using LocustLocust An open-source load testing tool. It essentially allows you to send x amount of requests to your endpoints and will report back on…
Ben·Jul 12, 2023Integrating Sentry Application Performance Monitor into FastAPI Python Web FrameworkSentry is an excellent third-party service to track errors and monitor performance. Sentry also includes a free tier, which I find provides…
Ben·Jul 11, 2023My Software Development Setup as a Python EngineerI’ve used a range of different computers and software over the years, here is my shortlist.A response icon1A response icon1
Ben·Jul 1, 2023Create a Mock SQL DB in Python from CSV for unit testingSometimes having a mock database for unit testing can be very useful, especially in database-driven applications. A simple relational…
Ben·Jul 1, 2023Asynchronous Postgres with Python, FastAPI, and Psycopg 3Use advanced features of the Psycopg 3 library such as asynchronous operations and connection pooling to achieve high availability and fast…A response icon1A response icon1