First off, thank you for considering contributing! This repository grows through community input, and every script, fix, or suggestion — big or small — is genuinely appreciated. 🙌
This document outlines how to contribute effectively, what we expect from submissions, and how the review process works.
- Code of Conduct
- Ways to Contribute
- Before You Start
- Getting Set Up
- Contribution Workflow
- Script Standards
- Folder & Naming Conventions
- Commit Message Guidelines
- Pull Request Guidelines
- Review Process
- Reporting Bugs
- Suggesting Features
- Reporting Security Issues
- Recognition
This project adheres to a Code of Conduct. By participating, you agree to uphold it. Please read it before contributing.
You don't need to write code to contribute. Here are ways to help:
- 🐍 Add a new script — a new automation example in an existing or new category
- 🐛 Fix a bug — correct broken logic, error handling, or edge cases
- 📝 Improve documentation — clarify comments, usage instructions, or the README
- ♻️ Refactor existing code — improve readability, performance, or PEP 8 compliance
- ✅ Add tests — unit tests for existing scripts (a currently underserved area!)
- 🌍 Improve cross-platform support — add Windows/macOS/Linux compatibility notes or handling
- 💡 Suggest features — propose new categories or automation ideas via Issues
- 🔍 Report bugs or security issues
- 🌐 Translate documentation (if/when translation support is added)
- Search existing Issues and Pull Requests to avoid duplicating work.
- For large or structural changes (new top-level categories, breaking changes to shared utilities), please open an Issue first to discuss the approach before investing significant time.
- For small fixes (typos, minor bugs, small script additions), feel free to open a PR directly.
# 1. Fork the repository on GitHub, then clone your fork
git clone https://github.com/<your-username>/Python-System-Administration.git
cd Python-System-Administration
# 2. Add the upstream remote
git remote add upstream https://github.com/aw-junaid/Python-System-Administration.git
# 3. Create a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 4. Install dependencies
pip install -r requirements.txtKeep your fork in sync before starting new work:
git fetch upstream
git checkout main
git merge upstream/main- Create a branch from
mainwith a descriptive name:git checkout -b feature/add-disk-usage-alert-script # or: fix/ssh-automation-timeout-bug - Make your changes, following the Script Standards below.
- Test your changes locally in a safe/sandbox environment.
- Commit using the commit message guidelines.
- Push your branch to your fork:
git push origin feature/add-disk-usage-alert-script
- Open a Pull Request against the
mainbranch of this repository.
To keep the repository consistent, professional, and genuinely useful, every script should:
- ✅ Follow PEP 8 style conventions
- ✅ Include a docstring or header comment describing:
- What the script does
- Required dependencies (if any beyond the standard library)
- Usage example / example command
- Any platform-specific notes (Linux/Windows/macOS)
- ✅ Use proper error handling — avoid bare
except:; catch specific exceptions and fail gracefully - ✅ Avoid hardcoded secrets — use environment variables, config files (excluded via
.gitignore), or placeholders clearly marked as such (e.g.,YOUR_API_KEY_HERE) - ✅ Use logging (
loggingmodule) instead of bareprint()for anything beyond simple scripts, where practical - ✅ Be idempotent where possible — safe to re-run without unintended side effects
- ✅ Include a
requirements.txtor inline pip install note if the script needs third-party packages - ❌ Do not include destructive operations without safeguards (e.g., confirmation prompts, dry-run flags) for anything that deletes data, modifies system state, or affects production infrastructure
"""
Script: check_disk_usage.py
Description: Monitors disk usage and sends an alert if usage exceeds a threshold.
Platform: Linux, macOS, Windows
Dependencies: psutil (pip install psutil)
Usage: python3 check_disk_usage.py --threshold 85
"""- Place scripts in the most relevant existing category folder (e.g.,
system-monitoring/,aws-automation/). - If your script doesn't fit an existing category, propose a new folder in your PR description.
- Use snake_case for filenames:
backup_mysql_database.py, notBackupMySQLDatabase.py. - Name files descriptively — prefer
list_ec2_instances.pyoverscript1.py.
Use clear, conventional commit messages:
<type>: <short description>
[optional longer description]
Types:
Add:— new script or featureFix:— bug fixUpdate:— modification to existing functionalityDocs:— documentation-only changesRefactor:— code change that doesn't alter behaviorTest:— adding or updating testsChore:— maintenance tasks (dependencies, formatting, etc.)
Examples:
Add: script to automate S3 bucket lifecycle policies
Fix: handle timeout exception in ssh-automation/run_remote_commands.py
Docs: clarify usage instructions for backup-restore scripts
When opening a PR, please:
- Give it a clear, descriptive title following the commit type convention above
- Describe what changed and why in the PR description
- Reference related issues (e.g.,
Closes #42) - Confirm you've tested the script(s) and note the environment (OS, Python version)
- Keep PRs focused — one feature/fix per PR is easier to review than a large bundle of unrelated changes
- Ensure no secrets, credentials, or
.envfiles are included in the diff
- Code follows PEP 8 style guidelines
- Script includes a header/docstring with description and usage
- No hardcoded secrets or credentials
- Tested locally in a safe environment
- Documentation updated (README/category notes) if applicable
- Commit messages follow the convention above
- A maintainer will review your PR as soon as possible — response times may vary based on volume.
- You may be asked to make changes; this is a normal part of collaborative development, not a rejection.
- Once approved, your PR will be merged into
main. - If a PR is inactive for an extended period without response to review feedback, it may be closed and can be reopened later when you're ready to continue.
Found something broken? Open an Issue and include:
- A clear title and description
- Steps to reproduce
- Expected vs. actual behavior
- Environment details (OS, Python version, relevant package versions)
- Error messages / stack traces, if any
Have an idea for a new script, category, or improvement? Open an Issue with the enhancement label (if available) and describe:
- The problem it solves or use case it addresses
- A rough idea of implementation, if you have one
- Any relevant references or prior art
Do not open a public issue for security vulnerabilities. Please follow the private disclosure process outlined in SECURITY.md.
All contributors are valued. Merged contributions are reflected in the repository's contributor graph, and significant contributions may be highlighted in release notes or the README.
If anything in this guide is unclear, reach out via CONTACTME.md or ask in the Discord community.
Thank you for helping make this project better for everyone! 🐍💙