1
1
# Google Objects
2
2
Thin, pythonic OO wrapper around Google's "google-api-python-client" library.
3
- Currently supports Python 3+ : snake :: snake :: snake :
3
+ Currently supports Python 3+
4
4
5
5
## Installation
6
6
``` bash
@@ -12,7 +12,7 @@ Requires a valid Google API Credentials object from Google's excellent oauth2lib
12
12
13
13
### Google Drive v3
14
14
15
- - [x] Retrieve drive 'About' information:
15
+ - Retrieve drive 'About' information:
16
16
17
17
``` python
18
18
from google_objects import DriveClient
@@ -29,7 +29,7 @@ print(about.photo)
29
29
# ...
30
30
```
31
31
32
- - [x] List files in drive by type:
32
+ - List files in drive by type:
33
33
34
34
``` python
35
35
files_by_type = {
@@ -49,7 +49,7 @@ for file in files_by_type['spreadsheets']:
49
49
# ...
50
50
```
51
51
52
- - [x] Copy and share file:
52
+ - Copy and share file:
53
53
54
54
``` python
55
55
file = gdrive.get_file(' FILE_ID' )
@@ -64,7 +64,7 @@ print(permission.role, permission.type, permission.email)
64
64
65
65
### Google Slides v1
66
66
67
- - [x] Retrieve presentation and loop through elements:
67
+ - Retrieve presentation and loop through elements:
68
68
69
69
``` python
70
70
from google_objects import SlidesClient
@@ -81,15 +81,15 @@ for slide in presentation:
81
81
# Shape, Table, etc
82
82
```
83
83
84
- - [x] Check text in shape:
84
+ - Check text in shape:
85
85
86
86
``` python
87
87
shape = presentation.get_element_by_id(' SHAPE_ID' )
88
88
for segment in shape.text:
89
89
print (segment.text)
90
90
```
91
91
92
- - [x] Batch update every cell in table:
92
+ - Batch update every cell in table:
93
93
94
94
``` python
95
95
# use with to perform batch updates in block
@@ -104,7 +104,7 @@ with presentation as pres:
104
104
105
105
### Google Sheets v4
106
106
107
- - [x] Retrieve spreadsheet and loop through sheets:
107
+ - Retrieve spreadsheet and loop through sheets:
108
108
109
109
``` python
110
110
from google_objects import SheetsClient
@@ -116,22 +116,22 @@ for sheet in spreadsheet:
116
116
print (sheet.id, sheet.title)
117
117
```
118
118
119
- - [x] Get sheet by name and return its full block of values:
119
+ - Get sheet by name and return its full block of values:
120
120
121
121
``` python
122
122
sheet = spreadsheet[' Sheet 1' ]
123
123
values = sheet.values()
124
124
```
125
125
126
- - [x] Get named range value block:
126
+ - Get named range value block:
127
127
128
128
``` python
129
129
named_ranges = spreadsheet.named_ranges(' SHEET_NAME!A:C' )
130
130
for rng in named_range:
131
131
values = named_range.get_block()
132
132
```
133
133
134
- - [x] Update values block:
134
+ - Update values block:
135
135
136
136
``` python
137
137
values = spreadsheet.get_range(' SHEET_NAME!A:C' )
@@ -146,7 +146,7 @@ values[2:5] = [[1,2,4], [4, 5, 6], [6, 7, 8]]
146
146
values.update()
147
147
```
148
148
149
- - [x] Append to values block:
149
+ - Append to values block:
150
150
151
151
``` python
152
152
to_append = [[1 , 2 , 3 ], [4 , 5 , 6 ]]
0 commit comments