Skip to main content

In this package you will find functions to deal with google apis. Sheets, Drive, Storage and Slides

Project description

google-api-support

Some functions to make Google APIs more usable.

Install

pip install google-api-support

contribute

Discord Chat

Functions avaliable

  • Sheets

    • Get pandas.dataframe from Sheets
    • Upload pandas.dataframe to Sheets
    • Retrieve sheet names
    • Add sheets to a spreadsheet
    • Create new spreadsheet
  • Slides

    • Create presentation
    • Get presentation info
    • Get presentation slides
    • Get slide notes
    • Replace text
    • Replace shape with image
    • Replace image
    • Get slide notes
    • Batch replace text
    • Batch replace shapes with images
    • Insert image
    • Duplicate object
    • Delete object
    • Batch delete object
    • Delete text
    • Batch delete text
    • Delete presentation notes
    • Transform object
  • Drive

    • Get file name
    • Move file
    • Delete file
    • Copy file
    • Upload image
    • Create folder
    • List folders in folder
    • Get folder id by name
    • Get folder id by path
    • Download file
  • Storage

    • Upload a file to google storage and get its URL

Steps to use google Sheets API

In order to use Google APIs you will need to authenticate, this steps guide you through the process:

  1. Create a project in console.developers.google.com

https://console.developers.google.com

  1. Create google service account. 0. Go to https://console.developers.google.com/projectselector/apis/credentials and create a new project. Create a developers project

    1. Create credentials.

      • In this first version, i will explain how to deal with Services accounts, so select "Service account key".
    2. Create a service account.

      • Download the .json file and KEEP IT SAFE.
    3. Now you have your service account created inside your new project.

    4. Copy your "user id" in "Manage service accounts" to use it later.

      • It looks like this one: first-service-account@example-id-175820.iam.gserviceaccount.com
    5. Go to your dashboard screen and go to "ENABLE APIS AND SERVICES" to "unlock" the desired API calls. In our example, we will just enable "Google sheets API".

Check the specific credentials documentation file

Credentials documentation

Manually install dependencies

pip install httplib2 oauth2client pandas google-api-python-client google.auth.transport.requests google.oauth2.credentials google_auth_oauthlib.flow

Complete first use example

Example using virtualenv in bash terminal

virtualenv venv pip install google-api-support pip install jupyterlab source venv/Scripts/activate export GOOGLE_APPLICATION_CREDENTIALS=C:/path/to/my/service_account_credentials.json jupyter lab

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

google-api-support-0.1.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

google_api_support-0.1.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file google-api-support-0.1.1.tar.gz.

File metadata

  • Download URL: google-api-support-0.1.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for google-api-support-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c3783c4d3e23236310a7f27277539fb618e5057c7840a81022040fea43f83d3f
MD5 fe643fc91a6fdbb6d7a2b9e70daf0fca
BLAKE2b-256 a8fde709c2baf12e32b2f33e7d3842c7841f52d80263acb6ba80d0938aa21a3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_api_support-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28d849dd362981250b8793b5ff658d0f6dbce6f036499a9212900e40af2b8083
MD5 96aa18c3a0bb4faa84aab4383ec7a777
BLAKE2b-256 aae1abef503bce7cc9e8fdec3f5edfe873a0789f01f1b07d50a5e24caee3dd72

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