Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update README, CONTRIBUTING and LICENSE, remove CONTRIB #220

Merged
merged 1 commit into from
Oct 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions CONTRIB.rst

This file was deleted.

37 changes: 30 additions & 7 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Hacking on ``gcloud-python``
Contributing
============================

#. **Please sign one of the contributor license agreements below.**
#. Fork the repo, develop and test your code changes, add docs.
#. Make sure that your commit messages clearly describe the changes.
#. Send a pull request.

Here are some guidelines for hacking on gcloud-python.

Using a Development Checkout
Expand Down Expand Up @@ -59,6 +64,22 @@ repo, from which you can submit a pull request.
$ cd ~/hack-on-gcloud
$ $VENV/bin/python setup.py develop

I'm getting weird errors... Can you help?
-----------------------------------------

Chances are you have some dependency problems...
If you're on Ubuntu,
try installing the pre-compiled packages::

$ sudo apt-get install python-crypto python-openssl libffi-dev

or try installing the development packages
(that have the header files included)
and then ``pip install`` the dependencies again::

$ sudo apt-get install python-dev libssl-dev libffi-dev
$ pip install gcloud

Adding Features
---------------

Expand Down Expand Up @@ -155,10 +176,12 @@ can build the docs via::

$ tox -e docs

Change Log
----------
Contributor License Agreements
------------------------------

Before we can accept your pull requests you'll need to sign a Contributor License Agreement (CLA):

- **If you are an individual writing original source code** and **you own the intellectual property**, then you'll need to sign an `individual CLA <https://developers.google.com/open-source/cla/individual>`__.
- **If you work for a company that wants to allow you to contribute your work**, then you'll need to sign a `corporate CLA <https://developers.google.com/open-source/cla/corporate>`__.

- Feature additions and bugfixes must be added to the ``CHANGES.txt``
file in the prevailing style. Changelog entries should be long and
descriptive, not cryptic. Other developers should be able to know
what your changelog entry means.
You can sign these electronically (just scroll to the bottom). After that, we'll be able to accept your pull requests.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright 2014 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
124 changes: 70 additions & 54 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,85 +1,101 @@
Google Cloud Python Client
==========================

The goal of this project is to make it really simple and Pythonic
to use Google Cloud Platform services.
Python idiomatic client for Google Cloud Platform services.

------------------
|build| |coverage|
------------------

- `Homepage <https://googlecloudplatform.github.io/gcloud-python/>`__

This client supports the following Google Cloud Platform services:

- `Google Cloud
Datastore <https://cloud.google.com/products/cloud-datastore/>`__
- `Google Cloud
Storage <https://cloud.google.com/products/cloud-storage/>`__

If you need support for other Google APIs, check out the `Google APIs
Python Client
library <https://github.com/google/google-api-python-client>`__.

Quickstart
----------

The library is ``pip``-installable::
::

$ pip install gcloud
$ python -m gcloud.storage.demo # Runs the storage demo!
$ pip install gcloud

Documentation
-------------
Google Cloud Datastore
----------------------

This comment was marked as spam.


- `gcloud docs (browse all services, quick-starts, walk-throughs) <http://GoogleCloudPlatform.github.io/gcloud-python/>`_
- `gcloud.datastore API docs <http://googlecloudplatform.github.io/gcloud-python/datastore-api.html>`_
- `gcloud.storage API docs <http://googlecloudplatform.github.io/gcloud-python/storage-api.html>`_
- gcloud.bigquery API docs (*coming soon)*
- gcloud.compute API docs *(coming soon)*
- gcloud.dns API docs *(coming soon)*
- gcloud.sql API docs *(coming soon)*
`Google Cloud Datastore <https://developers.google.com/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.

I'm getting weird errors... Can you help?
-----------------------------------------
See the `Google Cloud Datastore
docs <https://developers.google.com/datastore/docs/activate>`__ for more
details on how to activate Cloud Datastore for your project.

Chances are you have some dependency problems...
If you're on Ubuntu,
try installing the pre-compiled packages::
See `the gcloud-python API
documentation <https://googlecloudplatform.github.io/gcloud-python/datastore-api.html>`__
to learn how to interact with the Cloud Datastore using this Client
Library.

$ sudo apt-get install python-crypto python-openssl libffi-dev
.. code:: python

or try installing the development packages
(that have the header files included)
and then ``pip install`` the dependencies again::
from gcloud import datastore
dataset = datastore.get_dataset('dataset-id-here',
'[email protected]',
'/path/to/private.key')
# Then do other things...
query = dataset.query().kind('EntityKind')
entity = dataset.entity('EntityKind')

$ sudo apt-get install python-dev libssl-dev libffi-dev
$ pip install gcloud
Google Cloud Storage
--------------------

How do I build the docs?
------------------------
`Google Cloud Storage <https://developers.google.com/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.

Make sure you have ``sphinx`` installed and::
You need to create a Google Cloud Storage bucket to use this client
library. Follow the steps on the `Google Cloud Storage
docs <https://developers.google.com/storage/docs/cloud-console#_creatingbuckets>`__
to learn how to create a bucket.

$ git clone git://github.com/GoogleCloudPlatform/gcloud-python.git
$ pip install sphinx
$ cd gcloud-python/docs
$ make html
See `the gcloud-python API
documentation <https://googlecloudplatform.github.io/gcloud-python/storage-api.html>`__
to learn how to connect to the Cloud Storage using this Client Library.

How do I run the tests?
-----------------------
.. code:: python

Make sure you have ``nose`` installed and::
import gcloud.storage
bucket = gcloud.storage.get_bucket('bucket-id-here',
'[email protected]',
'/path/to/private.key')
# Then do other things...
key = bucket.get_key('/remote/path/to/file.txt')
print key.get_contents_as_string()
key.set_contents_from_string('New contents!')
bucket.upload_file('/remote/path/storage.txt', '/local/path.txt')

$ git clone git://github.com/GoogleCloudPlatform/gcloud-python.git
$ pip install unittest2 nose
$ cd gcloud-python
$ nosetests
Contributing
------------

How can I contribute?
---------------------
Contributions to this library are always welcome and highly encouraged.

Before we can accept any pull requests
we have to jump through a couple of legal hurdles,
primarily a Contributor License Agreement (CLA):
See `CONTRIBUTING <CONTRIBUTING.rst>`__ for more information on how to
get started.

- **If you are an individual writing original source code**
and you're sure you own the intellectual property,
then you'll need to sign an `individual CLA
<http://code.google.com/legal/individual-cla-v1.0.html>`_.
- **If you work for a company that wants to allow you to contribute your work**,
then you'll need to sign a `corporate CLA
<http://code.google.com/legal/corporate-cla-v1.0.html>`_.
License
-------

You can sign these electronically (just scroll to the bottom).
After that, we'll be able to accept your pull requests.
Apache 2.0 - See `LICENSE <LICENSE>`__ for more information.

.. |build| image:: https://travis-ci.org/GoogleCloudPlatform/gcloud-python.svg?branch=master
:target: https://travis-ci.org/GoogleCloudPlatform/gcloud-python
Expand Down