things you can do –with uv | Lars Grams
What is this post about In this post, I’ll dive into a powerful feature of uv: the --with option. I’ll explain how it works, share practical examples, and show how it solved a key challenge in my latest tool, ayu. But first of all…
Fine Tuning Python WSGI and ASGI applications for Flask, Django, and FastAPI
Firstly covering the simpler of the two options, the ASGI/WSGI web server that goes between your Python code in the web framework and the users who have a web browser:
Gunicorn is the most popular WSGI server
Uvicorn is an ASGI server. It is both a standalone server as well as a plugin for Gunicorn
Hypercorn is an alternative that supports both WSGI and ASGI
GitHub - spiside/pdb-tutorial: A simple tutorial about effectively using pdb
A simple tutorial about effectively using pdb. Contribute to spiside/pdb-tutorial development by creating an account on GitHub.
Books | mathspp
Books I have written about Python and other topics.
The Python Tutorial — Python 3.12.1 documentation
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax an...
Introducing Fontimize| Subset Fonts to Exactly and Only Your Website's Used Characters ⸺ Dave on Design
Fontimize: Subset Fonts to Exactly and Only Your Website's Used Characters
A Python library to subset fonts, which cuts ~95% from the size of your site’s font files & downloads/bandwidth. To use: from fontimize import optimise_fonts_for_files and call it with a list of HTML files. See the the full API docs for more info.
Find Fontimize on Github and PyPi.
https://github.com/vintagedave/Fontimize/issues/1
I randomly came across your blog post on this library and thought I'd take a look at the code. I noticed you have an accidental O(n^2) string concatenation. In a few places in your code, you're appending lists of strings. This is a problem as it creates new intermediate strings in each iteration. Here is one such example:
LLM: A CLI utility and Python library for interacting with Large Language Models
A CLI utility and Python library for interacting with Large Language Models, both via remote APIs and models that can be installed and run on your own machine.
Open-source data multitool | VisiData
Command-line interactive multitool for tabular data.
VisiData is an interactive multitool for tabular data. It combines the clarity of a spreadsheet, the efficiency of the terminal, and the power of Python, into a lightweight utility which can handle millions of rows with ease.
How to Write Python Command-Line Interfaces like a Pro
o what is Click? From the webpage:
It (Click) aims to make the process of writing command-line tools quick and fun while also preventing any frustration caused by the inability to implement an intended CLI API.