npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

silvano-tests-gcloud

v0.2.0

Published

Google Cloud APIs Client Library for Node.js

Downloads

6

Readme

Google Cloud Node.js Client

Node idiomatic client for Google Cloud services.

NPM Version Travis Build Status Coverage Status

This client supports the following Google Cloud services:

Quickstart

$ npm install gcloud

Authorization

On Google Compute Engine

If you are running this client on Google Compute Engine, we handle authorization for you with no configuration. You just need to make sure that when you set up the GCE instance, you add the correct scopes for the APIs you want to access.

Elsewhere

If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account:

  1. Visit the Google Developers Console.
  2. Create a new project or click on an existing project.
  3. Navigate to APIs & auth > APIs section and turn on the following APIs (you may need to enable billing in order to use these services):
    • Google Cloud Datastore API
    • Google Cloud Storage
    • Google Cloud Storage JSON API
  4. Navigate to APIs & auth > Credentials and then:
  • If you want to use a new service account, click on Create new client ID. After the account is created, you will be prompted to download the JSON key file that the library uses to authorize your requests.
  • If you want to generate a new key for an existing service account, click on Generate new JSON key and download the JSON key file.

Google Cloud Datastore

Google Cloud Datastore is a fully managed, schemaless database for storing non-relational data. Cloud Datastore automatically scales with your users and supports ACID transactions, high availability of reads and writes, strong consistency for reads and ancestor queries, and eventual consistency for all other queries.

See the Google Cloud Datastore docs for more details on how to activate Cloud Datastore for your project.

See the gcloud-node API documentation to learn how to interact with the Cloud Datastore using this Client Library.

var gcloud = require('gcloud');
var datastore = gcloud.datastore;
var dataset;

// From Google Compute Engine:
dataset = new datastore.Dataset({
  projectId: 'my-project',
});

// Or from elsewhere:
dataset = new datastore.Dataset({
  projectId: 'my-project',
  keyFilename: '/path/to/keyfile.json'
});

dataset.get(dataset.key('Product', 'Computer'), function(err, entity) {
  console.log(err || entity);
});

Google Cloud Storage

Google Cloud Storage allows you to store data on Google infrastructure with very high reliability, performance and availability, and can be used to distribute large data objects to users via direct download.

You need to create a Google Cloud Storage bucket to use this client library. Follow the steps on the Google Cloud Storage docs to learn how to create a bucket.

See the gcloud-node API documentation to learn how to connect to the Cloud Storage using this Client Library.

var gcloud = require('gcloud');
var storage = gcloud.storage;
var bucket;

// From Google Compute Engine:
bucket = new storage.Bucket({
  bucketName: YOUR_BUCKET_NAME
});

// Or from elsewhere:
bucket = new storage.Bucket({
  bucketName: YOUR_BUCKET_NAME,
  keyFilename: '/path/to/the/key.json'
});

bucket.write('demo.txt', 'Hello World', function(err) {
  console.log(err || 'Created demo.txt');
});

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 COPYING for more information.