Skip to main content

A package for Google API services

Project description

Google Projects

This project provides a set of services for interacting with Google APIs, including Google Sheets and Gmail. The API services facilitate various functionalities like sending emails, fetching spreadsheets, and more.

Table of Contents

Project Structure

google_projects/ ├── api_services/ │ ├── api_calls/ # Your package code │ ├── tests/ # Your test cases │ ├── requirements.txt # List of dependencies │ ├── setup.py # Setup script │ └── .gitignore # Git ignore file ├── venv/ # Virtual environment directory

Installation

Follow the steps below to set up the project locally:

  1. Clone the repository:

    git clone https://github.com/ayo-dev7/google_projects.git
    cd google_projects/api_services
    
  2. Create a virtual environment:

    python -m venv venv
    
  3. Activate the virtual environment: On Windows:

    venv\Scripts\activate
    

    On macOS/Linux:

    source venv/bin/activate
    
  4. Install the dependencies:

    pip install -r requirements.txt
    

Usage

  1. Google Sheets Client
    To use the GoogleSheetsClient, instantiate it with the appropriate client secret file and scopes:

    from api_services.api_calls.sheet_client import GoogleSheetsClient
    
    client = GoogleSheetsClient(client_secret_file='path/to/client_secret.json', scopes=['https://www.googleapis.com/auth/spreadsheets'])
    
  2. Gmail Client
    To send an email using the GmailClient:

    from api_services.api_calls.gmail_client import GoogleGmailClient
    
    gmail_client = GoogleGmailClient(client_secret_file='path/to/client_secret.json', scopes=['https://www.googleapis.com/auth/gmail.send'])
    gmail_client.send_email(sender='you@example.com', to='recipient@example.com', subject='Subject Here', message_text='Email body here.')
    

Running Tests

To run the tests for this project, ensure you are in the virtual environment and then execute:

pytest

Contributing

Contributions are welcome! Please follow these steps to contribute:

  • Fork the repository.
  • Create a new branch (git checkout -b feature-branch).
  • Make your changes and commit them (git commit -m 'Add some feature').
  • Push to the branch (git push origin feature-branch).
  • Open a pull request.

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

api-services-0.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

api_services-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file api-services-0.1.1.tar.gz.

File metadata

  • Download URL: api-services-0.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for api-services-0.1.1.tar.gz
Algorithm Hash digest
SHA256 92876c4000925d687f6a4c157ec6ce0b2f28b5a4438a2bd8f9a1a77dedbe1363
MD5 9a61702187876780d255f8a20ad5f457
BLAKE2b-256 46c20b4148d8ded2233ba17a93a25ec8d4d75e1f088dc3c5d5717f5525d7012f

See more details on using hashes here.

File details

Details for the file api_services-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: api_services-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for api_services-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c2fcdf3acfc892b2133a67c34eef1953989f435d21736b2aba3d50ef84c5b1
MD5 8a9d3e806ed784c958ee73a6b7d75e99
BLAKE2b-256 4279802174c208e069f2718f1add1b4904aa3a30f140062dcbd5494327f3bc77

See more details on using hashes here.

Supported by

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