I've written one commercially-published book:
It is a book about the Pylons web framework that I co-founded (and not about electricity pylons as an annoyed reviewer expected after buying it on Amazon!).
Pylons isn't as popular today as it was in 2009 but it still serves major sites like Reddit (their code is here for those interested). Today the Pylons community hosts the successor to the Pylons framework called Pyramid. I personally choose to use Django nowadays. I find the combination of Wagtail CMS and Django very compelling for many common web application requirements.
The Pylons Book was also one of the very first commercially published books released simultaneously under an open source license. In this case I chose the GDFL (the same license Wikipedia used at the time).