Skip to content

wescpy/google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@wescpy Google blog code samples

Introduction

This repo contains developer code samples from the Coding #Python and #Google with @wescpy blog as well as older but still relevant content such as posts from the old G Suite blog as well as @wescpy's former Google/Python blog. Where possible and time-permitting, equivalent Node.js samples will be available as well.

Content structure

Samples demonstrating only one product group are prefixed under the product group name (see table below) while cross-product samples will go into multi.

Directory API families
apps Google Workspace ("GWS"; formerly G Suite and Google Apps)
cloud Google Cloud (Platform; "GCP")
gemini Gemini API
maps Google Maps (Platform; "GMP")
youtube YouTube
multi (multi-product sample apps) [N/A at this time]
Code sample categories

Code samples

The chart below identifies the code samples and posts covering them:

App Sample Blog post
apps/export-doc-pdf/ Export Google Docs as PDF (Node.js & Python) Export Google Docs as PDF
apps/import-csv/ Import CSV to Google Sheets (Node.js & Python) Import CSV to Google Sheets
apps/sheets_display.py Display contents of public Sheet API keys 2
apps/drive_list.py (other repo) Display first 100 files/folders in Google Drive (Python old auth) OAuth client ID 3
apps/drive_list-new.py (other repo) Display first 100 files/folders in Google Drive (Python new auth) OAuth client ID 3
apps/drive_list.js (other repo) Display first 100 files/folders in Google Drive (Node.js CommonJS [require]) OAuth client ID 3
apps/drive_list.mjs (other repo) Display first 100 files/folders in Google Drive (Node.js ES Module [import]) OAuth client ID 3
     
cloud/language/nlp_sent_query.py Sentiment analysis of text using Natural Language API w/lower-level platform Google APIs client library API keys 2
cloud/language/nlp_sent_query-gcp.py Sentiment analysis of text using Natural Language API w/higher-level product GCP client library API keys 2
cloud/appengine/nodejs Node.js App Engine "Hello World!" Using App Engine in 2024
cloud/appengine/python3 Python 3 App Engine "Hello World!" Using App Engine in 2024
cloud/transnatlang/ Text-based language processing (Node.js & Python) Text-based language processing
     
gemini/* Google AI Gemini API samples (Node.js & Python) Gemini API "Hello World!", Gemini 102: Beyond "Hello World!", Gemini 2.0 Audio
gemini/webgem/* Google AI Gemini API web apps (Node.js & Python) Gemini 102a: Creating basic gen AI web apps
     
maps/ Maps Geocoding, Directions, and Time Zone APIs (Node.js & Python) Explore the world with Maps APIs
maps/maps_geocode.py Geolocate address with Maps Geocoding API API keys 2 and Explore the world with Maps APIs
     
youtube/ Query for (public) YouTube videos (Node.js & Python) Intro to the YouTube APIs
youtube/yt_video_query.py Query for (public) YouTube videos (Python) API keys 2 (and Intro to the YouTube APIs)
Code sample table of contents

Support

"Support" will be provided in a "best-effort" manner. Open to fixes and updates to existing samples and affected blog posts. File a "bug" against an existing sample with details. If there is a "missing" sample you are proposing that doesn't exist (whether you write the code and submit the PR or are requesting someone do it), also file a bug and state why it would benefit the community. Currently, only (server-side) Python and JavaScript (Node.js, Apps Script) samples are being considered.