gcloud
0.9.0, released a year ago by labs.dart.dev
High-level Dart API for Google Cloud Storage, Pub/Sub, and Datastore.
What it does
Provides an idiomatic Dart interface to interact with Google Cloud Platform services such as Cloud Datastore, Cloud Storage, and Cloud Pub/Sub. It simplifies tasks like managing NoSQL entities, uploading and reading files in buckets, and handling asynchronous messaging.
AI-written summary of version 0.9.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Dart server-side or command-line application that communicates with Google Cloud Platform.
- You need to interact with Google Cloud Storage, Cloud Datastore, or Cloud Pub/Sub using Dart.
Skip it when
- You are writing client-side code running in the browser or in a Flutter application.
- You need a production-ready package without the risk of experimental API changes.
Strengths
- Provides high-level idiomatic bindings for major GCP services in Dart.
- Integrates with the `appengine` package and service scopes for server applications.
Weaknesses
- Currently marked as experimental with a high expected rate of breaking changes.
- Not supported on the web or in Flutter applications.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 5
Requires service account credentials from a Google Cloud Project and appropriate environment variables or configuration files.
var jsonCredentials = new File('my-project.json').readAsStringSync();
var credentials = new auth.ServiceAccountCredentials.fromJson(jsonCredentials);
var scopes = []
..addAll(datastore.Datastore.Scopes)
..addAll(Storage.SCOPES)
..addAll(PubSub.SCOPES);
var client = await auth.clientViaServiceAccount(credentials, scopes);
var storage = new Storage(client, 'my-project');
var bucket = await storage.createBucket('my-bucket');Alternatives
Packages that do the same job and could replace gcloud.
- cloud_firestore_web
The web implementation of cloud_firestore.
82Compare - cloud_functions_web
Web implementation of Firebase Cloud Functions for Flutter web apps
78Compare - firebase_storage_web
Web implementation of Firebase Storage for Flutter.
77Compare - serverpod_cloud_storage_s3
Serverpod integration for S3 cloud storage
75Compare
Works with
Packages commonly used together with gcloud: ones it builds on, ones built on it, and its own family.
- retrygcloud depends on itProvides automatic retry with exponential back‑off for async functions.
- googleapisgcloud depends on itAuto-generated client libraries for accessing Google APIs.
- appengineBuilt on gcloudSupport for using Dart as a custom runtime on Google App Engine Flexible Environment.
- bones_apiBuilt on gcloudA powerful API backend framework for Dart with HTTP server, routing, SQL translator, and DB adapters.
- release_updaterBuilt on gcloudAutomatically update release and installation files in a local directory.
- langchain_googleBuilt on gcloudLangChain.dart integration module for Google AI, Gemini, and VertexAI.