Skip to content

Instantly share code, notes, and snippets.

View DiMiTriFrog's full-sized avatar

DiMiTriFrog DiMiTriFrog

View GitHub Profile
DiMiTriFrog /
Created April 10, 2020 17:06 -> Sample object to translate text or html with Google Cloud using Python | Stratton Apps SL
# Author: Stratton Apps SL | &
from import translate
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'credentials.json'
proj_id = 'translate-33434'
class Session(object):
def __init__(self):
self.client = translate.TranslationServiceClient()