Custom Observability: Building Events and Notifications for My Data Stack 🚀

Observability is one of those words that sounds impressive in meetings but gets downright intimidating when you sit down to implement it. Sure, logging failures and sending notifications sounds straightforward—until you’re knee-deep in designing custom tables, chasing down import errors, and trying to remember why you thought this was a good idea in the first place. But here’s the thing: observability isn’t just about logging and dashboards; it’s about creating a system where the data works for you, not the other way around. Alerts and notifications are the heart of this approach, delivering critical insights directly to you so you can act in real-time. When done right, observability transforms complexity into clarity and makes being data-driven not just possible, but practical. ...

December 3, 2024 · 6 min · 1126 words · Wes

Building a Weather Forecast API with FastAPI and PostgreSQL - Part 4 🐳

In the last article we talked about making our pydantic documentation as robust as possible. In this part, we’ll focus on containerizing the Weather Forecast API using Docker. By the end of this tutorial, your API will be running inside a Docker container, alongside a PostgreSQL database, all orchestrated using Docker Compose. Why Dockerize? 🛠️ Docker simplifies application deployment by packaging your application and its dependencies into a portable container. With Docker: ...

November 29, 2024 · 4 min · 654 words · Wes

Building a Weather Forecast API with FastAPI and PostgreSQL - Part 3 🤖

In the first two parts of this series (previous article), we laid the foundation for our weather forecast API and explored how to handle forecasts and historical revisions efficiently. In this part, we’ll focus on optimizing our Pydantic models to make the API documentation more accessible to AI tools, such as those that scrape OpenAPI specs for training or dynamic usage. The Problem 🧠 While your API might work perfectly for humans, AI tools often need more context and structure to understand it effectively. For example: ...

November 28, 2024 · 5 min · 867 words · Wes

Building a Weather Forecast API with FastAPI and PostgreSQL - Part 2 🌪️

In the first part of this series, we set up a FastAPI application with a PostgreSQL database to store weather forecasts. We also designed a robust schema that tracks changes over time using a composite primary key. If you missed it, check out Part 1. In this post, we’ll: Create query endpoints to fetch forecasts. Implement a type-2 SCD approach for tracking forecast revisions. Discuss strategies for filtering and pagination. The Challenge 🧠 Weather forecasts often change over time as meteorological data improves. To support historical analysis and ensure data consistency, we need to: ...

November 27, 2024 · 4 min · 710 words · Wes

Building a Weather Forecast API with FastAPI and PostgreSQL - Part 1 🌦️

When I set out to create a weather forecast API, I wanted something scalable, efficient, and built on modern technology. What started as a simple project to integrate weather data from the weather.gov API quickly grew into a complex, yet rewarding system. To keep things manageable, I decided to break this journey into multiple parts. In this post, I’ll cover the foundational steps to get started: setting up FastAPI, creating the database, and handling weather data with a robust schema. ...

November 26, 2024 · 4 min · 811 words · Wes