Planet Python RSS
217 subscribers
16.7K links
Unofficial Planet Python RSS feed from planetpython.org. Maintained by @cfinnberg
Download Telegram
Daniel Roy Greenfeld: Using locust for load testing

Link: https://daniel.feldroy.com/posts/2024-11-using-locust-for-load-testing

Locust is a Python library that makes it relatively straightforward to write Python tests. This heavily commented code example explains each section of code. To use locust:

Install locust: pip instal
Daniel Roy Greenfeld: TIL: Using Python to removing prefixes and suffixes

Link: https://daniel.feldroy.com/posts/til-2024-10-removing-prefixes-and-suffixes

Starting in Python 3.9, s.removeprefix() and s.removesuffix() were added as str built-ins. Which easily covers all the versions of Python I currently support.
Usage for removeprefix():
>>> 'Spam, Spam
Daniel Roy Greenfeld: TIL: Using hx-swap-oob with FastHTML

Link: https://daniel.feldroy.com/posts/til-2024-12-using-hx-swap-oob-with-fasthtml

Until now I didn't use this HTMX technique, but today Audrey Roy Greenfeld and I dove in together to figure it out. Note that we use language that may not match HTMX's description, sometimes it's bett
Daniel Roy Greenfeld: TIL: Arity

Link: https://daniel.feldroy.com/posts/til-2024-12-arity

I'm excited to have learned there's a word for the count of arguments to a function/method/class: arity. Throughout my career I would have called this any of the following:

number_of_args
param_count
Daniel Roy Greenfeld: TIL: Python's defaultdict takes a factory function

Link: https://daniel.feldroy.com/posts/til-2024-12-defaultdict-takes-a-factory-function

I've never really paid attention to this object but maybe I should have. It takes a single argument of a callable function. If you put in Python types it sets the default value to those types. For exa
Daniel Roy Greenfeld: TIL: Python Dictonary Merge Operator

Link: https://daniel.feldroy.com/posts/til-2024-11-python-dictonary-merge-operator

The function way
Until today I did this:
# Make first dict
num_map = {
'one': '1', 'two': '2', 'three': '3', 'four': '4',
'five': '5', 'six': '6', 'seven': '7', 'eight': '8',
'nine': '9'
}
Daniel Roy Greenfeld: TIL: Fractional Indexing

Link: https://daniel.feldroy.com/posts/til-2024-11-fractional-indexing

In the past when I've done this for web pages and various other interfaces it has been a mess. I've built ungainly sort order in numeric or alphanumeric batches. Inevitably there is a conflict, often
Daniel Roy Greenfeld: TIL: SequentialTaskSet for Locust

Link: https://daniel.feldroy.com/posts/til-2024-11-sequentialtaskset-for-locust

SequentialTaskSet makes it so Locust tasks happen in a particular order, which ensures your simulated users are clicking around in a more human manner at a more human pace. Attribution goes to Audrey
Python Bytes: #415 Just put the fries in the bag bro

Link: https://pythonbytes.fm/episodes/show/415/just-put-the-fries-in-the-bag-bro

<strong>Topics covered in this episode:</strong><br>

<ul>
<li><a href="https://github.com/dbos-inc/dbos-transact-py?featured_on=pythonbytes"><strong>dbos-transact-py</strong></a></li>
<li><strong><a
Django Weblog: Welcome to our new Django accessibility team members - Eli, Marijke, Saptak, Tushar

Link: https://www.djangoproject.com/weblog/2024/dec/24/welcome-new-django-accessibility-team-members/

Sarah Abderemane, Thibaud Colas and Tom Carrick are pleased to introduce four new members in the Django Accessibility team ❤️.

Marijke Luttekes
Eliana Rosselli
Tushar Gupta
Saptak Sengupta

Marijke (
Talk Python to Me: #490: Django Ninja

Link: https://talkpython.fm/episodes/show/490/django-ninja

If you're a Django developer, I'm sure you've heard so many people raving about FastAPI and Pydantic. But you really love Django and don't want to switch. Then you might want to give Django Ninja a se
PyCoder’s Weekly: Issue #661 (Dec. 24, 2024)

Link: https://pycoders.com/issues/661

#661 – DECEMBER 24, 2024 View in Browser » Exploring Modern Sentiment Analysis Approaches in Python What are the current approaches for analyzing emotions within a piece of text? Which tools and
Armin Ronacher: Reflecting on Life

Link: http://lucumr.pocoo.org/2024/12/26/reflecting-on-life

Last year I decided that I want to share my most important learnings
about engineering, teams and quite frankly personal mental health. My hope
is that those who want to learn from me find it useful.
Kushal Das: pastewindow.nvim my first neovim plugin

Link: https://kushaldas.in/posts/pastewindow-nvim-my-first-neovim-plugin.html


pastewindow is a neovim plugin
written in Lua to help to paste text from a buffer to a different window in
Neovim. This is my first attempt of writing a plugin.
We can select a window (in the GIF be
Talk Python to Me: #491: DuckDB and Python: Ducks and Snakes living together

Link: https://talkpython.fm/episodes/show/491/duckdb-and-python-ducks-and-snakes-living-together

Join me for an insightful conversation with Alex Monahan, who works on documentation, tutorials, and training at DuckDB Labs. We explore why DuckDB is gaining momentum among Python and data enthusiast
Matt Layman: Optimizing SQLite - Building SaaS #210

Link: https://www.mattlayman.com/videos/optimizing-sqlite-building-saas-210/

In this episode, when worked on the newly migrated JourneyInbox site and focused on the database. Since me moved from Postgres to SQLite, I needed to make sure that SQLite was ready for users. We exam