Category Archives: Books

Books that I’ve read, reviewed or cited for this article

ReportLab: PDF Publishing with Python is now Available!

My latest book, ReportLab: PDF Processing with Python is now available for purchase.

ReportLab has been around since the year 2000 and has remained the primary package that Python developers use for creating reports in the PDF format. It is an extremely powerful package that works across all the major platforms. This book will also introduce the reader to other Python PDF packages.

You can get the book at the following online retailers:

Talk Python Podcast and Twitter Q&A

Last week I was honored to be a part of the Talk Python to Me Podcast. During the podcast, we talked about the history of Python as well as its future. We also talked about the books I have written and how I used Kickstarter to connect with my readers. We spent some time going over my latest book, Python Interviews and some of the people I interviewed for the book. We also spoke a little about my upcoming book, ReportLab: PDF Processing in Python, which is going to be released in June 2018.

You can listen to the Podcast here:

This week, I will be doing Twitter Q&A on Wednesday, March 28th at 1 p.m. CST | 7pm BST | 11am PDT with Steve Holden and Alex Martelli in support of the Python Interviews book.. Just tweet your questions with the hashtag #PythonInterviewsQA @packtpub!

Python Interviews Excerpt: Sebastian Raschka

The following is an excerpt from my book, Python Interviews

Sebastian Raschka received his doctorate in Quantitative Biology and Biochemistry and Molecular Biology in 2017, from Michigan State University. Sebastian is the bestselling author of Python Machine Learning, which received the ACM Best of Computing award in 2016.

Driscoll: Python is one of the languages that is being used in AI and machine learning right now. Could you explain what makes it so popular?

Raschka: I think there are two main reasons, which are very related. The first reason is that Python is super easy to read and learn.

I would argue that most people working in machine learning and AI want to focus on trying out their ideas in the most convenient way possible. The focus is on research and applications, and programming is just a tool to get you there. The more comfortable a programming language is to learn, the lower the entry barrier is for more math and stats-oriented people.

Python is also super readable, which helps with keeping up-to-date with the status quo in machine learning and AI, for example when reading through code implementations of algorithms and ideas. Trying new ideas in AI and machine learning often requires implementing relatively sophisticated algorithms and the more transparent the language, the easier it is to debug.

The second main reason is that while Python is an easy language itself, we have a lot of great libraries on top of it that make our work easier. Nobody would like to spend their time on reimplementing basic algorithms from scratch (except in the context of studying machine learning and AI). The large number of Python libraries which exist, help us to focus on more exciting things than reinventing the wheel.

By the way, Python is also an excellent wrapper language for working with more efficient C/C++ implementations and CUDA/cuDNN, which is why existing machine learning and deep learning libraries run very efficiently in Python. This is also super important for working in the fields of machine learning and AI.

To summarize, I would say that Python is a great language that lets researchers and practitioners focus on machine learning and AI and provides less of a distraction than other languages.

Driscoll: So is Python just the right tool at the right time, or is there another reason that it’s become so important in AI and machine learning?

Raschka: I think that’s a bit of a chicken or the egg problem.

To untangle it, I would say that Python is convenient to use, which led to its wide adoption. The community has developed many useful packages in the context of scientific computing. Many machine learning and AI developers prefer Python as a general programming language for scientific computing and they have developed libraries on top of it, like Theano, MXNet, TensorFlow and PyTorch.

On an interesting side note, having been active in the machine learning and deep learning communities, there was one thing that I heard very often: “The Torch library is awesome, but it is written in Lua and I don’t want to spend my time learning yet another language.” Note that we have PyTorch now.

Read the rest interview in the book. You can get 40% off when purchasing from Packt’s website by using the following code: PIMD40. This code is good until March 16th, 2018.

Python Interviews Book Released!

My Python Interviews book is now officially released! In it you will find 20 interviews with Python experts from a diverse set of fields.

I also have a special code from Packt that will take 40% off the eBook for up to 1000 readers. Just apply the following code when you are checking out: PIMD40. This code is good until March 16th, 2018.

Note: The book is only available at Packt currently, but will be available on Amazon and other retail locations on March 9th, 2018.

Packt has a history of donating to open source projects and would like to make a donation to the Python Software Foundation from this book. So, for every copy Packt sells in March they will make a donation to the PSF on both their own e-commerce website and via the discount code for Amazon. The Amazon discount code is 30PYTHON (This code might not work until March 9th)

ReportLab Book Kickstarter’s – 2 Days Left

There is only a little over 2 days left for my ReportLab book Kickstarter. This is your only chance to purchase a signed copy of the book and it’s also probably the cheapest way of getting the eBooks too!

I currently have 7 chapters done with number 8 nearing completion. There are over 170 pages in these chapters alone. I hope you’ll check it out as ReportLab is a fun way to use Python to design dynamic reports in a PDF format.

ReportLab Book Chapter Sampler

I thought it would be fun to create a sample of the book so you can get an idea of what the book will be like. So I created a PDF that contains the first 3 chapters of the book for you.

Download Sample

Note that the format of this sample is not quite right as I had to generate it from a more complete version, so the PDF’s table of contents shows more than what is actually in the document.

Also I just broke through the 100 page boundary over the weekend. I am finishing up chapter 5 and will be cranking out another couple of chapters this week if all goes well.

