SQLModel is a library that lets you interact with databases through Python code with Python objects and type annotations instead of writing direct SQL queries. Created by the same author of the extremely popular framework FastAPI, it aims to make interacting with SQL DBs in Python easier and elegant, with data validation and IDE support, without the need to learn SQL. It’s an ORM (Object-Relational Mapper), meaning: it translates between classes/objects and SQL. In this article, I will cover why you would use SQLModel over plain SQL queries, what benefits it brings to the table and the basics of using…
Topic Archive
Data
-
-
A Practical Example of the Pipeline Pattern in Python
·
·
5 min readWhat is this pattern about? The Pipeline design pattern (also known as Chain of Command pattern) is a flexible way to handle a sequence of actions, where each handler in the chain processes the input data and passes it to the next handler. This pattern is commonly used in scenarios involving data processing, web scraping, or middleware systems. In this blog post, I’ll walk you through a specific example that leverages Python’s powerful functools.reduce and partial functions, along with the BeautifulSoup library for parsing HTML content. This code showcases the Pipeline pattern applied to HTML table extraction and processing. What…
-
Using Python in Excel with PyXLL
·
·
1 min readIn this podcast episode we talk with Tony Roberts, creator of PyXLL (pronounced “pixel”). Listen here: Also released on our YouTube channel: We dive into the backstory of this Python Excel Add-in, why he built it, features, success stories, the business side of things, and also how it compares to Microsoft’s recently announced Python in Excel integration. And of course as always there are wins + books 🎉 Get ready for the fascinating world of Python + Excel integration … Chapters:00:00 Intro snippet and music00:44 Guest intro and background02:40 Wins of the week05:06 PyXLL backstory08:50 Market validation10:44 Main features and…
-
This week Robin Beer – one of our coaches – interviews Will Raphaelson, Principal Product Manager at Prefect. 😍 They talk about his use of Python, Prefect as a tool and its philosophy, open source + business and Marvin AI. 🐍 💪 And of course they share cool wins and books they are reading. 💡 All in all an insightful chat that hopefully will leave you inspired to go check out these cool new Python tools … 😎 Listen here: Or watch on YouTube: Chapters:00:00 Intro snippet00:11 Intro music00:31 Introduction guests + topics01:32 Welcome Will, do you have a win…
-
Making plots in your terminal with plotext
·
·
2 min readIn this blog post a quick script to plot the frequency of our blog articles in the terminal. It’s good to see that we’re getting back on track 🙂 The code gist is here. First we import the libraries we are going to use. As always we separate Standard Library modules from 3rd party ones as per PEP8: Then I define some constants: I defined a year month generator. Why? Because some months we have not posted, yet I still want to show them on the graph. Then the wokhorse function that calculates the amount of posts per month. We…
-
Data engineering involves more Python than you might think!
·
·
1 min readListen here: This week we have Christo back on the show to talk about his experience in the data engineering field. He shares some valuable tips how to become a more effective data engineer which, surprisingly or not, increasingly requires a well-rounded Python developer skill set. Enjoy and feel free to reach out to Christo below … Christo’s website: https://www.christoolivier.com Christo is a PDM coach now, check it out: https://pybit.es/catalogue/the-pdm-program/Previous episode Christo was on:https://www.pybitespodcast.com/1501156/8005574-013-the-mindset-of-a-developerHe is also in our Slack community:http://pybit.es/community/
-
Case study: How to parse nested JSON
·
·
10 min readI was asked to help parse a JSON file that is delivered by the iTunes Store Customer Reviews API JSON endpoint. It is not so important how this API works or if there are better APIs for this. Instead, let’s assume that we found our favorite API to work with and that our request makes perfect sense and now we have to deal with the API’s response, JSON in this case. This article will guide you through the necessary steps to parse this JSON response into a pandas DataFrame. I will focus heavily on the concepts and code development and…
-
Analyzing covid-19 data with pandas and matplotlib
·
·
10 min readOne moment I was solving a pandas challenge, next I was analyzing real world covid-19 data with python…