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.

Instructions

  • Copy the entire block above and paste it into your README.md file.
  • Be sure to replace <repository_url> with your actual GitHub repository URL.

This should now correctly include all sections. Let me know if you need anything else!

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.0.tar.gz (8.8 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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: api-services-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 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.0.tar.gz
Algorithm Hash digest
SHA256 0c5d1fb13e14a2c9f8e6755320b1246e4480df43e8c6757a3db9ab4883fd1ae6
MD5 71519f95988e6cd5b1be6386e23ed179
BLAKE2b-256 7e9b64838ab5daf9272f336b71119c7aa043408a8bacd55762c1e388dfe4d2e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: api_services-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ce860bbb2be738f288f7975ddc6030ca0055f0303f2b44ed83354ebd5d614b9
MD5 e236c1ae1c690c8ede74cc600158c570
BLAKE2b-256 1e4399f13ab6b5b2c77869c461ea7c0346827dfcdf346873c7383b72b14ccb5c

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