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

Automatic update of documentation. #70

Merged
merged 1 commit into from
Mar 31, 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
124 changes: 124 additions & 0 deletions _components/creating-a-project.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>&lt;no title&gt; &mdash; gcloud 0.1 documentation</title>

<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="top" title="gcloud 0.1 documentation" href="../index.html" />
</head>
<body role="document" class="two-column docs"><a href="https://github.com/GoogleCloudPlatform/gcloud-python"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 999;" src="_static/forkme.png" alt="Fork me on GitHub"></a>
<div id="sandbar">
<header id="gc-googlebar">
<a id="gc-logo" href="../index.html">
<img src="_static/cloudplatform-horizontal.png" alt="Google">
</a>
<form class="gc-search" action="search.html" method="GET">
<div class="searchbox" style="width: 429px;">
<span class="button button-blue mini">Google Cloud Python API</span>
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
<input type="text" name="q" class="q" id="q" value=""
placeholder="Search" autocomplete="off" style="width: 263px;">
</div>
<button class="button button-blue" style="top: 0px; left: 444px;">
<img src="_static/search.png" alt="Search">
</button>

<input type="hidden" name="p" id="search_project" value="/compute">

</form>
</header>
</div>

<div id="gc-wrapper">
<div id="gc-appbar">
<h1><a href="../index.html">gcloud 0.1 documentation</a></h1>
</div>
<div id="gc-main" class="main">
<div id="gc-sidebar" class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">

<h3>All API Docs</h3>
<nav class="gc-toc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../datastore-api.html">Cloud Datastore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../storage-api.html">Cloud Storage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../common-api.html">Cloud Common</a></li>
</ul>

</nav>


</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main" id="gc-content">

<ul>
<li><p class="first"><strong>Create a project</strong></p>
<p>Start off by visiting <a class="reference external" href="https://cloud.google.com/console">https://cloud.google.com/console</a>
and click on the big red button
that says &#8220;Create Project&#8221;.</p>
</li>
<li><p class="first"><strong>Choose a name</strong></p>
<p>In the box that says &#8220;name&#8221;,
choose something friendly.
This is going to be the <em>human-readable</em> name
for your project.</p>
</li>
<li><p class="first"><strong>Choose an ID</strong></p>
<p>In the box that says &#8220;ID&#8221;,
choose something unique
(hyphens are OK).
I typically choose a project name
that starts with my initials,
then a hyphen,
then a unique identifier for the work I&#8217;m doing.
For this example,
you might choose <tt class="docutils literal"><span class="pre">&lt;initials&gt;-quickstart</span></tt>.</p>
</li>
</ul>
<p>Then click OK
(give it a second to create your project).</p>


</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<footer id="gc-footer" class="footer" role="contentinfo">
<div id="gc-copyright">
&copy; Copyright 2014, JJ Geewax.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
</div>
</footer>
</body>
</html>
137 changes: 137 additions & 0 deletions _components/enabling-a-service-account.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>&lt;no title&gt; &mdash; gcloud 0.1 documentation</title>

<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="top" title="gcloud 0.1 documentation" href="../index.html" />
</head>
<body role="document" class="two-column docs"><a href="https://github.com/GoogleCloudPlatform/gcloud-python"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 999;" src="_static/forkme.png" alt="Fork me on GitHub"></a>
<div id="sandbar">
<header id="gc-googlebar">
<a id="gc-logo" href="../index.html">
<img src="_static/cloudplatform-horizontal.png" alt="Google">
</a>
<form class="gc-search" action="search.html" method="GET">
<div class="searchbox" style="width: 429px;">
<span class="button button-blue mini">Google Cloud Python API</span>
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
<input type="text" name="q" class="q" id="q" value=""
placeholder="Search" autocomplete="off" style="width: 263px;">
</div>
<button class="button button-blue" style="top: 0px; left: 444px;">
<img src="_static/search.png" alt="Search">
</button>

<input type="hidden" name="p" id="search_project" value="/compute">

</form>
</header>
</div>

