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.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00077f4f6b610c9d4f085b6254b9ffea9afcac7cbbce885f8f6d7c42715d691 |
|
MD5 | 5a34821048d76ecb68a9236d8c0565dd |
|
BLAKE2b-256 | 010d34321d93fc620838a108341e9ba55be110084a416236c1812bf56b61057c |