All Projects → googleapis → Google Cloud Php

googleapis / Google Cloud Php

Licence: apache-2.0
Google Cloud Client Library for PHP

Projects that are alternatives of or similar to Google Cloud Php

restme
Template to bootstrap a fully functional, multi-region, REST service on GCP with a developer release pipeline.
Stars: ✭ 19 (-97.56%)
Mutual labels:  google-cloud-platform
gSlack
Get Slack notifications from Google Cloud Platform
Stars: ✭ 69 (-91.15%)
Mutual labels:  google-cloud-platform
Cloud Functions Go
Unofficial Native Go Runtime for Google Cloud Functions
Stars: ✭ 427 (-45.26%)
Mutual labels:  google-cloud-platform
spanner-schema-diff-tool
Compare two Cloud Spanner Schema (DDL) files, determine the differences and generate the required ALTER statements to convert one schema to the other.
Stars: ✭ 20 (-97.44%)
Mutual labels:  google-cloud-platform
rowy
Open-source Airtable-like experience for your database (Firestore) with GCP's scalability. Build any automation or cloud functions for your product. ⚡️✨
Stars: ✭ 2,676 (+243.08%)
Mutual labels:  google-cloud-platform
All About Programming
Everything about programming!!
Stars: ✭ 314 (-59.74%)
Mutual labels:  google-cloud-platform
retail-demo
Google Cloud Dataflow Demo Application. デモ用アプリのため更新(依存関係の更新・脆弱性対応)は行っていません。参考にされる方はご注意ください。
Stars: ✭ 12 (-98.46%)
Mutual labels:  google-cloud-platform
Nouhau
Google Cloud Platformのノウハウを共有するRepository
Stars: ✭ 548 (-29.74%)
Mutual labels:  google-cloud-platform
gcp-firewall-enforcer
A toolbox to enforce firewall rules across multiple GCP projects.
Stars: ✭ 77 (-90.13%)
Mutual labels:  google-cloud-platform
Laravel Google Cloud Storage
A Google Cloud Storage filesystem for Laravel
Stars: ✭ 415 (-46.79%)
Mutual labels:  google-cloud-platform
ob google-bigquery
This service is meant to simplify running Google Cloud operations, especially BigQuery tasks. This means you do not have to worry about installation, configuration or ongoing maintenance related to an SDK environment. This can be helpful to those who would prefer to not to be responsible for those activities.
Stars: ✭ 43 (-94.49%)
Mutual labels:  google-cloud-platform
pipeline-editor
Cloud Pipelines Editor is a web app that allows the users to build and run Machine Learning pipelines without having to set up development environment.
Stars: ✭ 22 (-97.18%)
Mutual labels:  google-cloud-platform
Bigquery Utils
Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
Stars: ✭ 338 (-56.67%)
Mutual labels:  google-cloud-platform
mlops-with-vertex-ai
An end-to-end example of MLOps on Google Cloud using TensorFlow, TFX, and Vertex AI
Stars: ✭ 155 (-80.13%)
Mutual labels:  google-cloud-platform
Terracognita
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
Stars: ✭ 452 (-42.05%)
Mutual labels:  google-cloud-platform
cloud-run-wordpress
Deploy a Wordpress site on Google Cloud Run
Stars: ✭ 25 (-96.79%)
Mutual labels:  google-cloud-platform
pubsubbeat
An Elastic Beat to ingest data from Google Pub/Sub
Stars: ✭ 40 (-94.87%)
Mutual labels:  google-cloud-platform
Probabilistic robotics
solution of exercises of the book "probabilistic robotics"
Stars: ✭ 734 (-5.9%)
Mutual labels:  google-cloud-platform
Firebase Gcp Examples
🔥 Firebase app architectures, languages, tools & some GCP things! React w Next.js, Svelte w Sapper, Cloud Functions, Cloud Run.
Stars: ✭ 470 (-39.74%)
Mutual labels:  google-cloud-platform
Gcping
Measure your latency to GCP regions
Stars: ✭ 405 (-48.08%)
Mutual labels:  google-cloud-platform