<div id="gc-wrapper">
<div id="gc-appbar">
<h1><a href="../index.html">gcloud 0.1 documentation</a></h1>
</div>
<div id="gc-main" class="main">
<div id="gc-sidebar" class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">

<h3>All API Docs</h3>
<nav class="gc-toc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../datastore-api.html">Cloud Datastore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../storage-api.html">Cloud Storage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../common-api.html">Cloud Common</a></li>
</ul>

</nav>


</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main" id="gc-content">

<p>Now that you have a project,
we need to make sure we are able to access our data.
There are many ways to authenticate,
but we&#8217;re going to use a Service Account for today.</p>
<p>A <em>Service Account</em> is sort of like a username and password
(like when you&#8217;re connecting to your MySQL database),
except the username is automatically generated
(and is an e-mail address)
and the password is actually a private key file.</p>
<p>To create a Service Account:</p>
<ul>
<li><p class="first"><strong>Click on Credentials</strong>
under the &#8220;APIs &amp; Auth&#8221; section.</p>
</li>
<li><p class="first"><strong>Click the big red button</strong>
that says &#8220;Create New Client ID&#8221;
under the OAuth section
(the first one).</p>
</li>
<li><p class="first"><strong>Choose &#8220;Service Account&#8221;</strong>
and click the blue button
that says &#8220;Create Client ID&#8221;.</p>
</li>
<li><p class="first"><strong>This will automatically</strong>
download a private key file.
<strong>Do not lose this.</strong></p>
</li>
<li><p class="first"><strong>Rename your key</strong> something shorter.
I like to name the key <tt class="docutils literal"><span class="pre">&lt;project</span> <span class="pre">name&gt;.p12</span></tt>.</p>
<p>This is like your password for the account.</p>
</li>
<li><p class="first"><strong>Copy the long weird e-mail address</strong>
labeled &#8220;E-mail address&#8221;
in the information section
for the Service Account
you just created.</p>
<p>This is like your username for the account.</p>
</li>
</ul>


</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<footer id="gc-footer" class="footer" role="contentinfo">
<div id="gc-copyright">
&copy; Copyright 2014, JJ Geewax.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
</div>
</footer>
</body>
</html>
4 changes: 2 additions & 2 deletions _modules/gcloud/datastore/helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>All API Docs</h3>
<h1>Source code for gcloud.datastore.helpers</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;Helper methods for dealing with Cloud Datastore&#39;s Protobuf API.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">calendar</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span>

<span class="kn">import</span> <span class="nn">pytz</span>

Expand Down Expand Up @@ -162,7 +162,7 @@ <h1>Source code for gcloud.datastore.helpers</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">pb</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">HasField</span><span class="p">(</span><span class="s">&#39;timestamp_microseconds_value&#39;</span><span class="p">):</span>
<span class="n">microseconds</span> <span class="o">=</span> <span class="n">pb</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">timestamp_microseconds_value</span>
<span class="k">return</span> <span class="p">(</span><span class="n">datetime</span><span class="o">.</span><span class="n">utcfromtimestamp</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="o">+</span>
<span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span><span class="n">microseconds</span><span class="o">=</span><span class="n">microseconds</span><span class="p">))</span>
<span class="n">timedelta</span><span class="p">(</span><span class="n">microseconds</span><span class="o">=</span><span class="n">microseconds</span><span class="p">))</span>

<span class="k">elif</span> <span class="n">pb</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">HasField</span><span class="p">(</span><span class="s">&#39;key_value&#39;</span><span class="p">):</span>
<span class="k">return</span> <span class="n">Key</span><span class="o">.</span><span class="n">from_protobuf</span><span class="p">(</span><span class="n">pb</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">key_value</span><span class="p">)</span>
Expand Down
35 changes: 19 additions & 16 deletions _modules/gcloud/storage/acl.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,25 @@ <h1>Source code for gcloud.storage.acl</h1><div class="highlight"><pre>
<span class="sd">Adding and removing permissions can be done with the following methods</span>
<span class="sd">(in increasing order of granularity):</span>

<span class="sd"> - :func:`ACL.all`</span>
<span class="sd"> corresponds to access for all users.</span>
<span class="sd"> - :func:`ACL.all_authenticated` corresponds</span>
<span class="sd"> to access for all users that are signed into a Google account.</span>
<span class="sd"> - :func:`ACL.domain` corresponds to access on a</span>
<span class="sd"> per Google Apps domain (ie, ``example.com``).</span>
<span class="sd"> - :func:`ACL.group` corresponds to access on a</span>
<span class="sd"> per group basis (either by ID or e-mail address).</span>
<span class="sd"> - :func:`ACL.user` corresponds to access on a</span>
<span class="sd"> per user basis (either by ID or e-mail address).</span>

<span class="sd">And you are able to ``grant`` and ``revoke`` the following roles::</span>

<span class="sd"> - :func:`ACL.Entity.grant_read` and :func:`ACL.Entity.revoke_read`</span>
<span class="sd"> - :func:`ACL.Entity.grant_write` and :func:`ACL.Entity.revoke_write`</span>
<span class="sd"> - :func:`ACL.Entity.grant_owner` and :func:`ACL.Entity.revoke_owner`</span>
<span class="sd">- :func:`ACL.all`</span>
<span class="sd"> corresponds to access for all users.</span>
<span class="sd">- :func:`ACL.all_authenticated` corresponds</span>
<span class="sd"> to access for all users that are signed into a Google account.</span>
<span class="sd">- :func:`ACL.domain` corresponds to access on a</span>
<span class="sd"> per Google Apps domain (ie, ``example.com``).</span>
<span class="sd">- :func:`ACL.group` corresponds to access on a</span>
<span class="sd"> per group basis (either by ID or e-mail address).</span>
<span class="sd">- :func:`ACL.user` corresponds to access on a</span>
<span class="sd"> per user basis (either by ID or e-mail address).</span>

<span class="sd">And you are able to ``grant`` and ``revoke`` the following roles:</span>

<span class="sd">- **Reading**:</span>
<span class="sd"> :func:`ACL.Entity.grant_read` and :func:`ACL.Entity.revoke_read`</span>
<span class="sd">- **Writing**:</span>
<span class="sd"> :func:`ACL.Entity.grant_write` and :func:`ACL.Entity.revoke_write`</span>
<span class="sd">- **Owning**:</span>
<span class="sd"> :func:`ACL.Entity.grant_owner` and :func:`ACL.Entity.revoke_owner`</span>

<span class="sd">You can use any of these like any other factory method</span>
<span class="sd">(these happen to be :class:`ACL.Entity` factories)::</span>
Expand Down
27 changes: 27 additions & 0 deletions _sources/_components/creating-a-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* **Create a project**

Start off by visiting https://cloud.google.com/console
and click on the big red button
that says "Create Project".

* **Choose a name**

In the box that says "name",
choose something friendly.
This is going to be the *human-readable* name
for your project.

* **Choose an ID**

In the box that says "ID",
choose something unique
(hyphens are OK).
I typically choose a project name
that starts with my initials,
then a hyphen,
then a unique identifier for the work I'm doing.
For this example,
you might choose ``<initials>-quickstart``.

Then click OK
(give it a second to create your project).
41 changes: 41 additions & 0 deletions _sources/_components/enabling-a-service-account.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Now that you have a project,
we need to make sure we are able to access our data.
There are many ways to authenticate,
but we're going to use a Service Account for today.

A *Service Account* is sort of like a username and password
(like when you're connecting to your MySQL database),
except the username is automatically generated
(and is an e-mail address)
and the password is actually a private key file.

To create a Service Account:

* **Click on Credentials**
under the "APIs & Auth" section.

* **Click the big red button**
that says "Create New Client ID"
under the OAuth section
(the first one).

* **Choose "Service Account"**
and click the blue button
that says "Create Client ID".

* **This will automatically**
download a private key file.
**Do not lose this.**

* **Rename your key** something shorter.
I like to name the key ``<project name>.p12``.

This is like your password for the account.

* **Copy the long weird e-mail address**
labeled "E-mail address"
in the information section
for the Service Account
you just created.

This is like your username for the account.
Loading