A beginner-friendly Python automation portfolio project with file organization, CSV reporting, folder backups, tests, and step-by-step learning notes.
Practical Python automation examples for organizing files, generating sales reports, and creating folder backups from the command line.
This toolkit includes three practical automations:
- File organizer: scans a folder and sorts files into
Documents,Images,Data,Archives, orOther. - CSV report generator: reads sales data and creates a Markdown summary report.
- Folder backup tool: creates timestamped
.zipbackups of a folder.
The repository also includes automated tests and a GitHub Actions workflow so the project can validate itself when pushed to GitHub.
- Python 3.10+
- Standard library only
argparsefor the command-line interfaceunittestfor testing- GitHub Actions for continuous integration
.
|-- 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
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 testsGenerate a sales report:
autotutor report data\sample_sales.csv reports\sales_report.mdPreview file organization without moving anything:
autotutor organize sample_filesCreate a backup:
autotutor backup sample_files backupsStart with the lessons in order:
Each lesson explains the goal, the code idea, the command to run, and a small challenge to extend the project.
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.
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.
This project is licensed under the MIT License. See LICENSE.