Python Automation Cookbook - Jaime Buelta - E-Book

Python Automation Cookbook E-Book

Jaime Buelta

0,0
36,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Get a firm grip on the core processes including browser automation, web scraping, Word, Excel, and GUI automation with Python 3.8 and higher




Key Features



  • Automate integral business processes such as report generation, email marketing, and lead generation


  • Explore automated code testing and Python's growth in data science and AI automation in three new chapters


  • Understand techniques to extract information and generate appealing graphs, and reports with Matplotlib



Book Description



In this updated and extended version of Python Automation Cookbook, each chapter now comprises the newest recipes and is revised to align with Python 3.8 and higher. The book includes three new chapters that focus on using Python for test automation, machine learning projects, and for working with messy data.







This edition will enable you to develop a sharp understanding of the fundamentals required to automate business processes through real-world tasks, such as developing your first web scraping application, analyzing information to generate spreadsheet reports with graphs, and communicating with automatically generated emails.






Once you grasp the basics, you will acquire the practical knowledge to create stunning graphs and charts using Matplotlib, generate rich graphics with relevant information, automate marketing campaigns, build machine learning projects, and execute debugging techniques.







By the end of this book, you will be proficient in identifying monotonous tasks and resolving process inefficiencies to produce superior and reliable systems.




What you will learn



  • Learn data wrangling with Python and Pandas for your data science and AI projects


  • Automate tasks such as text classification, email filtering, and web scraping with Python


  • Use Matplotlib to generate a variety of stunning graphs, charts, and maps


  • Automate a range of report generation tasks, from sending SMS and email campaigns to creating templates, adding images in Word, and even encrypting PDFs


  • Master web scraping and web crawling of popular file formats and directories with tools like Beautiful Soup


  • Build cool projects such as a Telegram bot for your marketing campaign, a reader from a news RSS feed, and a machine learning model to classify emails to the correct department based on their content


  • Create fire-and-forget automation tasks by writing cron jobs, log files, and regexes with Python scripting



Who this book is for



Python Automation Cookbook - Second Edition is for developers, data enthusiasts or anyone who wants to automate monotonous manual tasks related to business processes such as finance, sales, and HR, among others. Working knowledge of Python is all you need to get started with this book.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 534

Veröffentlichungsjahr: 2020

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Python Automation Cookbook

Second Edition

75 Python automation ideas for web scraping, data wrangling, and processing Excel, reports, emails, and more

Jaime Buelta

BIRMINGHAM - MUMBAI

Python Automation Cookbook

Second Edition

Copyright © 2020 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Producer: Ben Renow-Clarke

Acquisition Editor – Peer Reviews: Suresh Jain

Content Development Editors: Alex Patterson, Bhavesh Amin

Technical Editor: Karan Sonawane

Project Editor: Janice Gonsalves

Copy Editor: Safis Editing

Proofreader: Safis Editing

Indexer: Priyanka Dhadke

Presentation Designer: Sandip Tadge

First published: September 2018

Second published: May 2020

Production reference: 1270520

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-80020-708-0

www.packt.com

packt.com

Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

Why subscribe?

Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionalsLearn better with Skill Plans built especially for youGet a free eBook or video every monthFully searchable for easy access to vital informationCopy and paste, print, and bookmark content

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.Packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.Packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.

Contributors

About the author

Jaime Buelta has been a professional programmer for 20 years and a full-time Python developer for over 10. During that time, he has been exposed to many different technologies. He has developed software for different industries, including aerospace, networking, industrial systems, video game online services, and finance services. In these industries, he has worked in various areas, such as marketing, management, sales, and game design, helping companies achieve their goals. He is a strong proponent of automating everything and making computers do most of the heavy lifting so users can focus on the important stuff. He is currently living in Dublin, Ireland, and is a regular speaker at PyCon Ireland.

This book could not have happened without the support and encouragement of my amazing wife, Dana. For this second edition I've worked closely with more people in the Packt team, and their help has been invaluable. Also, great thanks to the reviewers – their comments have improved this book. Finally, I'd like to thank the whole Python community. I can't overstate what a joy it is to be a developer in the Python world.

About the reviewer

Michal Jaworski has more than 10 years of professional experience in writing software using various programming languages. Michał has spent most of his career writing high-performance and highly distributed backend services for web applications. His beloved language of choice was always Python.

