It’s friday, so it’s time for a Glyph update! This one, predicably, is mostly about PyCon. https://www.patreon.com/posts/patreon-update-104876830
As I try to mention once a week, I am attempting to start a little lifestyle business writing software, both libraries and apps, mostly open source, and writing about it. Sometimes the actual activity is buried inside these locked patrons-only posts so today I thought I’d try something a little different and do a mega-thread listing all the different projects I’m doing, so if you think *your* followers would appreciate one in particular, you can boost just that.
Here near the top of the thread I’ll just say that you can sponsor me via GitHub Sponsors at https://github.com/sponsors/glyph or Patreon at https://www.patreon.com/creatorglyph .
Sponsor @glyph on GitHub Sponsors

Glyph is the founder of the Twisted project, and creator and contributor of open source software across the Python ecosystem. He's currently making an attempt to see if "independent open source com...

GitHub
I write a lot of stuff about software and other things as well, https://blog.glyph.im . Most recently, a representative sample of this is my article about the AI hype cycle: https://blog.glyph.im/2024/05/grand-unified-ai-hype.html
Deciphering Glyph :: index

Deciphering Glyph, the blog of Glyph Lefkowitz.

Pomodouroboros is Pomodoro-method app, focused on folks with ADHD. The problem with productivity timer apps is: if you’re having a day where you already remembered you need a timer, you set it, and you actually start working, you probably didn’t *need* the timer so much that day. Pomodouroboros never stops running, and gamifies your focus to help you set the intentions YOU care about. It’s also all open source, and in Python. Mostly for macOS, but a Linux port on the way. https://github.com/glyph/pomodouroboros
GitHub - glyph/Pomodouroboros: Pomodoro timer that acknowledges the inexorable, infinite passage of time

Pomodoro timer that acknowledges the inexorable, infinite passage of time - glyph/Pomodouroboros

GitHub
Fritter is a Python library for timed events. It’s hard to describe, because it’s a way of *thinking* about timed & repeating events than a library handling a specific function. To give you a sense of its unique structure, one thing it can do is a “tree”, where you create a scheduler, then a sub-scheduler, and pause/resume it. Consider a game with a “freeze” weapon that pauses a single entity’s animations & movement AI. Or a subscription that can be paused & resumed. https://github.com/glyph/fritter
GitHub - glyph/Fritter: Fritter, the Frame-Rate IndependenT TimEr tRee, is a Python library for working with scheduling with scheduled tasks that have sophisticated requirements of their timing and scheduling.

Fritter, the Frame-Rate IndependenT TimEr tRee, is a Python library for working with scheduling with scheduled tasks that have sophisticated requirements of their timing and scheduling. - glyph/Fri...

GitHub

DBXS ("dee-bee-access") gives you the simplicity of raw SQL, with the security guarantees of an expression-construction library and the runtime type-safety of an ORM. For applications where you know exactly what SQL you want to execute, it removes most of the downsides. It won't give you all the bells and whistles of an ORM (and sometimes you do need those!) but it also will give you structures and types without needing to reinterpret all your queries into a new DSL.

https://github.com/glyph/dbxs

GitHub - glyph/DBXS: Database Access

Database Access. Contribute to glyph/DBXS development by creating an account on GitHub.

GitHub
If you just want to write a mac app in Python that does one quick thing for personal use, perhaps you would be interested in QuickMacApp, which can put a little status menu into your menu bar *very* quickly, with just a few lines of Python code. https://github.com/glyph/QuickMacApp
GitHub - glyph/QuickMacApp: framework for quickly developing macOS applications in Python with Twisted

framework for quickly developing macOS applications in Python with Twisted - glyph/QuickMacApp

GitHub
Of course, once that app is happily running along in the background, you might want a global hot key to interact with it, and you don't want to privilege-escalate the whole thing to do event-tap shenanigans to be a full-blown key logger. In that case, you can use QuickMacHotKey, which also lets you just quickly bind a global hot key on your mac with a few lines of code. https://github.com/glyph/QuickMacHotKey
GitHub - glyph/QuickMacHotKey: Quickly bind a global hotkey in a PyObjC application.

Quickly bind a global hotkey in a PyObjC application. - glyph/QuickMacHotKey

GitHub
*Distributing* a mac app written in Python is a whole other ball of wax, what with needing to ensure the availability of multiple architectures, code signing, notarization, and constructing an archive in a format that won't lose some critical bit of mac-specific metadata. Once you've bundled it up with py2app, for the rest of these annoying details you can use Encrust https://github.com/glyph/Encrust
GitHub - glyph/Encrust: Automate all the steps to add the flavorful, savory crust that macOS applications written in Python require to launch

Automate all the steps to add the flavorful, savory crust that macOS applications written in Python require to launch - glyph/Encrust

GitHub
Of course if you're scripting, customizing, and distributing Python on your mac, you probably need to keep your macOS official Python Dot Org Python up to date, and for that I've got you covered too, with the "Mac OS Python UPdater": https://github.com/glyph/MOPUp
GitHub - glyph/MOPUp: Macintosh Official Python.org Updater

