Saravanan666/pypi-org huggingface dataset:
Package: google-analytics-data
Analytics Data: provides programmatic methods to access report data in Google Analytics App+Web properties.Client Library DocumentationProduct DocumentationQuick StartIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Analytics Data.Setup Authentication.InstallationInstall this library in a virtual environment usingvenv.venvis a tool that
creates isolated Python environments. These isolated environments can have separate
versions of Python packages, which allows you to isolate one project’s dependencies
from the dependencies of other projects.Withvenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Code samples and snippetsCode samples and snippets live in thesamples/folder.Supported Python VersionsOur client libraries are compatible with all currentactiveandmaintenanceversions of
Python.Python >= 3.7Unsupported Python VersionsPython <= 3.6If you are using anend-of-lifeversion of Python, we recommend that you update as soon as possible to an actively supported version.Mac/Linuxpython3 -m venv <your-env>
source <your-env>/bin/activate
pip install google-analytics-dataWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-analytics-dataNext StepsRead theClient Library Documentationfor Analytics Data
to see other available methods on the client.Read theAnalytics Data Product documentationto learn
more about the product and see How-to Guides.View thisREADMEto see the full list of Cloud
APIs that we cover.
Package: google-api-core
This library is not meant to stand-alone. Instead it defines
common helpers used by all Google API clients. For more information, see thedocumentation.Supported Python VersionsPython >= 3.7Unsupported Python VersionsPython == 2.7, Python == 3.5, Python == 3.6.The last version of this library compatible with Python 2.7 and 3.5 isgoogle-api-core==1.31.1.The last version of this library compatible with Python 3.6 isgoogle-api-core==2.8.2.
Package: google-api-helper
google-api-helper helps streamline access to google apis including authentication using oauth2 and factory methods to create an API service. I.e. creating a compute API service is not to bad but still needs some code:importgoogleapiclient.discoveryfromoauth2client.service_accountimportServiceAccountCredentialscredentials=ServiceAccountCredentials.from_json_keyfile_name("service_account.json",["https://www.googleapis.com/auth/compute"])compute=googleapiclient.discovery.build('compute','v1',credentials=credentials)With google-api-helper that’s a oneliner:fromgoogleapiimportGoogleApicompute=GoogleApi.compute().with_service_account_file("service_account.json")also using the OAUTH2 flow is simplefromgoogleapiimportGoogleApicompute=GoogleApi.compute().with_oauth2_flow("client_secret.json")python-google-api-client also got retries for server errors included, but not for rate limiting. Therefore every API call you make needs to implement an exponential backoff. This is automatically done by using google-api-helper.fromgoogleapiimportGoogleApicompute=GoogleApi.compute().with_oauth2_flow("client_secret.json")# directly using the api service without retriescompute.service.instances().list(project="my-gcp-project",zone="europe-west1-d").execute()# wrapper including retries for rate limiting and server side errorscompute.instances().list(project="my-gcp-project",zone="europe-west1-d").execute()InstallationAddgoogle-api-helperto your requirements.txt or your module requirements or install via pip:pipinstallgoogle-api-helperQuickstartImport GoogleApi in your python codefromgoogleapiimportGoogleApiCreate the api from a factory method or specify it by yourself:compute=GoogleApi.compute()drive=GoogleApi.drive()gmail=GoogleApi("gmail","v1",["https://mail.google.com/"])Authenticate with oauth2# use Compute Engine or App Engine default credentialscompute.with_application_credentials()# use a service account to access a users drivedrive.with_service_account_file("service_account.json","test@example.com")# or run a oauth2 flow to ask the user for credentialsgmail.with_oauth2_flow("client_secret.json")And call the apiinstances=compute.instances().list(project="project-id",zone="europe-west1-d").execute()drive_files=drive.files().list(q="name='test'").execute()messages=gmail.users().messages().list(userId="me").execute()Building and publishingpythonsetup.pybdist_wheel--universalpython-mtwineuploaddist/*
Package: google-apis-client-generator
#  Copyright 2011 Google, Inc.
#
#  Licensed under the Apache License, Version 2.0 (the “License”);
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#http://www.apache.org/licenses/LICENSE-2.0#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an “AS IS” BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.Google APIs Code Generatorhttps://github.com/google/apis-client-generator/January 29, 2019IntroductionThis is a tool for generating client libraries from Google APIs Discovery
documents. It builds a rich (but language neutral) model of the API and
then invokes a language specific backend to emit the library. The language
generators are template driven, so it is easy for a developer knowning
language X to write templates for code in X, without having to learn much
Python.The generator currently has templates for Java, C++, CSharp, GWT, PHP
and Dart.  There may be multiple variations of each language. For each,
the variant used by default (typically also named “default”) matches the
head of the respective base client libraries.Warning:This project is maintained as a volunteer effort. There is no full time
staffing.InstallationPython 2.7 is required.  Python3 is not supported.Everything can be installed quickly with easy_install or pip. E.g.:pip install google-apis-client-generatorThe following dependencies will be installed:django -https://www.djangoproject.com/- version 1.8
- we only use the templating package, not the web serving features.google-apputils -https://github.com/google/google-apputils/google-api-python-client -https://github.com/google/google-api-python-clientpython-gflags -https://github.com/google/python-gflags/httplib2 -https://github.com/httplib2/httplib2/UsageTo run the library generator, use the “generate_library” script.  This is
normally what you’d want to do.  E.g.:generate_library–input=src/googleapis/codegen/testdata/moderator.v1.json –language=java –output_dir=/tmp/generatedTo expand arbitrary templates, the “expand_templates” script is also available:expand_templates–discovery=src/googleapis/codegen/testdata/moderator.v1.json –language=any –templates=discovery_check –output_dir=/tmp/generatedContactTony Aiuto (aiuto@google.com)
Jacob Smullyan (smulloni@google.com)
Package: googleapis-common-protos-stubs
Type stubs for googleapis-common-protosThis package provides type stubs for thegoogleapis-common-protospackage.This is in no way affiliated with Google.The stubs were created automatically bymypy-protobuf.Note that if you're using Mypy you need to use the--namespace-packagesoption asgoogleand some of its subpackages are namespace packages.Installation$pipinstallgoogleapis-common-protos-stubs
Package: google-apis-oauth-django
Google APIs OAuth DjangoA library to help integrate Google OAuth 2.0 to your Django application. This library retrieves the necessary tokens you need to access the Google APIs your application is configured for.Installationpipinstallgoogle-apis-oauth-djangoUsageRedirecting users to the login screenfromdjango.shortcutsimportHttpResponseRedirectimportgoogle_apis_oauthdefRedirectToOAuthPage(request):oauth_url=google_apis_oauth.get_authorization_url(# Path of the "client_id.json" fileJSON_FILEPATH,# Authorization scopes requiredSCOPES,# The url where the google oauth should redirect# after a successful login.REDIRECT_URI,# Force the consent prompt even if the user was authorized# previously. Defaults to False.True)returnHttpResponseRedirect(url)Retreving and storing the credentials after successful loginimportgoogle_apis_oauthdefRedirectView(request):try:# Get user credentialscredentials=google_apis_oauth.get_crendentials_from_callback(request,JSON_FILEPATH,SCOPES,REDIRECT_URI)# Stringify credentials for storing them in the DBstringified_token=google_apis_oauth.stringify_credentials(credentials)# Store the credentials safely in the DB...# Now that you have stored the user credentials you# can redirect user to your main application....exceptgoogle_apis_oauth.exceptions.InvalidLoginException:# Handle unauthenticated request to the callback uri.Loading and using the user credentialsimportgoogle_apis_oauthfromgoogleapiclient.discoveryimportbuild# Use the stringified token to get a credentials object# that can be used to authenticate requests made by# google-api-python-client# refreshed is a boolean that tells if the token was expired and was renewed.# You may want to update the credentials in the database if it is True.creds,refreshed=google_apis_oauth.load_credentials(stringified_token)# Using credentials in google-api-python-client.service=build('calendar','v3',credentials=creds)...ExampleYou can refer tothisblog for an example where this library is used.
Package: google-api-support
google-api-supportSome functions to make Google APIs more usable.Installpip install google-api-supportContributeThe contributions are encouraged so the library can keep growing and help more people.You can also create an issue in order to point other contributors to desired functionalities.Functions avaliableSheetsGet pandas.dataframe from SheetsUpload pandas.dataframe to SheetsRetrieve sheet namesAdd sheets to a spreadsheetCreate new spreadsheetSlidesCreate presentationGet presentation infoGet presentation slidesGet slide notesReplace textReplace shape with imageReplace imageGet slide notesBatch replace textBatch replace shapes with imagesInsert imageDuplicate objectDelete objectBatch delete objectDelete textBatch delete textDelete presentation notesTransform objectDriveGet file nameMove fileDelete fileCopy fileUpload imageCreate folderList folders in folderGet folder id by nameGet folder id by pathDownload fileStorageUpload a file to google storage and get its URLSteps to use google Sheets APIIn order to use Google APIs you will need to authenticate, this steps guide you through the process:Create a project in console.developers.google.comhttps://console.developers.google.comCreate google service account.
0. Go tohttps://console.developers.google.com/projectselector/apis/credentialsand create a new project.Create credentials.In this first version, i will explain how to deal with Services accounts, so select "Service account key".Create a service account.Download the .json file and KEEP IT SAFE.Now you have your service account created inside your new project.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.comGo 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 fileCredentials documentationManually install dependenciespip install httplib2 oauth2client pandas google-api-python-client google.auth.transport.requests google.oauth2.credentials google_auth_oauthlib.flowComplete first use exampleExample using virtualenv in bash terminalvirtualenv venvpip install google-api-supportpip install jupyterlabsource venv/Scripts/activateexport GOOGLE_APPLICATION_CREDENTIALS=C:/path/to/my/service_account_credentials.jsonjupyter lab
Package: google-apitools
google-apitoolsis a collection of utilities to make it easier to build
client-side tools, especially those that talk to Google APIs.NOTE: This library is stable, but in maintenance mode, and not under
active development. However, any bugs or security issues will be fixed
promptly.Installing as a libraryTo install the library into the current virtual environment:$ pip install google-apitoolsInstalling the command-line toolsTo install the command-line scripts into the current virtual environment:$ pip install google-apitools[cli]Running the testsFirst, install the testing dependencies:$ pip install google-apitools[testing]and thenosetestrunner:$ pip install noseThen run the tests:$ nosetests
Package: googleapiwrapper
TL:DRSimple wrapper for some of google api functions for python namely:
Google Shared Drive and Google EmailHow to useExample to use the googledrivewrapper.pyfromgoogleapiwrapper.googledrivewrapperimportGoogleSharedDrive# Load your service account credentials. Google to find out how to do itSERVICE_ACCOUNT_FILE='./credentials.json'# instantiate the Driveshared_drives=GoogleSharedDrive(SERVICE_ACCOUNT_FILE)# Find the ID for the folder namefolder_1_id=shared_drives.fetch_folder_id('<YOURPROJECTNAME>')# Create a new folder in previous foldernewFolder=shared_drives.create_new_folder(folder_1_id,'<new folder>')# Create another folder in new folder's foldersubfile=shared_drives.create_new_folder(newFolder['id'],'new sub folder')# Upload a new file in new folder, will output the file meta datafile_metadata=shared_drives.upload_file(newFolder['id'],'./<file you need>','new_file.xlsx')# Get the file IDfileID=file_metadata.get('id')# Search a file ID using file Name in a specific folder# You will need to provide the folder ID for this functioninput_folder_id="<YOURFOLDERID>"file_name="test.xlsx"fileID=shared_drives.search_fileID_in_folder_using_fileName(input_folder_id,file_name)# Download file from GoogleDriveinput_file_id='<YOURFOLDERID>'shared_drives.download_file(input_file_id,'./test.xlsx')Example to use the googleemailwrapper.pyfromgoogleapiwrapper.googleemailwrapperimportGoogleEmailSERVICE_ACCOUNT_FILE="./credentials.json"EMAIL_FROM="<YOUREMAILADDRESS>"EMAIL_TO="<OTHEREMAILADDRESS>"EMAIL_SUBJECT="Hello, Test"EMAIL_CONTENT="Testing. Thanks, it works"# instantiate the Emailgmail=GoogleEmail(SERVICE_ACCOUNT_FILE,EMAIL_FROM)# Create the email contentsmessage=gmail.create_message(EMAIL_TO,EMAIL_SUBJECT,EMAIL_CONTENT,['test.csv'])# Send emailsent=gmail.send_message()
Package: google-api-wrapper2
google-api-wrapperRun ./setup.sh to set up git pre/post push hook scripts.
Then, a similar script loaded to the environment will execute the pre/post push hook scripts:https://stackoverflow.com/a/3812238/1106893For example loading this script and defining an alias like this will do the trick:alias gpwh="git-push-with-hooks.sh"Setup of precommitConfigure precommit as described in this blogpost:https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-using-black-and-flake8/Commands:Install precommit:pip install pre-commitMake sure to add pre-commit to your path. For example, on a Mac system, pre-commit is installed here:$HOME/Library/Python/3.8/bin/pre-commit.Executepre-commit installto install git hooks in your.git/directory.TroubleshootingInstallation issuesIn case you're facing a similar issue:An error has occurred: InvalidManifestError: 
=====> /<userhome>/.cache/pre-commit/repoBP08UH/.pre-commit-hooks.yaml does not exist
Check the log at /<userhome>/.cache/pre-commit/pre-commit.log, please run:pre-commit autoupdateMore info here:https://github.com/pre-commit/pre-commit/issues/577
Package: google-apple-inapp-purchases
inapp-purchasesManage in-app purchases for Apple AppStore and Google PlayInstallationpipinstallgoogle_apple_inapp_purchasesUsageCurrently google_apple_inapp_purchases-purchases supports Google Play and App Store subscription services. But, product purchases is available retrieving raw data.Google Play:fromgoogle_apple_inapp_purchases.google_playimportGooglePlayServiceservice=GooglePlayService(service_account_file='service-info.json',# or service_account_info='service-info.json'package_name='com.package.name')purchase=service.get_subscription_purchase(subscription_id='com.subscription.id',token='purchase-token')AppStore:fromgoogle_apple_inapp_purchases.app_storeimportAppStoreServiceservice=AppStoreService(sandbox=True,password='secret-password')purchase=service.get_subscription_purchase(receipt_data='receive-hash')Response{'bundle_id':unicode,'subscription_id':unicode,'purchase_id':unicode,'original_purchase_id':unicode,'purchase_date_ms':int,'original_purchase_date_ms':int,'auto_renewing':bool,'expires_date_ms':int,'country_code':unicode,'price_currency_code':unicode,'price_amount':float,'cancellation_date_ms':int,'cancellation_reason':unicode,,'payment_state':int,'status':unicode,'is_active':bool,'is_trial_period':bool,'expiration_intent':unicode,}TODOExceptionsGoogle Play products data response (the raw content is returned)AppStore products data response (the raw content is returned)Get list of products from AppStoreTestsRetrieve more information from the servicesDocumentationExamples
Package: googleappsauth
googleappsauthallows you to authenticate yourDjangousers
against an GoogleAppsdomain.
This means you basically get a single sign-on solution, provided that all users of your django application
also have Accounts in Google Apps for your Domain.UsageTo use googleappsauth, configuration insettings.pyshould look like this:GOOGLE_APPS_DOMAIN = 'example.com'
GOOGLE_APPS_CONSUMER_KEY = 'example.com'
GOOGLE_APPS_CONSUMER_SECRET = '*sekret*'
# domain where your application is running
GOOGLE_OPENID_REALM = 'http://*.hudora.biz/'You also can tell googleappsauth where to go after successfull authentication, in case
the redirect_url had not been set.LOGIN_REDIRECT_URLdefaults to/.LOGIN_REDIRECT_URL = '/admin'To activate googleappsauth, set the appropriate Authentication backend and include a callback view.settings.py:
AUTHENTICATION_BACKENDS = ('googleappsauth.backends.GoogleAuthBackend',)

urls.py:
(r'^callback_googleappsauth/', 'googleappsauth.views.callback'),Using a special middleware which is included in the package, you can block access to a compete site.MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'googleappsauth.middleware.GoogleAuthMiddleware',
)In addition you can setAUTH_PROTECTED_AREASto authenticate only access to certain parts of a site, e.g.AUTH_PROTECTED_AREAS = ['/admin']DownloadGet it at thePython Cheeseshopor atGitHub.See alsoTim Garthwaite:Google Apps Auth Backend for Djangohttp://github.com/flashingpumpkin/django-socialregistration/http://github.com/uswaretech/Django-Socialauth/
Package: google-apps-meet
Google Meet API: Create and manage meetings in Google Meet.Client Library DocumentationProduct DocumentationQuick StartIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Google Meet API.Setup Authentication.InstallationInstall this library in a virtual environment usingvenv.venvis a tool that
creates isolated Python environments. These isolated environments can have separate
versions of Python packages, which allows you to isolate one project’s dependencies
from the dependencies of other projects.Withvenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Code samples and snippetsCode samples and snippets live in thesamples/folder.Supported Python VersionsOur client libraries are compatible with all currentactiveandmaintenanceversions of
Python.Python >= 3.7Unsupported Python VersionsPython <= 3.6If you are using anend-of-lifeversion of Python, we recommend that you update as soon as possible to an actively supported version.Mac/Linuxpython3 -m venv <your-env>
source <your-env>/bin/activate
pip install google-apps-meetWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-apps-meetNext StepsRead theClient Library Documentationfor Google Meet API
to see other available methods on the client.Read theGoogle Meet API Product documentationto learn
more about the product and see How-to Guides.View thisREADMEto see the full list of Cloud
APIs that we cover.
Package: google-apps-script-type
Google Apps Script Type Protos:Client Library DocumentationProduct DocumentationQuick StartIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Google Apps Script Type Protos.Setup Authentication.InstallationInstall this library in a virtual environment usingvenv.venvis a tool that
creates isolated Python environments. These isolated environments can have separate
versions of Python packages, which allows you to isolate one project’s dependencies
from the dependencies of other projects.Withvenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Code samples and snippetsCode samples and snippets live in thesamples/folder.Supported Python VersionsOur client libraries are compatible with all currentactiveandmaintenanceversions of
Python.Python >= 3.7Unsupported Python VersionsPython <= 3.6If you are using anend-of-lifeversion of Python, we recommend that you update as soon as possible to an actively supported version.Mac/Linuxpython3 -m venv <your-env>
source <your-env>/bin/activate
pip install google-apps-script-typeWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-apps-script-typeNext StepsRead theClient Library Documentationfor Google Apps Script Type Protos
to see other available methods on the client.Read theGoogle Apps Script Type Protos Product documentationto learn
more about the product and see How-to Guides.View thisREADMEto see the full list of Cloud
APIs that we cover.