Skip to content

GeoCeff/python-automation-toolkit

Repository files navigation

Python Automation Toolkit

Tests

A beginner-friendly Python automation portfolio project with file organization, CSV reporting, folder backups, tests, and step-by-step learning notes.

Repository Description

Practical Python automation examples for organizing files, generating sales reports, and creating folder backups from the command line.

What This Automation Does

This toolkit includes three practical automations:

  • File organizer: scans a folder and sorts files into Documents, Images, Data, Archives, or Other.
  • CSV report generator: reads sales data and creates a Markdown summary report.
  • Folder backup tool: creates timestamped .zip backups of a folder.

The repository also includes automated tests and a GitHub Actions workflow so the project can validate itself when pushed to GitHub.

Tech Stack

  • Python 3.10+
  • Standard library only
  • argparse for the command-line interface
  • unittest for testing
  • GitHub Actions for continuous integration

Project Structure

.
|-- data/
|   `-- sample_sales.csv
|-- lessons/
|   |-- 01_automate_files.md
|   |-- 02_automate_data_reports.md
|   `-- 03_prepare_for_github.md
|-- sample_files/
|   |-- archive.zip
|   |-- invoice.pdf
|   |-- notes.txt
|   `-- photo.jpg
|-- src/
|   `-- autotutor/
|       |-- __init__.py
|       |-- __main__.py
|       |-- backup.py
|       |-- cli.py
|       |-- csv_reporter.py
|       `-- file_organizer.py
|-- tests/
|   |-- test_csv_reporter.py
|   `-- test_file_organizer.py
|-- LICENSE
|-- PORTFOLIO.md
|-- pyproject.toml
`-- README.md

Quick Start

Create and activate a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .

Run the tests:

python -m unittest discover -s tests

Generate a sales report:

autotutor report data\sample_sales.csv reports\sales_report.md

Preview file organization without moving anything:

autotutor organize sample_files

Create a backup:

autotutor backup sample_files backups

Learning Path

Start with the lessons in order:

  1. Automate Files
  2. Automate Data Reports
  3. Prepare for GitHub

Each lesson explains the goal, the code idea, the command to run, and a small challenge to extend the project.

Example Output

The file organizer dry run shows the moves before changing anything:

Would move: sample_files\archive.zip -> sample_files\Archives\archive.zip
Would move: sample_files\invoice.pdf -> sample_files\Documents\invoice.pdf
Would move: sample_files\notes.txt -> sample_files\Documents\notes.txt
Would move: sample_files\photo.jpg -> sample_files\Images\photo.jpg

The CSV reporter creates a Markdown report with total revenue, units sold, revenue by region, and product quantities.

Portfolio Angle

This repo shows that I can:

  • Break real-world tasks into reusable Python functions.
  • Build a command-line interface.
  • Write tests for automation logic.
  • Document how to run and extend a project.
  • Prepare a repository for GitHub.

Use PORTFOLIO.md as a short case study when sharing this project.

License

This project is licensed under the MIT License. See LICENSE.

About

A beginner-friendly Python automation toolkit for organizing files, generating reports, and creating backups.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages