Simon Willison’s Weblog

Subscribe

Saturday, 8th January 2022

Hashids (via) Confusingly named because it’s not really a hash—this library (available in 40+ languages) offers a way to convert integer IDs to and from short strings of text based on a salt which, if kept secret, should help prevent people from deriving the IDs and using them to measure growth of your service. It works using a base62 alphabet that is shuffled using the salt.

# 7:31 pm / ids

Release stream-delay 0.1 — Stream a file or stdin one line at a time with a delay
TIL Writing pytest tests against tools written with argparse — I usually build command-line tools using [Click](https://click.palletsprojects.com/) (and my [click-app](https://github.com/simonw/click-app) cookiecutter template), which includes a really nice [set of tools](https://click.palletsprojects.com/en/8.0.x/testing/) for writing tests.
Thursday, 6th January 2022
Sunday, 9th January 2022

2022 » January

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930
31