|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Rclone||40,528||35||2 hours ago||263||July 17, 2023||912||mit||Go|
|"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files|
|Analytics||16,185||37 minutes ago||33||agpl-3.0||Elixir|
|Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.|
|Awesome Kubernetes||14,249||14 days ago||7||other||Shell|
|A curated list for awesome kubernetes sources :ship::tada:|
|Xg2xg||13,360||11 hours ago||49|
|by ex-googlers, for ex-googlers - a lookup table of similar tech & services|
|Collection of sample apps showcasing popular use cases using Cloud Functions for Firebase|
|Infracost||9,601||32 minutes ago||144||July 21, 2023||157||apache-2.0||Go|
|Cloud cost estimates for Terraform in pull requests💰📉 Love your cloud bill!|
|Training Data Analyst||7,018||7 days ago||394||apache-2.0||Jupyter Notebook|
|Labs and demos for courses for GCP Training (http://cloud.google.com/training).|
|Python Docs Samples||6,567||2 hours ago||2||May 24, 2021||132||apache-2.0||Jupyter Notebook|
|Code samples used on cloud.google.com|
|Google Cloud Python||4,345||123||2 days ago||38||August 03, 2023||130||apache-2.0||Python|
|Google Cloud Client Library for Python|
|Apps Script samples for Google Workspace products.|
Idiomatic PHP client for Google Cloud Platform services.
View the list of supported APIs and Services.
If you need support for other Google APIs, please check out the Google APIs Client Library for PHP.
We recommend installing individual component packages. A list of available packages can be found on Packagist.
$ composer require google/cloud-storage $ composer require google/cloud-bigquery $ composer require google/cloud-datastore
You can then include the autoloader and create your client:
require 'vendor/autoload.php'; use Google\Cloud\Storage\StorageClient; $storage = new StorageClient(); $bucket = $storage->bucket('my_bucket'); // Upload a file to the bucket. $bucket->upload( fopen('/data/file.txt', 'r') ); // Download and store an object from the bucket locally. $object = $bucket->object('file_backup.txt'); $object->downloadToFile('/data/file_backup.txt');
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\Storage\StorageClient; // Authenticate using a keyfile path $cloud = new StorageClient([ 'keyFilePath' => 'path/to/keyfile.json' ]); // Authenticate using keyfile data $cloud = new StorageClient([ '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\Storage\StorageClient; putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/keyfile.json'); $cloud = new StorageClient();
GOOGLE_APPLICATION_CREDENTIALS environment variable may be set in your server configuration.
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
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 ]);
All client libraries support PHP 7.4 and above.
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.
Contributions to this library are always welcome and highly encouraged.
See CONTRIBUTING for more information on how to get started.
This repository is not an official support channel. If you have support questions, file a support request through the normal Google support channels, or post questions on a forum such as StackOverflow.
Apache 2.0 - See LICENSE for more information.