Saravanan666/pypi-org huggingface dataset:
Package: google-cloud-service-directory
Service Directory: Allows the registration and lookup of services.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 Service Directory.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-cloud-service-directoryWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-service-directoryNext StepsRead theClient Library Documentationfor Service Directory
to see other available methods on the client.Read theService Directory 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-cloud-servicehealth
Service Health API: Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products.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 Service Health 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-cloud-servicehealthWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-servicehealthNext StepsRead theClient Library Documentationfor Service Health API
to see other available methods on the client.Read theService Health 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-cloud-service-management
Service Management: is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide range of features to service consumers and service producers, including authentication, authorization, auditing, rate limiting, analytics, billing, logging, and monitoring.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 Service Management.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-cloud-service-managementWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-service-managementNext StepsRead theClient Library Documentationfor Service Management
to see other available methods on the client.Read theService Management 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-cloud-service-usage
Service Usage: is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects.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 Service Usage.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-cloud-service-usageWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-service-usageNext StepsRead theClient Library Documentationfor Service Usage
to see other available methods on the client.Read theService Usage 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-cloud-shell
Cloud Shell: is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser.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 Cloud Shell.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-cloud-shellWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-shellNext StepsRead theClient Library Documentationfor Cloud Shell
to see other available methods on the client.Read theCloud Shell 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-cloud-source-context
Source Context: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 Source Context.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-cloud-source-contextWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-source-contextNext StepsRead theClient Library Documentationfor Source Context
to see other available methods on the client.Read theSource Context 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-cloud-speech
Cloud Speech: enables easy integration of Google speech recognition technologies into developer applications. Send audio and receive a text transcription from the Speech-to-Text API service.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 Cloud Speech.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-cloud-speechWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-speechNext StepsRead theClient Library Documentationfor Cloud Speech
to see other available methods on the client.Read theCloud Speech 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-cloud-storage
Google Cloud Storageis a managed service for storing unstructured data. Cloud Storage
allows world-wide storage and retrieval of any amount of data at any time. You can use
Cloud Storage for a range of scenarios including serving website content, storing data
for archival and disaster recovery, or distributing large data objects to users via direct download.A comprehensive list of changes in each version may be found in theCHANGELOG.Product DocumentationClient Library Documentationgithub.com/googleapis/python-storageRead more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, inClient Libraries Explained.Quick StartIn order to use this library, you first need to go through the following steps.
A step-by-step guide may also be found inGet Started with Client Libraries.Select or create a Cloud Platform project.Enable billing for your project.Enable the Google Cloud Storage 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-cloud-storageWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-storageNext StepsRead theGoogle Cloud Storage Product documentationto learn
more about the product and see How-to Guides.Read theClient Library Documentationfor Google Cloud Storage API
to see other available methods on the client.View thisREADMEto see the full list of Cloud
APIs that we cover.
Package: google-cloud-storage-image-resizer
cloudstorageimageresizerA python module to import, rotate, crop and resize pictures into Google Cloud StorageDISCLAIMERTHIS IS NOT AN OFFICIAL GOOGLE MODULE.SynopsisTypical usecase: fetch a bunch of image and generate thumbnails of various
sizes for each of them, stored in Cloud Storage for further delivery via a CDN.from cloudstorageimageresizer import ImageResizer

# Initialize an ImageResizer:
i = ImageResizer()

urls = [
    'http://www.gokqsw.com/images/picture/picture-3.jpg',
    'http://www.gokqsw.com/images/picture/picture-4.jpg'
]