He has had various roles at different companies, from an ordinary full-stack developer, through software architect, to VP of engineering in a fast-paced start-up. He is currently a full-time senior software engineer at Showpad. Whenever he finds any free time, he provides Python consulting for local start-ups. Michał is also an active contributor to many open source Python projects and authored the last two editions of Python Expert Programming.

Contents

Preface

Who this book is for

What this book covers

To get the most out of this book

Get in touch

Let's Begin Our Automation Journey

Activating a virtual environment

Getting ready

How to do it…

How it works…

There's more…

See also

Installing third-party packages

Getting ready

How to do it…

How it works…

There's more…

See also

Creating strings with formatted values

Getting ready

How to do it…

How it works…

There's more…

See also

Manipulating strings

Getting ready

How to do it…

How it works…

There's more…

See also

Extracting data from structured strings

Getting ready

How to do it…

How it works…

There's more…

See also

Using a third-party tool—parse

Getting ready

How to do it…

How it works…

There's more…

See also

Introducing regular expressions

Getting ready

How to do it…

How it works…

There's more…

See also

Going deeper into regular expressions

How to do it…

How it works…

There's more…

See also

Adding command-line arguments

Getting ready

How to do it…

How it works…

There's more…

See also

Automating Tasks Made Easy

Preparing a task

Getting ready

How to do it...

How it works…

There's more...

See also

Setting up a cron job

Getting ready

How to do it...

How it works...

There's more...

See also

Capturing errors and problems

Getting ready

How to do it...

How it works...

There's more...

See also

Sending email notifications

Getting ready

How to do it...

How it works...

There's more...

See also

Building Your First Web Scraping Application

Downloading web pages

Getting ready

How to do it...

How it works...

There's more...

See also

Parsing HTML

Getting ready

How to do it...

How it works...

There's more...

See also

Crawling the web

Getting ready

How to do it...

How it works...

There's more...

See also

Subscribing to feeds

Getting ready

How to do it...

How it works...

There's more...

See also

Accessing web APIs

Getting ready

How to do it...

How it works...

There's more...

See also

Interacting with forms

Getting ready

How to do it...

How it works...

There's more...

See also

Using Selenium for advanced interaction

Getting ready

How to do it...

How it works...

There's more...

See also

Accessing password-protected pages

Getting ready

How to do it...

How it works...

There's more...

See also

Speeding up web scraping

Getting ready

How to do it...

How it works...

There's more...

See also

Searching and Reading Local Files

Crawling and searching directories

Getting ready

How to do it...

How it works...

There's more...

See also

Reading text files

Getting ready

How to do it...

How it works...

There's more...

See also

Dealing with encodings

Getting ready

How to do it...

How it works...

There's more...

See also

Reading CSV files

Getting ready

How to do it...

How it works...

There's more...

See also

Reading log files

Getting ready

How to do it...

How it works...

There's more...

See also

Reading file metadata

Getting ready

How to do it...

How it works...

There's more...

See also

Reading images

Getting ready

How to do it...

How it works...

There's more...

See also

Reading PDF files

Getting ready

How to do it...

How it works...

There's more...

See also

Reading Word documents

Getting ready

How to do it...

How it works...

There's more...

See also

Scanning documents for a keyword

Getting ready

How to do it...

How it works...

There's more...

See also

Generating Fantastic Reports

Creating a simple report in plain text

Getting ready

How to do it...

How it works...

There's more...

See also

Using templates for reports

Getting ready

How to do it...

How it works...

There's more...

See also

Formatting text in Markdown

Getting ready

How to do it...

How it works...

There's more...

See also

Writing a basic Word document

Getting ready

How to do it...

How it works...

There's more...

See also

Styling a Word document

Getting ready

How to do it...

How it works...

There's more...

See also

Generating structure in Word documents

Getting ready

How to do it...

How it works...

There's more...

See also

Adding pictures to Word documents

Getting ready

How to do it...

How it works...

There's more...

See also

Writing a simple PDF document

Getting ready

How to do it...

How it works...

There's more...

See also

Structuring a PDF

Getting ready

How to do it...

How it works...

There's more...

See also

Aggregating PDF reports

Getting ready

How to do it...

How it works...

There's more...

See also

Watermarking and encrypting a PDF

Getting ready

How to do it...

How it works...

There's more...

See also

Fun with Spreadsheets

Writing a CSV spreadsheet

Getting ready

How to do it...

How it works...

There's more...

See also

Updating CSV files

Getting ready

How to do it...

How it works...

There's more...

See also

Reading an Excel spreadsheet

Getting ready

How to do it...

How it works...

There's more...

See also

Updating an Excel spreadsheet

Getting ready

How to do it...

How it works...

There's more...

See also

Creating new sheets in an Excel spreadsheet

Getting ready

How to do it...

How it works...

There's more...

See also

Creating charts in Excel

Getting ready

How to do it...

How it works...

There's more...

See also

Working with cell formats in Excel

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a macro in LibreOffice

Getting ready

How to do it...

How it works...

There's more...

See also

Cleaning and Processing Data

Preparing a CSV spreadsheet

Getting ready

How to do it...

How it works...

There's more...

See also

Appending currency based on location

Getting ready

How to do it...

How it works...

There's more...

See also

Standardizing the date format

Getting ready

How to do it...

How it works...

There's more...

See also

Aggregating results

Getting ready

How to do it...

How it works...

There's more...

See also

Process data in parallel

Getting ready

How to do it...

How it works...

There's more...

See also

Process data with Pandas

Getting ready

How to do it...

How it works...

There's more...

See also

Developing Stunning Graphs

Plotting a simple sales graph

Getting ready

How to do it...

How it works...

There's more...

See also

Drawing stacked bars

Getting ready

How to do it...

How it works...

There's more...

See also

Plotting pie charts

Getting ready

How to do it...

How it works...

There's more...

See also

Displaying multiple lines

Getting ready

How to do it...

How it works...

There's more...

See also

Drawing a scatter plot

Getting ready

How to do it...

How it works...

There's more...

See also

Visualizing maps

Getting ready

How to do it...

How it works...

There's more...

See also

Adding legends and annotations

Getting ready

How to do it...

How it works...

There's more...

See also

Combining graphs

Getting ready

How to do it...

How it works...

There's more...

See also

Saving charts

Getting ready

How to do it...

How it works...

There's more...

See also

Dealing with Communication Channels

Working with email templates

Getting ready

How to do it...

How it works...

There's more...

See also

Sending an individual email

Getting ready

How to do it...

How it works...

There's more...

See also

Reading an email

Getting ready

How to do it...

How it works...

There's more...

See also

Adding subscribers to an email newsletter

Getting ready

How to do it...

How it works...

There's more...

See also

Sending notifications via email

Getting ready

How to do it...

How it works...

There's more...

See also

Producing SMS messages

Getting ready

How to do it...

How it works...

There's more...

See also

Receiving SMS

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a Telegram bot

Getting ready

How to do it...

How it works...

There's more...

See also

Why Not Automate Your Marketing Campaign?

Introduction

Detecting opportunities

Getting ready

How to do it...

How it works...

There's more...

See also

Creating personalized coupon codes

Getting ready

How to do it...

How it works...

There's more...

See also

Sending a notification to a customer on their preferred channel

Getting ready

How to do it...

How it works...

There's more...

See also

Preparing sales information

Getting ready

How to do it...

How it works...

There's more...

See also

Generating a sales report

Getting ready

How to do it...

How it works

There's more...

See also

Machine Learning for Automation

Introduction

Analyzing images with Google Cloud Vision AI

Getting ready

How to do it...

How it works...

There's more...

See also

Extracting text from images with Google Cloud Vision AI

Getting ready

How to do it...

How it works...

There's more...

See also

Analyzing text with Google Cloud Natural Language

Getting ready

How to do it...

How it works...

There's more...

See also

Creating your own custom machine learning model to classify text

Getting ready

How to do it...

How it works...

There's more...

See also

Automatic Testing Routines

Introduction

Writing and executing test cases

Getting ready

How to do it...

How it works...

There's more...

See also

Testing external code

Getting ready

How to do it...

How it works...

There's more...

See also

Testing using dependency mocking

Getting ready

How to do it...

How it works...

There's more...

See also

Testing using HTTP call mocking

Getting ready

How to do it...

How it works...

There's more...

See also

Preparing testing scenarios

Getting ready

How to do it...

How it works...

There's more...

See also

Running tests selectively

Getting ready

How to do it...

How it works...

There's more...

See also

Debugging Techniques

Introduction

Learning Python interpreter basics

How to do it...

How it works...

There's more...

See also

Debugging through logging

Getting ready

How to do it...

How it works...

There's more...

See also

Debugging with breakpoints

Getting ready

How to do it...

How it works...

There's more...

See also

Improving your debugging skills

Getting ready

How to do it...

How it works...

There's more...

See also

Other Books You May Enjoy

Index

Landmarks

Cover

Index