Macintosh Official Python.org Updater. Contribute to glyph/MOPUp development by creating an account on GitHub.

GitHub
(If you don't know why you want to get your macOS Python from the official Python website, let's go back to that aforementioned blogging to read about that: https://blog.glyph.im/2023/08/get-your-mac-python-from-python-dot-org.html )
Get Your Mac Python From Python.org

There are many ways to get Python installed on macOS, but for most people the version that you download from Python.org is best.

OK, enough with the mac stuff for a minute. Does this glamorous life of making tens, or even HUNDREDS of dollars for working on open source seem compelling to you? I open sourced the little tool I use to thank my patrons in custom, gamified, auto-generated commit messages, via the git `prepare-commit-msg` hook, here; if you're not interested in it for other reasons, it is probably the one production app using DBXS right now, so it has examples of that: https://github.com/glyph/SponCom
GitHub - glyph/SponCom: Sponsored Commits

Sponsored Commits. Contribute to glyph/SponCom development by creating an account on GitHub.

GitHub
Do you use Python's built-in `datetime` module, but its lack of type safety is annoying? Don't like the fact that `datetime.datetime` subclasses `datetime.date` while violating LSP? Bothered by the fact that aware and naive datetimes are the "same" type, with no way to keep them separate? Check out DateType, which solves these problems with custom annotations *without* even being a separate library; it's all `datetime` objects at runtime: https://github.com/glyph/DateType
GitHub - glyph/DateType: A type wrapper for the standard library `datetime` that supplies stricter checks, such as making 'datetime' not substitutable for 'date', and separating out Naive and Aware datetimes into separate, mutually-incompatible types.

A type wrapper for the standard library `datetime` that supplies stricter checks, such as making 'datetime' not substitutable for 'date', and separating out Naive and Aware datetime...

GitHub
Note that this one is endorsed by the official standard library documentation, right at the top: https://docs.python.org/3.12/library/datetime.html#module-datetime
datetime — Basic date and time types

Source code: Lib/datetime.py The datetime module supplies classes for manipulating dates and times. While date and time arithmetic is supported, the focus of the implementation is on efficient attr...

Python documentation
Of course if you're the sort of person who follows me, you might have privileges on quite a few PyPI projects yourself. Maybe not all of them have automatic uploads from github, and you'd like to keep your PyPI tokens more secure. Or, I dunno, maybe you use a cloud or something. If you have a YubiKey, check out TokenRing, a Python Keyring module secret-storage backend that can use your hard token as an encryption key, and require user presence verification for unlocking: https://github.com/glyph/tokenring
GitHub - glyph/tokenring: A backend for the `keyring` module which uses a hardware token to require user presence for any secret access, by encrypting your vault and passwords as Fernet tokens.

A backend for the `keyring` module which uses a hardware token to require user presence for any secret access, by encrypting your vault and passwords as Fernet tokens. - glyph/tokenring

GitHub
And if you're keeping all those secrets secure, you probably already have a password manager. When was the last time you changed the root password on that password manager? It's been a while, I bet. But it's such a hasssle to memorize a new secure password. Not any more, with PINPal, a little helper that sits in your command-line prompt and provides spaced-repetition memorization help for secure, randomized core passwords like password managers and mobile device PINs. https://github.com/glyph/pinpal
GitHub - glyph/PINPal: random PIN code memorization helper

random PIN code memorization helper. Contribute to glyph/PINPal development by creating an account on GitHub.

GitHub
Back to more core-infrastructure type libraries, perhaps you would like to model your stateful objects with deterministic, finite-state automata, using my Automat library: https://github.com/glyph/automat
GitHub - glyph/automat: Self-service finite-state machines for the programmer on the go.

Self-service finite-state machines for the programmer on the go. - glyph/automat

GitHub
This one in particular could do with a few patron sponsors to motivate me to finish the second-generation interface I've been puttering with for literal years at this point, which would add a whole new layer of type safety and legibility: https://github.com/glyph/automat/pull/137
sketch of new type-annotation-based interface by glyph · Pull Request #137 · glyph/automat

Fixes #145 obviously needs tests and perhaps some more thought (in particular… how would feedback state-changes work here?) but I think this might be cleaner than the methodical machine Stuff to do...

GitHub
Not all my projects are so big, of course. Sometimes I just make a part of a webpage use a monospaced font. https://github.com/tweedge/unique-local-ipv6/pull/3
make prefixes monospaced by glyph · Pull Request #3 · tweedge/unique-local-ipv6

It bothered me that the prefix was variable-width, making it slide around on the page when regenerated.

GitHub
I do, of course, still work on the project that I founded, as it supports these projects and as my patrons suggest. (Although I hasten to add, that if you want to support Twisted you should probably donate via the PSF, rather than subscribing to my personal Patreon. The project might even hire me to do stuff! But that's somewhat separate from my own work, as you can see, I have conflicting priorities) https://twisted.org
Twisted

"Twisted" is a big umbrella though, and it incorporates things like Treq, which lets you use Twisted's native HTTP client with a high-level, Requests-like interface: https://github.com/twisted/treq
GitHub - twisted/treq: Python requests like API built on top of Twisted's HTTP client.

Python requests like API built on top of Twisted's HTTP client. - twisted/treq

GitHub
and Klein, which presents a flask-like interface to twisted.web's server infrastructure, and looks flask-like because it actually uses the same library provided by flask (Werkzeug) to set up its routes: https://github.com/twisted/klein
GitHub - twisted/klein: werkzeug + twisted.web

werkzeug + twisted.web. Contribute to twisted/klein development by creating an account on GitHub.

GitHub

Twisted was originally a video game, did you know that? And you know what video games need? Random numbers! Perhaps you would like to use a random-number generator that is suitable for games because it is both properly unpredictable if you don't know the seed (it uses AES, not Mersenne Twister) and *also* seedable and deterministic. I haven't touched this one in a while, but I believe it still works fine on modern Pythons:

https://github.com/glyph/streamrandom/blob/dc42c6acbce7b756d08e9c1f84e8bda740cfb9f3/streamrandom.py#L2-L37

streamrandom/streamrandom.py at dc42c6acbce7b756d08e9c1f84e8bda740cfb9f3 · glyph/streamrandom

Contribute to glyph/streamrandom development by creating an account on GitHub.

GitHub
And, speaking of video games and maintenance, I do occasionally also find tools that need a proper code-signing certificate and release Mac downloads for them, like this sound-effects generator for games: https://github.com/glyph/cfxr/releases/tag/0.3.4
Release April 2023 · glyph/cfxr

universal2 binary upgrade to recent SDL2 framework

GitHub
Do you write Python, use Emacs, and sometimes write docstrings, in either epytext or reStructuredText format? I also have an Emacs package that will provide both syntax highlighting and style-appropriate paragraph wrapping for you. (Maybe don't look at this code without appropriate PPE though, you are definitely going to need goggles for the "parsing" it does.) https://github.com/glyph/python-docstring-mode
GitHub - glyph/python-docstring-mode: Emacs minor-mode for editing Python docstrings.

Emacs minor-mode for editing Python docstrings. Contribute to glyph/python-docstring-mode development by creating an account on GitHub.

GitHub

I really appreciate any boosts, if you think theres' something in here your followers would like!

If you'd like to subscribe (only $1 a month!) you can support the development of software and writing like those mentioned above, as well as receive regular updates about my development & writing process, and get random but periodic thanks in my commit messages as well as Internet Points via SponCom. That URL is: https://www.patreon.com/creatorglyph

*Whew*. That is definitely enough self-promotion for one day.

Get more from Glyph on Patreon

creating open source software and words on the internet

Patreon
cc @shauna as I mentioned they don't fit in a toot but it does turn out that they fit in a thread https://social.coop/@shauna/112474914189365948
Shauna GM (@[email protected])

@[email protected] holy moly that's a lot of projects

social.coop
@glyph I remember Twisted. My first job in the UK was working on Twisted-based web apps, circa 2005-. The company moved to Pylons later, though. Good to see that Twisted is still around; I imagine async/await would be a good match for it.
@acb yep, we were involved in the initial discussions that lead to asyncio, and we support it, both interoperating with the main loop via asyncioreactor and interoperating with coroutines via Deferred().asFuture and Deferred.fromCoroutine.
@glyph Cool; I’ll have to look into that more sometime. I’ve spent more time working with Swift’s equivalent, which seems semantically similar, though possibly considerably different in implementation.
@acb hey @lukasa just thought you might find it amusing that swift's equivalent looks "semantically similar"
@glyph @acb 😂 It’s a very profound observation!

@glyph This reminded me of the talk you gave… not easy to find from repo or your site (the pyvideo only go to 2018)

https://www.youtube.com/watch?v=Vqd964LGcI4

Talks - Glyph: How To Keep A Secret

YouTube

@carlton yep, this software was released for that talk :)

PyVideo has more recent talks but PyCon US 2023 isn't indexed yet https://github.com/pyvideo/data/issues/1127

I occasionally submit a PR like this to fix up the metadata https://github.com/pyvideo/data/pull/1155

PyCon US 2023 · Issue #1127 · pyvideo/data

Schedule: https://us.pycon.org/2023/schedule/ Playlist: https://www.youtube.com/playlist?list=PL2Uw4_HvXqvY2zhJ9AMUa_Z6dtMGF3gtb I also noticed that PyCon US 2022 was missing, so I opened #1126 for...

GitHub

@glyph
A minor note: if you do want conda, get it from conda-forge, not Anaconda.

Anaconda has started down the enshittification route, and requires organizations - including universities - to buy a license if you install it.

Conda itself is Open Source and conda-forge has repositories that tend to be more comprehensive and up to date than Anaconda anyhow. And it reportedly also works better on recent Macs.