Hi there! I'm happy to announce version 3.26 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.24 . Feed autodiscovery # reader now discovers feeds automatically – instead of searching for feed links, just add the website URL, and the web app will suggest any feeds it finds. Behind the scenes, this is enabled by the autodiscover plugin, which stores…
This is the last part of a series covering core DynamoDB philosophy, concepts and patterns; the goal is to help you understand idiomatic usage and trade-offs in under an hour. Today, we're looking at data modeling patterns – how to manage the complexity that arises from DynamoDB being as low level as it is.
Hi there! I'm happy to announce version 3.24 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.23 . Context-sensitive help # In lieu of a tutorial mode, the web app now offers guidance to new users, and has a basic context-sensitive help system. Here's some screenshots: new user / empty state context-sensitive help also help Structured logging # reader…
Hi there! I'm happy to announce version 3.23 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.22 . OPML support # reader can finally import and export feeds as OPML subscription lists! I initially wanted to use listparser , but I ended writing my own reader.opml module, mainly to keep dependencies down; it's just ~100 lines of code, including the…
Even if you haven't heard of Raymond Hettinger, you've definitely used his work, bangers such as sorted(), collections, and many others. His talks had a huge impact on my development as a software engineer, are some of the best I've heard, and are the reason *you should not be afraid of inheritance* anymore.
Hi there! I'm happy to announce version 3.22 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.20 . New feed reader web app # The new web application is done! Features include: add / list / filter / delete feeds list / filter articles mark articles as read / (un)important article view custom feed titles dark mode In the next releases, I'll be adding…
This is part two of a series covering core DynamoDB philosophy, concepts and patterns; the goal is to help you understand idiomatic usage and trade-offs in under an hour. Today, we're looking at the DynamoDB data model – what the main abstractions are, what you can do with them, and how they scale.
This is part one of a series covering core DynamoDB philosophy, concepts and patterns; the goal is to help you understand idiomatic usage and trade-offs in under an hour. Today, we're looking at what DynamoDB is and why it is that way.
Hi there! I'm happy to announce version 3.20 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.16 . Web app re-design # Earlier this year, I started a web app re-design based on htmx and Bootstrap . I only had time for the main page, but it turned out pretty nice, and I've been using it ever since. What is new is that I now have free time and some…
Last time, we built a hybrid concurrent.futures executor using inheritance. Today, we're building it again (twice!) using composition and functions only, to figure out which way is better and why. Consider this a worked example.
...in which we build a hybrid concurrent.futures executor that runs I/O bound tasks on all available CPUs, thus evading the limitations imposed by the dreaded global interpreter lock on the humble ThreadPoolExecutor.
Hi there! I'm happy to announce version 3.16 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.15 . Archived feed # It is now possible to archive selected entries to a special "archived" feed, so they can be preserved once the original feed is deleted; this is similar to the Tiny Tiny RSS feature of the same name (which is where I got the idea in the…
Hi there! I'm happy to announce version 3.15 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.13 . Retry-After # Now that it supports scheduled updates , reader can honor the Retry-After HTTP header sent with 429 Too Many Requests or 503 Service Unavailable responses. Adding this required an extensive rework of the parser internal API , but I'd say it…
Hi there! I'm happy to announce version 3.13 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.12 . Scheduled updates # reader now allows updating feeds at different rates via scheduled updates . The way it works is quite simple: each feed has an update interval that determines when the feed should be updated next; calling update_feeds(scheduled=True)…
Hi there! I'm happy to announce version 3.12 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.10 . Split the search index into a separate database # The full-text search index can get almost as large as the actual data, so I've split it into a separate, attached database, which allows backing up only the main database. (I stole this idea from One…
Today we're implementing a least recently used cache with priorities and expiry, using only the Python standard library. This is a bIG TEch CoDINg InTerVIEW problem, so we'll work hard to stay away from the correct™ data structures, but we'll end up with a decent solution anyway!
Hi there! I'm happy to announce version 3.10 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.9 . Storage internal API # The storage internal API is now documented! This is important because it opens up reader to using other databases than SQLite. The protocols are mostly stable, but some changes are still expected. The long term goal is full…
Having trouble figuring out when to use classes? In this article, we look at another heuristic for using classes in Python, with examples from real-world code, and some things to keep in mind.
Hi there! I'm happy to announce version 3.9 of reader , a Python feed reader library. What's new? # Here are the highlights since reader 3.7 . Better handling of unexpected update errors # Unexpected exceptions raised by update hooks , retrievers , and parsers are now wrapped in UpdateError, so errors for one feed don't prevent others from being updated . Also, hooks that run after a feed is…
So, you're doing some sync stuff. But you also need to do some async stuff, without making *everything* async. Hint: asyncio.Runner will get you at least part of the way there.
Hi there! I'm happy to announce version 3.7 of reader , a Python feed reader library. More importantly, reader has reached 300 stars on GitHub! What's new? # Here are the highlights since reader 3.4 . Contributor documentation # reader now has contributor documentation ! If you want to help or you're just curious where it's all going, check out the roadmap and the reader philosophy . Thank you to…
Do you feel you're fighting your tools? Do you feel you're relying too much on autocomplete and inline documentation? tl;dr: Most good documentation won't show up in your IDE – rather, it is about how to use the library, and the problem the library is solving.
Java is notoriously verbose, especially when used in a serious Enterprise Project™ ...so naturally, I made linesieve, a Python text munging tool to split output into sections and match/sub/split with the full power of Python's re module.
So, you're doing some async stuff, repeatedly, hundreds of thousands of times. How do you *not* do it all at once? Hint: asyncio.Semaphore is not always the best way, despite what Stack Overflow may tell you ;)
... in which you'll find out what "while constructing a mapping found unhashable key" PyYAML errors mean, why do they happen, and what you can do about it.
... in which you'll learn how to cache a lot of methods in Python, even for objects created by someone else. Did you know that, contrary to popular belief, Python programmers can have a little monkey patching as a treat?
Hi there! I'm happy to announce version 3.0 of reader , a Python feed reader library. This release removes a number of deprecated methods and attributes, for a cleaner, more consistent API. See the changelog for details. Contents 2.x recap Unified tag API + entry and global tags Search enabled by default Statistics User-added entries Twitter support Read time Improved duplicate handling Memory…
Hi there! I'm happy to announce version 2.14 of reader , a Python feed reader library. What's new? # Here are the most important changes since reader 2.11 ! Twitter support # You can now use reader to follow Twitter accounts . You still need a Twitter account to get a bearer token, but after that, https://twitter.com/user works like any other feed. Each thread corresponds to an entry. Threads are…
Hi there! I'm happy to announce version 2.11 of reader , a Python feed reader library. What's new? # Quite a lot happened since reader 2.5 ! Unified tag API + entry and global tags # Tags and metadata are now the same thing, generic resource tags : >>> reader . get_tag ( feed , 'one' , 'default' ) 'default' >>> reader . set_tag ( feed , 'one' , 'value' ) >>> reader . get_tag ( feed , 'one' )…
... in which you'll find out what "could not determine a constructor for the tag" PyYAML errors mean, why do they happen, and what you can do about it.
Hi there! I'm happy to announce version 2.5 of reader , a Python feed reader library. What's new? # Here are the most important changes since reader 2.0 . Search enabled by default # Full-text search works out of the box: no extra dependencies, no setup needed. Statistics # There are now statistics on feed and user activity, to give you a better understanding of how you consume content. First, you…
This is the fourth article in a series about writing my own SQL query builder. Today, we'll rewrite it from scratch, explore API design, learn when to be lazy, and look at worse and better ways of doing things – all in 150 lines of Python!
namedtuple has been around since forever, and over time, its convenience saw it used far outside its originally intended purpose. With dataclasses now covering part of those use cases, what should one use named tuples for? In this article, I address this question, and give a few examples from real code.
Hi there! I'm happy to announce version 2.0 of reader , a Python feed reader library. This release brings you a cleaner API, more consistently named methods and attributes, timezone-aware datetimes, and safer defaults. See the changelog for details. What is reader? # reader takes care of the core functionality required by a feed reader, so you can focus on what makes yours different. reader allows…
This is the third article in a series about writing an SQL query builder in 150 lines of Python. Here, I talk about why I decided to write my own, the alternatives I considered, why I didn't use an existing library, and how I knew it wouldn't become a maintenance burden.
In this article, we look at a few real-world examples where functions taking the same arguments don't necessarily make a class, as counter-examples to a heuristic for using classes in Python.
PEP 661 proposes adding a utility for defining sentinel values in the Python standard library. In this article, you'll get a PEP 661 summary, learn what sentinel objects are (with real-world examples), how to use them with type hints, and a bit about why PEPs exist in the first place.
This is the second article in a series about writing an SQL query builder in 150 lines of Python, why I wrote it, how I thought about it, and the decisions I had to make. In this article, I talk about why I needed a query builder in the first place, with examples derived from real use cases I had for my feed reader library.
In this series, we examine an SQL query builder I wrote in 150 lines of Python, why I wrote it, how I thought about it, and the decisions I had to make. This article is a sneak peek of the series and the code.
In this article, you'll find out what Python hashlib "object supporting the buffer API required" TypeErrors mean, why do they happen, and what you can do about it.
On your Python learning journey, you may have heard that a great way to get better is to read code written by other people. That's true, but finding good code to study is not easy, mostly because the design philosophy and the reasoning behind the code are rarely documented. The Python standard library is special in this regard: not only is the code open source, but the discussions around the…
... in which we talk about the many ways of using Python dataclasses without type annotations (or even variable annotations!), and what this says about Python.