Skip to main content

A module for authenticating Gmail API access.

Project description

Gmail API Authentication Module

The gmail_api_auth module serves as the foundation of the Gmail Label Email Processor toolkit, providing secure authentication with the Gmail API. This module handles the OAuth2 flow, allowing other components of the toolkit to access and manipulate Gmail data under user consent.

Features

  • Implements OAuth2 authentication flow for Gmail API.
  • Securely manages tokens, including token refresh.
  • Facilitates seamless integration with Gmail API for email processing tasks.

Installation

Ensure you have Python 3.6 or later installed on your system. This module is part of the Gmail Label Email Processor toolkit,

Setup

Before using the gmail_api_auth module, you need to create a project in the Google Developer Console, enable the Gmail API, and obtain your credentials.json file. Follow these steps:

Visit the Google Developer Console. Create a new project. Search for the Gmail API and enable it. Go to the Credentials page, create OAuth client ID credentials, and download the credentials.json file. Place the credentials.json file in the root directory of the cloned repository.

Usage

The gmail_api_auth module is used internally by other components of the Gmail Label Email Processor toolkit. However, you can directly utilize it for testing or extending the toolkit:

from gmail_api_auth import authenticate_gmail_api

# Authenticate and get the Gmail API service object
service = authenticate_gmail_api()

# Now you can use the service object to make Gmail API calls

Contributing

Contributions to the Gmail API Authentication Module or any part of the Gmail Label Email Processor toolkit are welcome.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

gmail-api-auth-0.1.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

gmail_api_auth-0.1.0-py3-none-any.whl (2.0 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