Thanks for your support!
Mike

ReportLab Book Cover Story

I really like coming up with fun covers for my books. I also like to find new artists for each book so that they all end up looking unique. I do plan to re-use one or two artists at some point though.

Anyway, for the ReportLab book I happened to stumble across Therese Larsson’s website and I really liked how she did her lighting in her artwork. She is from Sweden and has worked with some fairly big companies, including Disney, Google, and Adidas. You can read more about her on Behance.

I ended up commissioning the cover from her and I described what I wanted. Here is the initial sketch:

ReportLab Cover Sketch

Continue reading ReportLab Book Cover Story

Pre-Order Python Interviews

I am happy to announce another book that I have been working on called Python Interviews from Packt Publishing. Here is the blurb from their website:

Python Interviews contains a series of one-to-one interviews between Mike Driscoll and a variety of leading figures in the Python community. Mike is a life-long member of the Python community and has been running ‘PyDev of the Week’ interviews with the cream of the Python community for many years from his blog, Mouse vs. Python.

In this book, Mike talks Python with core members of the Python community, such as Steve Holden (former chair of the Python Software Foundation), Mike Bayer (creator of SQLAlchemy), Brett Cannon (core Python developer), Glyph Lefkowitz (creator of Twisted), Massimo DiPierro (creator of web2py), Oliver Schoenborn (creator of PyPubSub), and many, many more. The interviews are full of insights into the minds of successful programmers, the inner workings of the Python language, the history of Python, and humorous anecdotes from the thriving Python community.

Python Interviews is currently available for pre-order and should be published in late February 2018 or March 2018.

Note: These are brand new interviews and are not taken from my “PyDev of the Week” series. However there is some cross-over in this book to those interviews since some of the same topics were covered.

ReportLab Book Funded + TOC

After collating the various ideas that people have been giving me during the Kickstarter campaign, I have decided to firm up my table of contents. I had already planned to cover 80-90% or more of what was in ReportLab’s user guide, but in more depth, as I thought most of those topics should be covered in book form. The rest of the book was going to be some HOW-TO type chapters and other Python packages that work with PDFs. With that in mind, here is what the table of contents is looking like:

Part I – The ReportLab Toolkit

  • Chapter 1 – The Canvas
  • Chapter 2 – Fonts
  • Chapter 3 – PLATYPUS
  • Chapter 4 – Paragraphs
  • Chapter 5 – Tables
  • Chapter 6 – Other Flowables
  • Chapter 7 – Custom Flowables
  • Chapter 8 – Charts / Graphs
  • Chapter 9 – Other Graphics
  • Chapter 10 – PDF Special Features (Forms, Links, Encryption)
  • Chapter 11 – Bar Codes / QR Codes

Part II – Tutorials / HOW-Tos

  • Chapter 12 – Turning XML into Multipage PDFs
  • Chapter 13 – Custom headers and footers, page numbers
  • Chapter 14 – Creating a table of contents (Stretch goal) 
  • Chapter 15 – Exporting Data from PDFs (pdfminer) (Stretch goal) 
  • Chapter 16 – Filling in PDF Forms with Python (pdfforms) (Stretch goal)
  • Chapter 17 – PyPDF2 / pdfrw
  • Chapter 18 – Converting Markup to PDF (rst2pdf, html2pdf, etc) (Stretch goal)
  • Chapter 19 – pyfpdf, An Alternative to ReportLab

Note that the chapter titles are subject to change. Also note that I have marked some of the chapters as “stretch goal” chapters. They may or may not get added depending on whether or not we reach our stretch goal.

Stretch Goal(s)

My stretch goal is to hit $6000 or 500 backers. If we hit either of those, than all of the chapters above will get added. If we don’t, then I will evaluate how close we got and I may put out a survey to see which two chapters we will keep and which two will be voted out of the book.

The last thing I would like to make note of is that the first 3 chapters of the book is over 60 pages of content all by themselves, so even if I only did the first section of the book (i.e. 11 or 12 chapters), the book would still be over 200 pages in length.

If you’d like to get early access to the book, then please go check out the Kickstarter!

ANN: ReportLab PDF Processing with Python Kickstarter

Have you ever wondered how to create PDF Reports programmatically? If so, then this is the book for you! In ReportLab: PDF Processing with Python, you will learn how to generate PDFs using the popular Python programming language. The code in this book will run on all 3 major platforms:

  • Windows
  • Mac
  • Linux

ReportLab is used by WikipediaNASAFidelityHP and many other large and small organizations.

ReportLab is fast and reliable. I have been using it for the past 10+ years professionally. It’s also quite easy to learn. In this book you will learn all you need to know to generate your own PDFs.

Here’s a sample of just some of things you will learn:

  • How to embed fonts
  • Generate multipage documents
  • Add tables
  • Insert photos
  • Add graphs to your PDF
  • Add barcodes to your PDF
  • Draw shapes
  • Generate multi-column pages
  • Tutorials on generating specific complex examples

This book will be split into two main parts. The first part will contain pretty thorough coverage of the various parts of ReportLab. The second part will be a short series of chapters on how to create various layouts with ReportLab.

I am also planning a section (or series of appendices) of the book that will introduce you to other Python PDF packages such as PyPDF2 and rst2pdf and how you might use them.

If you would like to be a part of this project, then check out my Kickstarter now!