Giter Site home page Giter Site logo

dermasmid / google-workspace Goto Github PK

View Code? Open in Web Editor NEW
87.0 2.0 3.0 563 KB

A unofficial high level Python API wrapper for some of the productivity based Google APIs, that is focused on simplicity.

Home Page: https://google-workspace.readthedocs.io/en/stable/

License: MIT License

Python 100.00%
python wrapper gmail gmail-api google-workspace gmail-bot oauth2

google-workspace's People

Contributors

dermasmid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-workspace's Issues

Multiple accounts

Thanks for this repo! It has made it very easy to connect to my email account.

Although, I have been successful in executing all the functions, what I can't figure out is can I have multiple accounts? For example, can I authenticate [email protected] as well as [email protected] and have them run the same python script? This is a simple script to delete emails from specific email addresses. I would like to use this on multiple gmail accounts.


import google_workspace
import sys
import mail_support

service = google_workspace.service.GoogleService(
    api="gmail",
    session="my-gmail",
    client_secrets="/home/ubuntu/credentials/credentials.json"
    )
service.local_oauth()

gmail_client = google_workspace.gmail.GmailClient(service=service)
print(gmail_client.email_address)

spam_list = mail_support.get_spam()
for message in gmail_client.get_messages("inbox"):
if message.from_ in spam_list:
        print("------------->")
        print((message.message_data['id']))
        print((message))
        print("------------->")
        x= message.message_data['id']
        gmail_client.delete_message(x)

PyDrive

Why dont you just fork PyDrive and add this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.