Print Avery Labels

Introduction

Printing Avery labels in Python can be achieved using different libraries depending on your desired level of control and complexity. Two options are the pylabels and reportlab libraries. (These are not the only ones.)

Note: pylabels is a Python library for creating PDFs to print sheets of labels. It uses the ReportLab PDF toolkit to produce the PDFs.

Project #1

Create data to work with. This information will printed on labels and used to mail letters. (Christmas cards?)

  1. Using a spreadsheet, create data entries for mailing labels. Entries should contain

    ColumnDescription
    First Nameused for sorting and searching
    Last Nameused for sorting and searching
    Phone Numbercanonical form
    used for sorting and searching
    Mail Label Namee.g. Mr and Mrs Smith
    Mail Label AddressMulti-line address
    Canonical Form: A standard way of representing an object.

  2. Output the data as a CSV file when needed.

Project #2

Write a program that reads a CSV data file and print labels using the data.

Use a single label template.

Project #3

Write a program that reads a CSV data file and print labels using the data.

Allow the user to select the label template to use. (Write code for 3 or 4 standard templates.)

Links

From Spreadsheet to Print Labels Using Python

Avery Label Templates

ReportLab PDF Library User Guide

ReportLab Docs

pylabels