This is my personal little nerd cave. I like to share some of the cool stuff I work on via my blog. I hope you find something useful here!

Configuring FastAPI for use with PowerBI when using Entra ID for OAuth2.
Introduction FastAPI is a framework for building APIs with Python based on standard Python type hints. It’s fast and easy to stand up, and as a Python developer, it was relatively easy to pick up and get started with it. As part of deploying a FastAPI instance in production, I integrated FastAPI with Entra ID for OAuth2 via this really cool library, FastAPI-Azure-Auth. After integrating this library into my FastAPI instance, I was able to secure access to the API server. However, I quickly ran into an interesting problem. While trying to connect a PowerBI instance to the API, I found that the API settings needed some more configuration to enable interactive logging in via Microsoft SSO within PowerBI. ...
Private Intranet SSL certificate generation using DNS-01 challenges.
Introduction When deploying internal services/tools on a private intranet, these services are usually hosted on servers that do not have a public IP address interface enabled, and only have a private IP address that only accepts connections through a firewall/IP whitelist. This approach ensures that these tools are only accessible internally, and are not public facing. An approach like this, however, has a few caveats to be aware of. If you want to make requests to these services hosted on private servers, there are two options. ...

PostgreSQL Entity type Version Control with Alembic Utils.
Introduction PostgreSQL (and other RDBMS) have entity types such as functions, views, materialized views, triggers, and policies. These entity types do a lot of useful work, and a well designed database will use them heavily. These entity types are not typically considered part of the SQLAlchemy ORM, and by extension, the data model itself. By default, Alembic has no functionality to detect the creation of new entity types when it autogenerates migration files. The default Alembic ORM also has no functionality to define these entity types with classes. ...

Data Model Version Control with Alembic.
Introduction As the scope of a data model (and by extension, its downstream APIs) changes, it will need to be updated and expanded to account for this new scope. When changes are made to a data model, especially to a model that is split across development and production environments, schema drift becomes a constant problem that looms in the background. Typical coding workflows are managed by version control as an industry standard. Database schemas, however, are typically not submitted to a version control system. As different team members collaborate on a data model split across different environments, the possibility of schema drift gradually grows in an environment where the data model is not tracked in a central repository. ...

Relational Data Model design with SQLAlchemy.
Introduction Data Modeling Data modeling is the process of creating a representation of data that defines the way it is structured and used in complex systems. When it comes to relational databases, designing a normalized data model is essential for efficient database operation, and to make your data consistent and clean. With a fully normalized data model, data in your relational database becomes: Understandable A good data model can decompose the complexity of real-world systems and the data they generate into a relational model that is easy to read and comprehend, and standardizes the relationship of one data domain with every other data domain. ...