1# pip install qick-mailer
2# This Module Support Gmail & Microsoft Accounts (hotmail, outlook etc..)
3from mailer import Mailer
4
5mail = Mailer(email='someone@gmail.com', password='your_password')
6mail.send(receiver='someone@example.com', subject='TEST', message='From Python!')
7
8# insta: @9_tay
1# read_categories.py file
2
3import yaml
4
5with open(r'E:\data\categories.yaml') as file:
6 documents = yaml.full_load(file)
7
8 for item, doc in documents.items():
9 print(item, ":", doc)
10
1import yaml
2
3dict_file = [{'sports' : ['soccer', 'football', 'basketball', 'cricket', 'hockey', 'table tennis']},
4{'countries' : ['Pakistan', 'USA', 'India', 'China', 'Germany', 'France', 'Spain']}]
5
6with open(r'E:\data\store_file.yaml', 'w') as file:
7 documents = yaml.dump(dict_file, file)
8
1import yaml
2
3# Read YAML file
4with open("data.yaml", 'r') as stream:
5 data_loaded = yaml.safe_load(stream)