Skip to content

wescpy/google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 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!" Exploring GAE (TBD)
cloud/appengine/python3 Python 3 App Engine "Hello World!" Exploring GAE (TBD)
cloud/transnatlang/ Text-based language processing (Node.js & Python) Text-based language processing
     
gemini/gemtxt-simple-gai.py Google AI Gemini Pro 1.0 API Python sample Gemini API "Hello World!"
gemini/gemtxt-simple-gai.js Google AI Gemini Pro 1.0 API (CommonJS) Node.js sample Gemini API "Hello World!"
gemini/gemtxt-simple-gai.mjs Google AI Gemini Pro 1.0 API (modern JS/ECMAScript module) Node.js sample Gemini API "Hello World!"
gemini/gemtxt-simple-gcp.py GCP Vertex AI Gemini Pro 1.0 API Python sample Gemini API "Hello World!"
gemini/gemtxt-simple10-gai.py Google AI Gemini 1.0 Pro Latest Gemini 102: Beyond "Hello World!"
gemini/gemtxt-stream10-gai.py Google AI Gemini 1.0 Pro Latest Gemini 102: Beyond "Hello World!"
gemini/gemtxt-simple10-chat-gai.py Google AI Gemini 1.0 Pro Latest Gemini 102: Beyond "Hello World!"
gemini/gemmmd-simple10loc-gai.py Google AI Gemini 1.0 Pro Vision Latest Gemini 102: Beyond "Hello World!"
gemini/gemmmd-simple10url-gai.py Google AI Gemini 1.0 Pro Vision Latest Gemini 102: Beyond "Hello World!"
gemini/webgem/ Google AI Gemini 1.5 Flash 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.