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.

PyDev of the Week: Juan Luis Cano

This week we welcome Juan Luis Cano (@astrojuanlu) as our PyDev of the Week! He is the chair of the Python Spain non-profit and the author of the poliastro project. If you can read Spanish, then you might want to check out his website. Otherwise you can definitely take a look at his Github profile to see what he’s been working on or is interested in. Let’s take some time to learn more about Juan!

Can you tell us a little about yourself (hobbies, education, etc):

I’m an Aerospace engineer with a passion for space, programming and open source. I really enjoy solving Physics or Math problems using computers, and the more my job requires me reading scientific papers and derive mathematical equations, the happier I am. I am an open culture advocate and also chair of the Python Spain non-profit, which organizes the PyCon in our country (I have been involved one way or another since the first edition, in 2013). When I am not in front of the computer, I love to listen to all kinds of music (electronic, ’70s rock, opera, blues), go everywhere with my bicycle and travel.

Continue reading PyDev of the Week: Juan Luis Cano

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

PyDev of the Week: Emily Morehouse-Valcarcel

This week we welcome Emily Morehouse-Valcarcel (@emilyemorehouse) as our PyDev of the Week. Emily is the co-founder and Director of Engineering of Cuttlesoft. She recently spoke at PyCascades about Python’s AST. You can get a feel for what projects she is interested in over on her Github profile. Let’s take a few moments to get to know her!

Can you tell us a little about yourself (hobbies, education, etc):

I’m currently the Cofounder and Director of Engineering at a Cuttlesoft, a digital product development company. Before that, I studied Theatre, Criminology and Computer Science at the Florida State University. I didn’t actually discover programming until my junior year when I took an intro course and built an Enigma machine simulator. I fell in love! I really enjoy problem-solving and there’s always a new challenge to face and different things to learn or improve. I believe that if you ever get bored in the tech world, you’re doing it wrong. In my spare time, I enjoy playing video games, hiking with our dog (Colorado mountains are just incredible), photography, gardening, attending concerts, and indulging in Colorado’s amazing craft beer and food scene. Continue reading PyDev of the Week: Emily Morehouse-Valcarcel

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 101: The textobject

The ReportLab toolkit provides multiple ways for you to generate text on your PDFs. The most popular examples that I have seen are using canvas methods or using PLATYPUS. The canvas method that you will likely see the most is drawString. Here is an example:

from reportlab.pdfgen import canvas
 
c = canvas.Canvas("hello.pdf")
c.drawString(100, 100, "Welcome to Reportlab!")
c.showPage()
c.save()

Basically all that does is draw a string at the x/y coordinates given. Using PLATYPUS is significantly more complicated:

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet
 
def hello():
    doc = SimpleDocTemplate("hello_platypus.pdf",
                            pagesize=letter,
                            rightMargin=72,
                            leftMargin=72,
                            topMargin=72,
                            bottomMargin=18)
    styles = getSampleStyleSheet()
 
    flowables = []
 
    text = "Hello, I'm a Paragraph"
    para = Paragraph(text, style=styles["Normal"])
    flowables.append(para)
 
    doc.build(flowables)
 
if __name__ == '__main__':
    hello()

You will note that most of the time when you use PLATYPUS, you will need to use a template, a style and a paragraph or some other Flowable. But let’s go back to the canvas. It actually has another method of generating text that ReportLab calls the textobject. Frankly I have never had the need for one of these as ReportLab’s Paragraph class gives you more than enough control over the presentation of your text. But if you depend on using the low level canvas for generating your PDFs, then you will like to know that a textobject will make PDF generation faster because it doesn’t use individual calls to drawString. Continue reading ReportLab 101: The textobject

PyDev of the Week: Robert Cimrman

This week we welcome Robert Cimrman as our PyDev of the Week! Robert is the project leader of Sfepy: Simple Finite Elements in Python package. He is also a contributor to NumPy and SciPy. You can see some the projects he works on over on Github. Let’s take a few moments to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

I studied applied math (numerical methods and parallel processes) for my master’s degree and then switched to biomechanics for my PhD (topic: mathematical modeling of biological tissues). Besides working with computers, I like music (the harder the better), reading various stuff (from physics/science to science-fiction to fantasy) and skiing/hiking in mountains. Continue reading PyDev of the Week: Robert Cimrman

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!

PyDev of the Week: Joseph Howse

This week we welcome Joseph Howse (@CatsAndMonkeys) as our PyDev of the Week. Joseph is the author (or co-author) of several books on OpenCV:

  • OpenCV for Secret Agents
  • OpenCV 3 Blueprints
  • iOS Application Development with OpenCV 3
  • Android Application Programming with OpenCV 3
  • Learning OpenCV 3 Computer Vision with Python
  • Python Game Programming by Example

You can learn a bit more about Joseph from his company’s website or his author page. Let’s take a few moments to get to know him better!

Joseph Howse (left) and Eiffel Einstein Rocket (right)

Can you tell us a little about yourself (hobbies, education, etc):

I live in a fishing village called Terence Bay and I also have a home office in the nearby city of Halifax, Nova Scotia, Canada. With my mother Jan and my father Bob, I run a consulting company called Nummist Media Corporation Limited, specializing in computer vision. We have four cats named Sanibel, Lambda, Josephine or “Little Jo”, and Eiffel.

Readers of my computer vision books will know the first three of these cats. They’ll also know Plasma, a virtuous leader of cats, who sadly succumbed to lymphoma this past August. Eiffel is our new arrival. They are all great cats who are really dedicated to their experimental work in computer vision and to their cat-centric religion called Nummism.

I love photography and writing. I collect cameras and lenses. This set of interests has had a big influence on my life, including my specialization in computer vision.

I took a Bachelor of Arts degree in French and English literature, a Master of Business Administration, a Master of Arts in International Development, and lastly a Master of Computer Science. My interest in computer science was fostered by my older brother Sam, who specialized in functional and provable programming. He died of bile duct cancer ten years ago this January. But he taught us many things and he still makes us laugh and, for the cats, you know, he helped to codify Nummism. Continue reading PyDev of the Week: Joseph Howse