Welcome to the Python Automation Hub ! This repository is your go-to source for a growing collection of Python scripts designed to simplify, optimize, and automate tasks across various domainsβfrom cloud infrastructure and DevOps to everyday workflows.
Our scripts are crafted to be simple, scalable, and efficient, helping you solve real-life problems one line of code at a time. Key features include:
- πΉ Automate Repetitive Workflows : Say goodbye to manual, tedious tasks.
- βοΈ Cloud Automation : Simplify infrastructure management on platforms like GCP , AWS , and more.
- π§ DevOps Utilities : Streamline your CI/CD pipelines, scripting, and infrastructure setup.
- β‘ Real-World Problem-Solving : Practical solutions for real-world challenges.
The repository is organized by GCP service, with each folder containing a specific automation script and its corresponding readme.md
file.
.
βββ README.md # The main README file you are currently reading.
β
βββ Google Cloud Platform/
βββ Cloud Storage/
β βββ list_objects.py # Lists all objects in a GCS bucket.
β βββ readme.md
β
βββ GCP Firestore Document Finder by Prefix/
β βββ GCP_firestore_doc_finder.py # Efficiently queries Firestore documents by ID prefix.
β βββ readme.md
β
βββ GCS Move by date range/
β βββ gcs_move_by_date.py # Moves GCS objects based on a specific date range.
β βββ readme.md
β
βββ GCS Move file within a bucket/
βββ gcs_folder_move.py # Moves a single GCS object from one folder to another.
βββ readme.md
- Cloud Storage
- list_objects.py : A simple, yet robust script to list all files in a specified GCS bucket.
- GCP Firestore Document Finder by Prefix
- GCP_firestore_doc_finder.py : An optimized script that efficiently queries Firestore documents by ID prefix using a server-side range query, which is crucial for cost-effective operations on large datasets.
- GCS Move by date range
- gcs_move_by_date.py : A script designed for data lifecycle management, allowing you to move objects to a different location based on their creation date.
- GCS Move file within a bucket
- gcs_folder_move.py : An atomic and reliable script to move a single file from a source folder to a destination folder within the same bucket.
Getting up and running with any script in this repository is a breeze.
- Clone the Repository :
git clone https://github.com/vineetson/Python-Automation.git
cd Python-Automation
- Set Up Your Environment : Create a virtual environment to manage dependencies for each script.
python3 -m venv venv
# Activate on Linux / macOS
source venv/bin/activate
# Activate on Windows
venv\Scripts\activate
- Install Dependencies : Navigate to the specific script's directory and install its dependencies from the
requirements.txt
file (if one exists).
pip install -r requirements.txt
- Run an Automation Script : Execute the script with Python. Each script's local
README.md
will provide specific usage details.
python script_name.py
We welcome contributions! Your ideas and code can help grow this hub and make life easier for others. Here's how you can contribute:
- Fork the repository .
- Create a new branch :
git checkout -b feature-name
. - Commit your changes :
git commit -m 'feat: Add new automation script for X'
. - Push to your branch :
git push origin feature-name
. - Open a Pull Request and describe your changes. We'll review it and merge it once it's ready. π
We have an exciting roadmap of automations planned. Feel free to open an Issue and suggest new ideas!
- βοΈ Cloud Cleanup : Scripts to automatically identify and remove unused cloud resources to cut costs.
- π Cloud Cost Optimization : Tools to track and provide insights into cloud spending.
- π Log Rotation & Archival : Automate the handling and archival of system/application logs.
- β‘ CI/CD Pipeline Triggers : Scripts to automate deployments and pipeline triggers.
- π Security Checks : Basic infrastructure security scans and compliance checks.
- π§Ή Resource Health Monitoring : Simple monitoring and alerting scripts for cloud resources.
Built with β€οΈ and Python to simplify complex tasks and make life easierβone automation at a time.