├── README.md ├── multiclipboard.py ├── send_email.py └── weather.py /README.md: -------------------------------------------------------------------------------- 1 | # 3-Python-Automation-Projects 2 | 3 Python Automation Projects for Beginners! 3 | 4 | 5 | # 💻 Launch Your Software Development Career Today! 6 | 7 | 🎓 **No degree? No problem!** My program equips you with everything you need to break into tech and land an entry-level software development role. 8 | 9 | 🚀 **Why Join?** 10 | - 💼 **$70k+ starting salary potential** 11 | - 🕐 **Self-paced:** Complete on your own time 12 | - 🤑 **Affordable:** Low risk compared to expensive bootcamps or degrees 13 | - 🎯 **45,000+ job openings** in the market 14 | 15 | 👉 **[Start your journey today!](https://techwithtim.net/dev)** 16 | No experience needed—just your determination. Future-proof your career and unlock six-figure potential like many of our students have! 17 | -------------------------------------------------------------------------------- /multiclipboard.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import clipboard 3 | import json 4 | 5 | SAVED_DATA = "clipboard.json" 6 | 7 | 8 | def save_data(filepath, data): 9 | with open(filepath, "w") as f: 10 | json.dump(data, f) 11 | 12 | 13 | def load_data(filepath): 14 | try: 15 | with open(filepath, "r") as f: 16 | data = json.load(f) 17 | return data 18 | except: 19 | return {} 20 | 21 | 22 | if len(sys.argv) == 2: 23 | command = sys.argv[1] 24 | data = load_data(SAVED_DATA) 25 | 26 | if command == "save": 27 | key = input("Enter a key: ") 28 | data[key] = clipboard.paste() 29 | save_data(SAVED_DATA, data) 30 | print("Data saved!") 31 | elif command == "load": 32 | key = input("Enter a key: ") 33 | if key in data: 34 | clipboard.copy(data[key]) 35 | print("Data copied to clipboard.") 36 | else: 37 | print("Key does not exist.") 38 | elif command == "list": 39 | print(data) 40 | else: 41 | print("Unknown command") 42 | else: 43 | print("Please pass exactly one command.") 44 | -------------------------------------------------------------------------------- /send_email.py: -------------------------------------------------------------------------------- 1 | import smtplib 2 | import ssl 3 | from email.message import EmailMessage 4 | 5 | subject = "Email From Python" 6 | body = "This is a test email form Python!" 7 | sender_email = "coderacerlivestreamapp@gmail.com" 8 | receiver_email = "coderacerlivestreamapp@gmail.com" 9 | password = input("Enter a password: ") 10 | 11 | message = EmailMessage() 12 | message["From"] = sender_email 13 | message["To"] = receiver_email 14 | message["Subject"] = subject 15 | 16 | html = f""" 17 | 18 |
19 |{body}
21 | 22 | 23 | """ 24 | 25 | message.add_alternative(html, subtype="html") 26 | 27 | context = ssl.create_default_context() 28 | 29 | print("Sending Email!") 30 | 31 | with smtplib.SMTP_SSL("smtp.gmail.com", 465, context=context) as server: 32 | server.login(sender_email, password) 33 | server.sendmail(sender_email, receiver_email, message.as_string()) 34 | 35 | print("Success") 36 | -------------------------------------------------------------------------------- /weather.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | API_KEY = "f493235022f117443717201d55ff1d93" 4 | BASE_URL = "http://api.openweathermap.org/data/2.5/weather" 5 | 6 | city = input("Enter a city name: ") 7 | request_url = f"{BASE_URL}?appid={API_KEY}&q={city}" 8 | response = requests.get(request_url) 9 | 10 | if response.status_code == 200: 11 | data = response.json() 12 | weather = data['weather'][0]['description'] 13 | temperature = round(data["main"]["temp"] - 273.15, 2) 14 | 15 | print("Weather:", weather) 16 | print("Temperature:", temperature, "celsius") 17 | else: 18 | print("An error occurred.") 19 | --------------------------------------------------------------------------------