for url in urls:

    # Fetch image into memory and store it in original format to a Google Cloud
    # Storage bucket
    i.fetch(url).store(
        in_bucket='my-images',
        key_name='image-original'
    )

    # Apply the image EXIF rotation, if any
    i.orientate()

    # Resize this image, store it into a Google Cloud Storage bucket and return its url
    url1 = i.resize(
        width=200
    ).store(
        in_bucket='my-images',
        key_name='image-w200'
    )

    # Do it again, with a different size
    url2 = i.resize(
        height=400
    ).store(
        in_bucket='my-images',
        key_name='image-h200'
    )More explanationFor method parameters, see the code (there isn't much of it ;-)ImageResizer does all image operations in-memory, without writing images to disk.The ImageResizer instance is immutable: its internal image is never modified. Each image operation instead returns a clone of the ImageResizer loaded with the modified image. This allows you to chain image operations, and manipulate the same image in different ways without having to explicitely keep a backup copy of it.ImageResizer uses PIL, has reasonable defaults for downsizing images and handle images with alpha channels nicely.All images are stored in png format to preserve transparency.Installationcloudstorageimageresizerrequires Pillow, which in turn needs external
libraries. On Ubuntu, you would for example need:sudo apt-get install libjpeg8 libjpeg8-dev libopenjpeg-devThenpip install cloudstorageimageresizerTestingAdd your JSON Google API credentials in the filegcloud-credentials.json,
edit theBUCKET_NAMEinexample.pyand run it:python example.pyPEP8The project follows the PEP8 convention.It usesflake8to check the code. If you've installed thedev-dependencies then you can just run theflake8-command and it'll tell you what needs to be fixed if applicable.Source codehttps://github.com/erwan-lemonnier/cloud-storage-image-resizerAuthor and contributorsErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierlinkedin.com/in/erwan-lemonnier/Johan Wänglöfgithub.com/jwangloflinkedin.com/in/johan-w%C3%A4ngl%C3%B6f-09076192/
Package: google-cloud-storageinsights
Storage Insights API: The Storage Insights inventory report feature helps you manage your object storage at scale.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 Storage Insights 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-cloud-storageinsightsWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-storageinsightsNext StepsRead theClient Library Documentationfor Storage Insights API
to see other available methods on the client.Read theStorage Insights 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-cloud-storage-transfer
Storage Transfer Service: Secure, low-cost services for transferring data from cloud or on-premises sources.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 Storage Transfer Service.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-cloud-storage-transferWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-cloud-storage-transferNext StepsRead theClient Library Documentationfor Storage Transfer Service
to see other available methods on the client.Read theStorage Transfer Service 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-cloud-structured-logger
Structured LoggerFormatter forstructured loggingin Google Cloud.Installingpip install google-cloud-structured-loggerUsageimportloggingfromgcstructuredloggerimportstructuredloggerlogger=logging.getLogger(__name__)logger.setLevel(logging.DEBUG)log_handler=logging.StreamHandler()formatter=structuredlogger.StructuredJsonFormatter()log_handler.setFormatter(formatter)log_handler.setLevel(logging.DEBUG)logger.addHandler(log_handler)Dict config exampleimportlogging.configfromgcstructuredloggerimportstructuredloggerLOGGING_CONFIG={"version":1,"disable_existing_loggers":False,"formatters":{"structured_json":{"()":structuredlogger.StructuredJsonFormatter}},"handlers":{"default":{"formatter":"structured_json","level":"DEBUG","class":"logging.StreamHandler","stream":"ext://sys.stdout",}},"root":{"level":"DEBUG","handlers":["default"]},}logging.config.dictConfig(LOGGING_CONFIG)Featuresseverityis set to the same level as the logSend log to Error Reporting if log level isERROR,CRITICAL, orFATALIfexc_infoisTrue, the stack trace is set tostack_traceLog examplemain.py:logger.debug("debug")logger.info("info",extra={"foo":"bar"})logger.error("error")logger.critical("critical")logger.fatal("fatal")try:1/0exceptExceptionase:logger.error(e,exc_info=True)Output:{"message": "debug", "timestamp": "2022-08-18T12:55:52.064302", "severity": "DEBUG"}
{"message": "info", "foo": "bar", "timestamp": "2022-08-18T12:55:52.064358", "severity": "INFO"}
{"message": "error", "timestamp": "2022-08-18T12:55:52.064381", "severity": "ERROR", "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"}
{"message": "critical", "timestamp": "2022-08-18T12:55:52.064399", "severity": "CRITICAL", "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"}
{"message": "fatal", "timestamp": "2022-08-18T12:55:52.064414", "severity": "CRITICAL", "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"}
{"message": "division by zero", "stack_trace": "Traceback (most recent call last):\n  File \"/path/to/main.py\", line 16, in main\n    1 / 0\nZeroDivisionError: division by zero", "timestamp": "2022-08-18T12:55:52.064520", "severity": "ERROR", "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"}Logs displayed in Google CloudCloud Function:Cloud Logging: