programming

IPython embed and autoreload

published on

IPython makes for very productive and effortless sessions working interactively with Python. From the numerous extensions for IPython, autoreload is one I use often. It’s very useful for working with existing code and being able to edit code from my code editor and have changes reflected automatically within the IPython terminal.

Read More...

The story of udemy-dl

published on
The recent takedown of the youtube-dl project resurfaced memories of a similar project, udemy-dl, that I worked on years ago. I also had to abandon the project due to a DMCA notice. In light of what happened to youtube-dl this felt like the right time to write about it. Beginnings Back in 2013 when I was starting off as a software consultant, I landed a project to build a desktop GUI application. Read More...

Adapting types to fix SQLAlchemy's "can't adapt type" error

published on
I have recently been using Pydantic a lot, which is pretty cool since it lets me specify concrete types on my previously untyped data. Until I ran into an error when I was inserting data stored in a Pydantic model to my postgres database using SQLAlchemy. Problem I have a Pydantic model like this to define my incoming data from a request: # Pydantic class class EventSchema(BaseModel): ip_address: IPvAnyAddress Another part in my code defined an SQLAlchemy model to persist this incoming information (along with other data not shown here): Read More...