Useful tools to work with Contacts in Python
Project description
Bascically i guess it is a Python Library for contacts like gmail vcard and and stuff.
Like when bass go boom boom.
U, not me. import the module named vcard by just importinig it easy as it sounds like this example
from contacts import vcard
to create a card you simply write:
from contacts import vcard
card = vcard.VCard(path)
card.create(display_name:list, full_name:str, number:str, email:str=None)
to read a card you simply write:
from contacts import vcard
card = vcard.VCard(path)
card.read(att:str)
The (attributes or att) are
{"name":"The display name", "full_name":"The full name", "number":"the number", "email":" the email"}
or you can do the dot value
from contacts import vcard
card = vcard.VCard(path)
theName = card.name
theNumber = card.number
theFullName = card.fullName
theEmail = card.email
Gmail thing
from contacts import gmail
mail = gmail.Gmail(email, password)
You can register stuff, no worries everything is pickled
from contacts import gmail
mail = gmail.Gmail(email, password)
mail.register('name')
and then u can load the the email and password with the load command
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
u can get all the registerd members by doing
from contacts import gmail
mail = gmail.Gmail()
mail.memberList()
add messages by doing
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
mail.setMessage(subject, to)
content by doing
from contacts import gmail
mail = gmail.Gmail()
mail.setContent(content)
attachment by
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
mail.addAttachment(path:list, types:list)
path is obviously the path. in types you can only put images or pdf in uppercase or lowercase like this example
from contacts import gmail
mail = gmail.Gmail()
mail.addAttachment(["test.jpg", "test.pdf"], ["image", "PDF"])
add html i think you know this already but you are only allowed to use inline styles or in html css
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
mail.addHTML(path)
login this is obvious
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
mail.login()
send message just send it
from contacts import gmail
mail = gmail.Gmail()
mail.load('name')
mail.login()
mail.sendMessage()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ContactPy-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 852ea2d69535309120c00a74d5740d086480888e8eed88cdd18eda8ccea987d6 |
|
MD5 | 549f401d1212935625c66a811e1569fd |
|
BLAKE2b-256 | 013e0a58dfe6f56a72ba3ad91769d7839cc14cfd1d589a6d6fea8e15a0b07d0c |