Jan 6, 2023
Flask and Asynchronous Tasks with Celery and Redis
When our Flask applications have long-running jobs, such as sending emails or making third-party API calls, we do not want to keep our users waiting for these tasks to finish. This traditional request-->response approach will not do. Instead, we should use a task queue to handle these tasks asynchronously. This post will walk you through setting up a Dockerized Flask application with Celery as our task queue manager, with a Redis server as the broker.
Aug 3, 2022
Dockerize Your Flask-MariaDB-Redis Application with Docker Compose
Chances are if you are building a Flask application you need more than just Flask. You might need a database of some sort, such as MariaDB and maybe even a cache such as Redis. Whatever the case may be, Dockerizing our app will help us ensure a consistent, isolated, easily-installable environment whether it be on a developer's machine all the way up to production. Let's jump into Dockerizing a Flask application using Docker Compose!
Jun 1, 2022
Formatting Your Python Code With Black Using Docker
Code formatting should be done by tools, not humans. Learn how to run Black via Docker and automatically format your Python code!
Jun 8, 2021
Intro to FastAPI - Create a Best Ball Projections API using FastAPI, SQLAlchemy and Pandas
Flask and Django have long been the go-to web frameworks for Python developers. However, FastAPI is a more modern, high performance web framework with support for both synchronous and and asynchronous data requests, and much more. Let's implement a (crude) Best Ball projections API using FastAPI with a little help from SQLAlchemy and Pandas.
Feb 15, 2021
Tracking DFS Results with Python using Plotly
Fantasy sports come in many different flavors, and daily fantasy sports is one of the flavors I enjoy playing. There are numerous paid tools available on the Internet for tracking your overall DFS performance. However, why use a paid tool when we can build our own DFS Return on Investment (ROI) tracking tool using Python and Plotly!
Jan 12, 2021
Building a RESTful API with Flask, Flask-RESTful, SQLAlchemy and pytest
Fantasy Sports offer all kinds of statistics and data to sort throuh. However, finding a free, reliable, easily accessible source for all of this data can be hard. Instead, let's implement our own Fantasy Football API using Flask, Flask-RESTful, Flask-SQLAlchemy and pytest!
Sep 21, 2020
Designing a RESTful Fantasy Football Stats API with Swagger and OpenAPI
Fantasy football statistics can be fun to look up, compare and contrast, and share with friends. It can also be fun designing a RESTful API for accessing all of this data using Swagger and the OpenAPI Specification.
Jul 5, 2020
Code Review Quick Wins
I came across Google's official Standards of Code Review documentation and was inspired to write down some thoughts regarding a few simple things I always look for when doing code reviews. The techniques covered in this post should all result in quick, easy wins for your code base if applied when conducting your own code reviews.
Jun 10, 2020
Loading Seasonal Football Stats Into Sqlite3 with Python
Scraping football statistics is fun, but what good are these statistics if they are not persisted for later use? Let's scrape some seasonal football stats, and store them in a relational database!
May 11, 2020
Scraping Football Stats with Python
I love stats, I love all sorts of games, and Fantasy Football is the perfect amalgamation of a game with statistics. Let's scrape the web for some of our favorite player's stats using Python, requests, and BeautifulSoup!
Feb 16, 2020
Hosting Your Jekyll Site on NearlyFreeSpeech.NET
This site uses Jekyll, a simple, blog-aware, static site generator written in Ruby. I use the very inexpensive hosting provider, NearlyFreeSpeech.NET. If you're looking for a similar setup hosted on NearlyFreeSpeech.NET then this post is for you!
Feb 9, 2020
Hello World!
Welcome to my new site's first post! Let's talk Python, reflect on game development, and learn together.