Skip to content

Commit 91d4337

Browse files
committed
Merge pull request #70 from jgeewax/gh-pages
Automatic update of documentation.
2 parents bec8741 + d93ecca commit 91d4337

16 files changed

+1053
-119
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+
5+
6+
<html xmlns="http://www.w3.org/1999/xhtml">
7+
<head>
8+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9+
10+
<title>&lt;no title&gt; &mdash; gcloud 0.1 documentation</title>
11+
12+
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
13+
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14+
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
15+
16+
<script type="text/javascript">
17+
var DOCUMENTATION_OPTIONS = {
18+
URL_ROOT: '../',
19+
VERSION: '0.1',
20+
COLLAPSE_INDEX: false,
21+
FILE_SUFFIX: '.html',
22+
HAS_SOURCE: true
23+
};
24+
</script>
25+
<script type="text/javascript" src="../_static/jquery.js"></script>
26+
<script type="text/javascript" src="../_static/underscore.js"></script>
27+
<script type="text/javascript" src="../_static/doctools.js"></script>
28+
<script type="text/javascript" src="../_static/sidebar.js"></script>
29+
<link rel="top" title="gcloud 0.1 documentation" href="../index.html" />
30+
</head>
31+
<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>
32+
<div id="sandbar">
33+
<header id="gc-googlebar">
34+
<a id="gc-logo" href="../index.html">
35+
<img src="_static/cloudplatform-horizontal.png" alt="Google">
36+
</a>
37+
<form class="gc-search" action="search.html" method="GET">
38+
<div class="searchbox" style="width: 429px;">
39+
<span class="button button-blue mini">Google Cloud Python API</span>
40+
<input type="hidden" name="check_keywords" value="yes">
41+
<input type="hidden" name="area" value="default">
42+
<input type="text" name="q" class="q" id="q" value=""
43+
placeholder="Search" autocomplete="off" style="width: 263px;">
44+
</div>
45+
<button class="button button-blue" style="top: 0px; left: 444px;">
46+
<img src="_static/search.png" alt="Search">
47+
</button>
48+
49+
<input type="hidden" name="p" id="search_project" value="/compute">
50+
51+
</form>
52+
</header>
53+
</div>
54+
55+
<div id="gc-wrapper">
56+
<div id="gc-appbar">
57+
<h1><a href="../index.html">gcloud 0.1 documentation</a></h1>
58+
</div>
59+
<div id="gc-main" class="main">
60+
<div id="gc-sidebar" class="sphinxsidebar" role="navigation" aria-label="main navigation">
61+
<div class="sphinxsidebarwrapper">
62+
63+
<h3>All API Docs</h3>
64+
<nav class="gc-toc">
65+
<ul>
66+
<li class="toctree-l1"><a class="reference internal" href="../datastore-api.html">Cloud Datastore</a></li>
67+
<li class="toctree-l1"><a class="reference internal" href="../storage-api.html">Cloud Storage</a></li>
68+
<li class="toctree-l1"><a class="reference internal" href="../common-api.html">Cloud Common</a></li>
69+
</ul>
70+
71+
</nav>
72+
73+
74+
</div>
75+
</div>
76+
77+
<div class="document">
78+
<div class="documentwrapper">
79+
<div class="bodywrapper">
80+
<div class="body" role="main" id="gc-content">
81+
82+
<ul>
83+
<li><p class="first"><strong>Create a project</strong></p>
84+
<p>Start off by visiting <a class="reference external" href="https://cloud.google.com/console">https://cloud.google.com/console</a>
85+
and click on the big red button
86+
that says &#8220;Create Project&#8221;.</p>
87+
</li>
88+
<li><p class="first"><strong>Choose a name</strong></p>
89+
<p>In the box that says &#8220;name&#8221;,
90+
choose something friendly.
91+
This is going to be the <em>human-readable</em> name
92+
for your project.</p>
93+
</li>
94+
<li><p class="first"><strong>Choose an ID</strong></p>
95+
<p>In the box that says &#8220;ID&#8221;,
96+
choose something unique
97+
(hyphens are OK).
98+
I typically choose a project name
99+
that starts with my initials,
100+
then a hyphen,
101+
then a unique identifier for the work I&#8217;m doing.
102+
For this example,
103+
you might choose <tt class="docutils literal"><span class="pre">&lt;initials&gt;-quickstart</span></tt>.</p>
104+
</li>
105+
</ul>
106+
<p>Then click OK
107+
(give it a second to create your project).</p>
108+
109+
110+
</div>
111+
</div>
112+
</div>
113+
<div class="clearer"></div>
114+
</div>
115+
</div>
116+
</div>
117+
<footer id="gc-footer" class="footer" role="contentinfo">
118+
<div id="gc-copyright">
119+
&copy; Copyright 2014, JJ Geewax.
120+
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
121+
</div>
122+
</footer>
123+
</body>
124+
</html>
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+
5+
6+
<html xmlns="http://www.w3.org/1999/xhtml">
7+
<head>
8+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9+
10+
<title>&lt;no title&gt; &mdash; gcloud 0.1 documentation</title>
11+
12+
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
13+
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14+
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
15+
16+
<script type="text/javascript">
17+
var DOCUMENTATION_OPTIONS = {
18+
URL_ROOT: '../',
19+
VERSION: '0.1',
20+
COLLAPSE_INDEX: false,
21+
FILE_SUFFIX: '.html',
22+
HAS_SOURCE: true
23+
};
24+
</script>
25+
<script type="text/javascript" src="../_static/jquery.js"></script>
26+
<script type="text/javascript" src="../_static/underscore.js"></script>
27+
<script type="text/javascript" src="../_static/doctools.js"></script>
28+
<script type="text/javascript" src="../_static/sidebar.js"></script>
29+
<link rel="top" title="gcloud 0.1 documentation" href="../index.html" />
30+
</head>
31+
<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>
32+
<div id="sandbar">
33+
<header id="gc-googlebar">
34+
<a id="gc-logo" href="../index.html">
35+
<img src="_static/cloudplatform-horizontal.png" alt="Google">
36+
</a>
37+
<form class="gc-search" action="search.html" method="GET">
38+
<div class="searchbox" style="width: 429px;">
39+
<span class="button button-blue mini">Google Cloud Python API</span>
40+
<input type="hidden" name="check_keywords" value="yes">
41+
<input type="hidden" name="area" value="default">
42+
<input type="text" name="q" class="q" id="q" value=""
43+
placeholder="Search" autocomplete="off" style="width: 263px;">
44+
</div>
45+
<button class="button button-blue" style="top: 0px; left: 444px;">
46+
<img src="_static/search.png" alt="Search">
47+
</button>
48+
49+
<input type="hidden" name="p" id="search_project" value="/compute">
50+
51+
</form>
52+
</header>
53+
</div>
54+
55+
<div id="gc-wrapper">
56+
<div id="gc-appbar">
57+
<h1><a href="../index.html">gcloud 0.1 documentation</a></h1>
58+
</div>
59+
<div id="gc-main" class="main">
60+
<div id="gc-sidebar" class="sphinxsidebar" role="navigation" aria-label="main navigation">
61+
<div class="sphinxsidebarwrapper">
62+
63+
<h3>All API Docs</h3>
64+
<nav class="gc-toc">
65+
<ul>
66+
<li class="toctree-l1"><a class="reference internal" href="../datastore-api.html">Cloud Datastore</a></li>
67+
<li class="toctree-l1"><a class="reference internal" href="../storage-api.html">Cloud Storage</a></li>
68+
<li class="toctree-l1"><a class="reference internal" href="../common-api.html">Cloud Common</a></li>
69+
</ul>
70+
71+
</nav>
72+
73+
74+
</div>
75+
</div>
76+
77+
<div class="document">
78+
<div class="documentwrapper">
79+
<div class="bodywrapper">
80+
<div class="body" role="main" id="gc-content">
81+
82+
<p>Now that you have a project,
83+
we need to make sure we are able to access our data.
84+
There are many ways to authenticate,
85+
but we&#8217;re going to use a Service Account for today.</p>
86+
<p>A <em>Service Account</em> is sort of like a username and password
87+
(like when you&#8217;re connecting to your MySQL database),
88+
except the username is automatically generated
89+
(and is an e-mail address)
90+
and the password is actually a private key file.</p>
91+
<p>To create a Service Account:</p>
92+
<ul>
93+
<li><p class="first"><strong>Click on Credentials</strong>
94+
under the &#8220;APIs &amp; Auth&#8221; section.</p>
95+
</li>
96+
<li><p class="first"><strong>Click the big red button</strong>
97+
that says &#8220;Create New Client ID&#8221;
98+
under the OAuth section
99+
(the first one).</p>
100+
</li>
101+
<li><p class="first"><strong>Choose &#8220;Service Account&#8221;</strong>
102+
and click the blue button
103+
that says &#8220;Create Client ID&#8221;.</p>
104+
</li>
105+
<li><p class="first"><strong>This will automatically</strong>
106+
download a private key file.
107+
<strong>Do not lose this.</strong></p>
108+
</li>
109+
<li><p class="first"><strong>Rename your key</strong> something shorter.
110+
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>
111+
<p>This is like your password for the account.</p>
112+
</li>
113+
<li><p class="first"><strong>Copy the long weird e-mail address</strong>
114+
labeled &#8220;E-mail address&#8221;
115+
in the information section
116+
for the Service Account
117+
you just created.</p>
118+
<p>This is like your username for the account.</p>
119+
</li>
120+
</ul>
121+
122+
123+
</div>
124+
</div>
125+
</div>
126+
<div class="clearer"></div>
127+
</div>
128+
</div>
129+
</div>
130+
<footer id="gc-footer" class="footer" role="contentinfo">
131+
<div id="gc-copyright">
132+
&copy; Copyright 2014, JJ Geewax.
133+
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
134+
</div>
135+
</footer>
136+
</body>
137+
</html>

_modules/gcloud/datastore/helpers.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h3>All API Docs</h3>
8383
<h1>Source code for gcloud.datastore.helpers</h1><div class="highlight"><pre>
8484
<span class="sd">&quot;&quot;&quot;Helper methods for dealing with Cloud Datastore&#39;s Protobuf API.&quot;&quot;&quot;</span>
8585
<span class="kn">import</span> <span class="nn">calendar</span>
86-
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
86+
<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>
8787

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

@@ -162,7 +162,7 @@ <h1>Source code for gcloud.datastore.helpers</h1><div class="highlight"><pre>
162162
<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>
163163
<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>
164164
<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>
165-
<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>
165+
<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>
166166

167167
<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>
168168
<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>

_modules/gcloud/storage/acl.html

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,25 @@ <h1>Source code for gcloud.storage.acl</h1><div class="highlight"><pre>
9898
<span class="sd">Adding and removing permissions can be done with the following methods</span>
9999
<span class="sd">(in increasing order of granularity):</span>
100100

101-
<span class="sd"> - :func:`ACL.all`</span>
102-
<span class="sd"> corresponds to access for all users.</span>
103-
<span class="sd"> - :func:`ACL.all_authenticated` corresponds</span>
104-
<span class="sd"> to access for all users that are signed into a Google account.</span>
105-
<span class="sd"> - :func:`ACL.domain` corresponds to access on a</span>
106-
<span class="sd"> per Google Apps domain (ie, ``example.com``).</span>
107-
<span class="sd"> - :func:`ACL.group` corresponds to access on a</span>
108-
<span class="sd"> per group basis (either by ID or e-mail address).</span>
109-
<span class="sd"> - :func:`ACL.user` corresponds to access on a</span>
110-
<span class="sd"> per user basis (either by ID or e-mail address).</span>
111-
112-
<span class="sd">And you are able to ``grant`` and ``revoke`` the following roles::</span>
113-
114-
<span class="sd"> - :func:`ACL.Entity.grant_read` and :func:`ACL.Entity.revoke_read`</span>
115-
<span class="sd"> - :func:`ACL.Entity.grant_write` and :func:`ACL.Entity.revoke_write`</span>
116-
<span class="sd"> - :func:`ACL.Entity.grant_owner` and :func:`ACL.Entity.revoke_owner`</span>
101+
<span class="sd">- :func:`ACL.all`</span>
102+
<span class="sd"> corresponds to access for all users.</span>
103+
<span class="sd">- :func:`ACL.all_authenticated` corresponds</span>
104+
<span class="sd"> to access for all users that are signed into a Google account.</span>
105+
<span class="sd">- :func:`ACL.domain` corresponds to access on a</span>
106+
<span class="sd"> per Google Apps domain (ie, ``example.com``).</span>
107+
<span class="sd">- :func:`ACL.group` corresponds to access on a</span>
108+
<span class="sd"> per group basis (either by ID or e-mail address).</span>
109+
<span class="sd">- :func:`ACL.user` corresponds to access on a</span>
110+
<span class="sd"> per user basis (either by ID or e-mail address).</span>
111+
112+
<span class="sd">And you are able to ``grant`` and ``revoke`` the following roles:</span>
113+
114+
<span class="sd">- **Reading**:</span>
115+
<span class="sd"> :func:`ACL.Entity.grant_read` and :func:`ACL.Entity.revoke_read`</span>
116+
<span class="sd">- **Writing**:</span>
117+
<span class="sd"> :func:`ACL.Entity.grant_write` and :func:`ACL.Entity.revoke_write`</span>
118+
<span class="sd">- **Owning**:</span>
119+
<span class="sd"> :func:`ACL.Entity.grant_owner` and :func:`ACL.Entity.revoke_owner`</span>
117120

118121
<span class="sd">You can use any of these like any other factory method</span>
119122
<span class="sd">(these happen to be :class:`ACL.Entity` factories)::</span>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
* **Create a project**
2+
3+
Start off by visiting https://cloud.google.com/console
4+
and click on the big red button
5+
that says "Create Project".
6+
7+
* **Choose a name**
8+
9+
In the box that says "name",
10+
choose something friendly.
11+
This is going to be the *human-readable* name
12+
for your project.
13+
14+
* **Choose an ID**
15+
16+
In the box that says "ID",
17+
choose something unique
18+
(hyphens are OK).
19+
I typically choose a project name
20+
that starts with my initials,
21+
then a hyphen,
22+
then a unique identifier for the work I'm doing.
23+
For this example,
24+
you might choose ``<initials>-quickstart``.
25+
26+
Then click OK
27+
(give it a second to create your project).
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Now that you have a project,
2+
we need to make sure we are able to access our data.
3+
There are many ways to authenticate,
4+
but we're going to use a Service Account for today.
5+
6+
A *Service Account* is sort of like a username and password
7+
(like when you're connecting to your MySQL database),
8+
except the username is automatically generated
9+
(and is an e-mail address)
10+
and the password is actually a private key file.
11+
12+
To create a Service Account:
13+
14+
* **Click on Credentials**
15+
under the "APIs & Auth" section.
16+
17+
* **Click the big red button**
18+
that says "Create New Client ID"
19+
under the OAuth section
20+
(the first one).
21+
22+
* **Choose "Service Account"**
23+
and click the blue button
24+
that says "Create Client ID".
25+
26+
* **This will automatically**
27+
download a private key file.
28+
**Do not lose this.**
29+
30+
* **Rename your key** something shorter.
31+
I like to name the key ``<project name>.p12``.
32+
33+
This is like your password for the account.
34+
35+
* **Copy the long weird e-mail address**
36+
labeled "E-mail address"
37+
in the information section
38+
for the Service Account
39+
you just created.
40+
41+
This is like your username for the account.

0 commit comments

Comments
 (0)