Google Cloud PHP Client

Idiomatic PHP client for Google Cloud Platform services.

CI Status

PHP Version Status
PHP 7.2 Kokoro CI

Latest Stable Version Packagist Travis Build Status codecov

This client supports the following Google Cloud Platform services at a General Availability quality level:

This client supports the following Google Cloud Platform services at a Beta quality level:

This client supports the following Google Cloud Platform services in development:

If you need support for other Google APIs, please check out the Google APIs Client Library for PHP.

Quick Start

We recommend installing individual component packages when possible. A list of available packages can be found on Packagist.

For example:

$ composer require google/cloud-bigquery
$ composer require google/cloud-datastore

We also provide the google/cloud package, which includes all Google Cloud clients.

$ composer require google/cloud

Authentication

Authentication is handled by the client library automatically. You just need to provide the authentication details when creating a client. Generally, authentication is accomplished using a Service Account. For more information on obtaining Service Account credentials, see our Authentication Guide.

Once you've obtained your credentials file, it may be used to create an authenticated client.

require 'vendor/autoload.php';

use Google\Cloud\Core\ServiceBuilder;

// Authenticate using a keyfile path
$cloud = new ServiceBuilder([
    'keyFilePath' => 'path/to/keyfile.json'
]);

// Authenticate using keyfile data
$cloud = new ServiceBuilder([
    'keyFile' => json_decode(file_get_contents('/path/to/keyfile.json'), true)
]);

If you do not wish to embed your authentication information in your application code, you may also make use of Application Default Credentials.

require 'vendor/autoload.php';

use Google\Cloud\Core\ServiceBuilder;

putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/keyfile.json');

$cloud = new ServiceBuilder();

The GOOGLE_APPLICATION_CREDENTIALS environment variable may be set in your server configuration.

gRPC and Protobuf

Many clients in Google Cloud PHP offer support for gRPC, either as an option or a requirement. gRPC is a high-performance RPC framework created by Google. To use gRPC in PHP, you must install the gRPC PHP extension on your server. While not required, it is also recommended that you install the protobuf extension whenever using gRPC in production.

$ pecl install grpc
$ pecl install protobuf

Caching Access Tokens

By default the library will use a simple in-memory caching implementation, however it is possible to override this behavior by passing a PSR-6 caching implementation in to the desired client.

The following example takes advantage of Symfony's Cache Component.

require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

// Please take the proper precautions when storing your access tokens in a cache no matter the implementation.
$cache = new ArrayAdapter();

$storage = new StorageClient([
    'authCache' => $cache
]);

This library provides a PSR-6 implementation with the SystemV shared memory at Google\Auth\Cache\SysVCacheItemPool. This implementation is only available on *nix machines, but it's the one of the fastest implementations and you can share the cache among multiple processes. The following example shows how to use it.

require __DIR__ . '/vendor/autoload.php';

use Google\Cloud\Spanner\SpannerClient;
use Google\Auth\Cache\SysVCacheItemPool;

$cache = new SysVCacheItemPool();

$spanner = new SpannerClient([
    'authCache' => $cache
]);

Versioning

This library follows Semantic Versioning.

Please note it is currently under active development. Any release versioned 0.x.y is subject to backwards incompatible changes at any time.

GA: Libraries defined at a GA quality level are stable, and will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority. Please note, for any components which include generated clients the GA guarantee will only apply to clients which interact with stable services. For example, in a component which hosts V1 and V1beta1 generated clients, the GA guarantee will only apply to the V1 client as the service it interacts with is considered stable.

Beta: Libraries defined at a Beta quality level are expected to be mostly stable and we're working towards their release candidate. We will address issues and requests with a higher priority.

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

License

Apache 2.0 - See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].