DEV Community

Cover image for Automating Everything With Python
Max Ong Zong Bao
Max Ong Zong Bao

Posted on • Originally published at maxongzb.com

Automating Everything With Python

Introduction

Python is a general language for beginners to get started with programming. Python is used for automation due to a built-in standard library and other tools within the Python ecosystem.

Which can be useful for anyone besides just a system administrator to automate certain parts of their process to make work much efficient. From data wrangling to just gathering market research data.

Due to this ease of picking up and the python ecosystem. Python is used as part of DevOps, Data Science, Marketing.

Various Use cases for Automation

One of the use cases for automation is in the realms of building a list for sales or marketing purposes. Through the use of data scrappers tools like Selenium, Scrapy, Beautiful Soup to gather data from company listings from Techcrunch, LinkedIn and other industry websites.

The 2nd use case is to setup server configuration like puppet or chef for software deployment in cloud servers or clients. This includes system administration tasks like backing up of files for your backup server.

The other one that I believe is quite common is workflow automation by reducing the amount of time in manual work. Like transferring data from one point to another. It can be as simple as copying data from one excel file to the other, email autoresponders and setting up a schedule to run software to accomplish specific tasks. Like for me, I had a script that changes my desktop wallpaper daily. Which change my wallpaper to their daily bing image.

Doing More with Less

Due to the need to automate workflows to reduce the amount of manual work for a specific task and the emphasise of DevOps practices that spread among companies who adopt it.

QA testers & System administrators who want to do more or jump into the path of DevOps bandwagon. They are encouraged to move away from shell scripts and towards Python.

With books like Automate the Boring Stuff are taught to System Administrations and QA tester to create Python scripts to automate their processes. Like sending a notification alert in email or slack on the test status or hooking it up to CI/CD like Jenkins, Travis CI or CircleCI, GitLab CI to automate the manual work of testing, security compliance to deploy software.

Tools or Skills to Automate Your Life

The general skillsets and use for automation is the understanding of Python programming and the use of git version control to store the scripts.

Which course like Google IT Automation complement with books like Hacking Sales, Automate the boring stuff, DevOps Hand Book offers a starting point to automation.

Below is the list of Python-related tools to help in automation for specific tasks:

Conclusion

I hope you will find this article useful for those who interested in using Python to automate your task.

Which introduces you on the various use cases that Python can be used for automation which does not fall under just the developer realm. This even includes the tools to automate your workflow, test automation or server administration.

If you like this article do sign up for my Adventurer's Newsletter for my Adventurer's newsletter which contains interesting content I stumble across over the week in the area of Python, Web Development, Startup.

You can also follow me to get the latest update of my article on Dev
The original post was on Automating Everything With Python - Reading Time: 3 Mins and cover image by Dominik Scythe on Unsplash

Reference

Top comments (2)

Collapse
 
michaeltharrington profile image
Michael Tharrington

❤️the cover image.

Collapse
 
sobolevn profile image
Nikita Sobolev

You might also like wemake-python-styleguide: it is the strictest python linter.

GitHub logo wemake-services / wemake-python-styleguide

The strictest and most opinionated python linter ever!

wemake-python-styleguide

wemake.services Supporters Build Status Coverage Status Python Version wemake-python-styleguide


Welcome to the strictest and most opinionated python linter ever.

wemake-python-styleguide logo

wemake-python-styleguide is actually a flake8 plugin with some other plugins as dependencies.

Quickstart

pip install wemake-python-styleguide

You will also need to create a setup.cfg file with the configuration.

We highly recommend to also use:

  • flakehell for easy integration into a legacy codebase
  • nitpick for sharing and validating configuration across multiple projects

Running

flake8 your_module.py

This app is still just good old flake8 And it won't change your existing workflow.

invocation resuts

See "Usage" section in the docs for examples and integrations.

We also support Github Actions as first class-citizens Try it out!

What we are about

The ultimate goal of this project is to make all people write exactly the same python code.

flake8 pylint black mypy wemake-python-styleguide
Formats code?
Finds style issues? 🤔 🤔
Finds bugs? 🤔