forked from googleapis/google-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview.html
More file actions
46 lines (33 loc) · 964 Bytes
/
overview.html
File metadata and controls
46 lines (33 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<h2>Getting started</h2>
<p>
The <code>google-cloud</code> library is <code>pip</code> install-able:
</p>
<div hljs>
$ pip install google-cloud
</div>
<hr>
<h3>Cloud Datastore</h3>
<p>
<a href="https://developers.google.com/datastore/">Google Cloud Datastore</a> is a fully managed,
schemaless database for storing non-relational data.
</p>
<div hljs>
from google.cloud import datastore
client = datastore.Client()
key = client.key('Person')
entity = datastore.Entity(key=key)
entity['name'] = 'Your name'
entity['age'] = 25
client.put(entity)
</div>
<h3>Cloud Storage</h3>
<p>
<a href="https://developers.google.com/storage/">Google Cloud Storage</a> allows you to store data on Google infrastructure.
</p>
<div hljs>
from google.cloud import storage
client = storage.Client()
bucket = client.get_bucket('<your-bucket-name>')
blob = bucket.blob('my-test-file.txt')
blob.upload_from_string('this is test content!')
</div>