The other day I wanted to demo the Google Books API (we use for Pybites Books) to somebody so I started to write some code on the fly to call its endpoints using httpx. Then I thought it would be nice to turn it into a small script to search for books and view details […]
Topic Archive
Modules
-
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, […]
-
Don’t waste you time in early optimization, stay focused on the product! Have you ever had a brilliant idea but hesitated to invest time and resources into building a full-fledged product? The fear of wasting resources on an untested concept is a common struggle for entrepreneurs and innovators. Fortunately, there’s a game-changer in the world […]
-
6 Cool Things You Can Do With The Functools Module
·
·
5 min readIn this article let’s look at the functools Standard Library module and 6 cool things you can do with it (be warned, a lot of decorators are coming your way! 😍) … 1. Cache (“memoize”) things You can use the @cache decorator (formerly called @lru_cache) as a “simple lightweight unbounded function cache”. The classic example is […]
-
5 tips to learn any new Python library faster
·
·
4 min readThis was a Pybites email first. To always get the latest and greatest content, subscribe here. Lately I have been learning some new libraries for weekly PDM Code Clinic demo sessions (e.g. PyScript, Flet, PySimpleGUI, Playwright, htmx, Redis, Leaflet, etc.) There is a general approach I take that makes this less painful and more fun. […]
-
In our TIL Slack channel AJ shared a cool new find: Today I learned about sys.stdlib_module_names: a frozenset of strings containing the names of standard library modules. … AJ on the Pybites Slack – TIL (today-I-learned) channel So I thought to give it a little test drive, specifically checking for modules that were added and […]
-
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 […]
-
Learning Rich by making a color searcher command line app
·
·
7 min readThe other day I wanted to get serious with the awesome Rich library. As we always say: you have to build to really learn + need ideas? Scratch your own itch. If you’re struggling for ideas, see what takes you long and/or is cumbersome and see if it’s a good candidate to automate it with […]
-
Automating the Boring Stuff and Plotting Student Data
·
·
12 min readMy name is Russell Helmstedter. I am a middle school math and computer science teacher at De Anza Academy of Technology & the Arts (DATA). My first exposure to Python was in March of 2020. For some reason, I was stuck at home and couldn’t go out and do things. I decided to learn how […]
-
How to make a nice graph using Django and Chart.js
·
·
7 min readIn this article I will show you how to make a beautiful yet simple graph using Django + Chart.js. The code for this project is here. Getting the data We are going to plot the number of Bite exercises that get completed per month on our platform. For this I exported the live data from […]