Skip to main content

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

ContactPy-1.2.3.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

ContactPy-1.2.3-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page