Skip to content

Commit 36d1266

Browse files
author
tejasgn
committed
metadata and readme changes
1 parent e332a35 commit 36d1266

6 files changed

Lines changed: 264 additions & 9 deletions

File tree

.doc_gen/metadata/iot-data_metadata.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ iot-data-plane_GetThingShadow:
99
- description:
1010
snippet_tags:
1111
- iot.dotnetv4.GetThingShadow
12+
Python:
13+
versions:
14+
- sdk_version: 3
15+
github: python/example_code/iot
16+
excerpts:
17+
- description:
18+
snippet_tags:
19+
- python.example_code.iot.GetThingShadow
1220
Kotlin:
1321
versions:
1422
- sdk_version: 1
@@ -46,6 +54,14 @@ iot-data-plane_UpdateThingShadow:
4654
- description:
4755
snippet_tags:
4856
- iot.dotnetv4.UpdateThingShadow
57+
Python:
58+
versions:
59+
- sdk_version: 3
60+
github: python/example_code/iot
61+
excerpts:
62+
- description:
63+
snippet_tags:
64+
- python.example_code.iot.UpdateThingShadow
4965
Kotlin:
5066
versions:
5167
- sdk_version: 1

.doc_gen/metadata/iot_metadata.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ iot_Hello:
4242
- description: Code for the hello_iot.cpp source file.
4343
snippet_tags:
4444
- cpp.example_code.iot.hello_iot
45+
Python:
46+
versions:
47+
- sdk_version: 3
48+
github: python/example_code/iot
49+
excerpts:
50+
- description:
51+
snippet_tags:
52+
- python.example_code.iot.Hello
4553
services:
4654
iot: {listThings}
4755
iot_DescribeEndpoint:
@@ -87,6 +95,14 @@ iot_DescribeEndpoint:
8795
- description:
8896
snippet_tags:
8997
- cpp.example_code.iot.DescribeEndpoint
98+
Python:
99+
versions:
100+
- sdk_version: 3
101+
github: python/example_code/iot
102+
excerpts:
103+
- description:
104+
snippet_tags:
105+
- python.example_code.iot.DescribeEndpoint
90106
services:
91107
iot: {DescribeEndpoint}
92108
iot_ListThings:
@@ -107,6 +123,14 @@ iot_ListThings:
107123
- description:
108124
snippet_tags:
109125
- iot.rust.list-things
126+
Python:
127+
versions:
128+
- sdk_version: 3
129+
github: python/example_code/iot
130+
excerpts:
131+
- description:
132+
snippet_tags:
133+
- python.example_code.iot.ListThings
110134
services:
111135
iot: {ListThings}
112136
iot_ListCertificates:
@@ -144,6 +168,14 @@ iot_ListCertificates:
144168
- description:
145169
snippet_tags:
146170
- cpp.example_code.iot.ListCertificates
171+
Python:
172+
versions:
173+
- sdk_version: 3
174+
github: python/example_code/iot
175+
excerpts:
176+
- description:
177+
snippet_tags:
178+
- python.example_code.iot.ListCertificates
147179
services:
148180
iot: {ListCertificates}
149181
iot_CreateKeysAndCertificate:
@@ -181,6 +213,14 @@ iot_CreateKeysAndCertificate:
181213
- description:
182214
snippet_tags:
183215
- cpp.example_code.iot.CreateKeysAndCertificate
216+
Python:
217+
versions:
218+
- sdk_version: 3
219+
github: python/example_code/iot
220+
excerpts:
221+
- description:
222+
snippet_tags:
223+
- python.example_code.iot.CreateKeysAndCertificate
184224
services:
185225
iot: {CreateKeysAndCertificate}
186226
iot_DeleteCertificate:
@@ -218,6 +258,14 @@ iot_DeleteCertificate:
218258
- description:
219259
snippet_tags:
220260
- cpp.example_code.iot.DeleteCertificate
261+
Python:
262+
versions:
263+
- sdk_version: 3
264+
github: python/example_code/iot
265+
excerpts:
266+
- description:
267+
snippet_tags:
268+
- python.example_code.iot.DeleteCertificate
221269
services:
222270
iot: {DeleteCertificate}
223271
iot_SearchIndex:
@@ -255,6 +303,14 @@ iot_SearchIndex:
255303
- description:
256304
snippet_tags:
257305
- cpp.example_code.iot.SearchIndex
306+
Python:
307+
versions:
308+
- sdk_version: 3
309+
github: python/example_code/iot
310+
excerpts:
311+
- description:
312+
snippet_tags:
313+
- python.example_code.iot.SearchIndex
258314
services:
259315
iot: {SearchIndex}
260316
iot_UpdateIndexingConfiguration:
@@ -267,6 +323,14 @@ iot_UpdateIndexingConfiguration:
267323
- description:
268324
snippet_tags:
269325
- cpp.example_code.iot.UpdateIndexingConfiguration
326+
Python:
327+
versions:
328+
- sdk_version: 3
329+
github: python/example_code/iot
330+
excerpts:
331+
- description:
332+
snippet_tags:
333+
- python.example_code.iot.UpdateIndexingConfiguration
270334
services:
271335
iot: {UpdateIndexingConfiguration}
272336
iot_DeleteThing:
@@ -304,6 +368,14 @@ iot_DeleteThing:
304368
- description:
305369
snippet_tags:
306370
- cpp.example_code.iot.DeleteThing
371+
Python:
372+
versions:
373+
- sdk_version: 3
374+
github: python/example_code/iot
375+
excerpts:
376+
- description:
377+
snippet_tags:
378+
- python.example_code.iot.DeleteThing
307379
services:
308380
iot: {DeleteThing}
309381
iot_DescribeThing:
@@ -370,6 +442,14 @@ iot_AttachThingPrincipal:
370442
- description:
371443
snippet_tags:
372444
- cpp.example_code.iot.AttachThingPrincipal
445+
Python:
446+
versions:
447+
- sdk_version: 3
448+
github: python/example_code/iot
449+
excerpts:
450+
- description:
451+
snippet_tags:
452+
- python.example_code.iot.AttachThingPrincipal
373453
services:
374454
iot: {AttachThingPrincipal}
375455
iot_DetachThingPrincipal:
@@ -407,6 +487,14 @@ iot_DetachThingPrincipal:
407487
- description:
408488
snippet_tags:
409489
- cpp.example_code.iot.DetachThingPrincipal
490+
Python:
491+
versions:
492+
- sdk_version: 3
493+
github: python/example_code/iot
494+
excerpts:
495+
- description:
496+
snippet_tags:
497+
- python.example_code.iot.DetachThingPrincipal
410498
services:
411499
iot: {DetachThingPrincipal}
412500
iot_UpdateThing:
@@ -473,6 +561,14 @@ iot_CreateTopicRule:
473561
- description:
474562
snippet_tags:
475563
- cpp.example_code.iot.CreateTopicRule
564+
Python:
565+
versions:
566+
- sdk_version: 3
567+
github: python/example_code/iot
568+
excerpts:
569+
- description:
570+
snippet_tags:
571+
- python.example_code.iot.CreateTopicRule
476572
services:
477573
iot: {CreateTopicRule}
478574
iot_DeleteTopicRule:
@@ -485,6 +581,14 @@ iot_DeleteTopicRule:
485581
- description:
486582
snippet_tags:
487583
- cpp.example_code.iot.DeleteTopicRule
584+
Python:
585+
versions:
586+
- sdk_version: 3
587+
github: python/example_code/iot
588+
excerpts:
589+
- description:
590+
snippet_tags:
591+
- python.example_code.iot.DeleteTopicRule
488592
services:
489593
iot: {DeleteTopicRule}
490594
iot_CreateThing:
@@ -522,6 +626,14 @@ iot_CreateThing:
522626
- description:
523627
snippet_tags:
524628
- cpp.example_code.iot.CreateThing
629+
Python:
630+
versions:
631+
- sdk_version: 3
632+
github: python/example_code/iot
633+
excerpts:
634+
- description:
635+
snippet_tags:
636+
- python.example_code.iot.CreateThing
525637
services:
526638
iot: {CreateThing}
527639
iot_Scenario:
@@ -611,5 +723,16 @@ iot_Scenario:
611723
- cpp.example_code.iot.DeleteCertificate
612724
- cpp.example_code.iot.DeleteTopicRule
613725
- cpp.example_code.iot.DeleteThing
726+
Python:
727+
versions:
728+
- sdk_version: 3
729+
github: python/example_code/iot
730+
excerpts:
731+
- description: Create an IoT wrapper class to manage operations.
732+
snippet_tags:
733+
- python.example_code.iot.IoTWrapper
734+
- description: Run an interactive scenario demonstrating IoT basics.
735+
snippet_tags:
736+
- python.example_code.iot.Scenario_GettingStarted
614737
services:
615738
iot: {}

python/example_code/iot/README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,37 @@ python -m pip install -r requirements.txt
3434
<!--custom.prerequisites.start-->
3535
<!--custom.prerequisites.end-->
3636

37+
### Get started
38+
39+
- [Hello AWS IoT](iot_hello.py#L14) (`listThings`)
40+
41+
42+
### Basics
43+
44+
Code examples that show you how to perform the essential operations within a service.
45+
46+
- [Learn the basics](iot_wrapper.py)
47+
48+
49+
### Single actions
50+
51+
Code excerpts that show you how to call individual service functions.
52+
53+
- [AttachThingPrincipal](iot_wrapper.py#L102)
54+
- [CreateKeysAndCertificate](iot_wrapper.py#L80)
55+
- [CreateThing](iot_wrapper.py#L31)
56+
- [CreateTopicRule](iot_wrapper.py#L219)
57+
- [DeleteCertificate](iot_wrapper.py#L196)
58+
- [DeleteThing](iot_wrapper.py#L318)
59+
- [DeleteTopicRule](iot_wrapper.py#L338)
60+
- [DescribeEndpoint](iot_wrapper.py#L125)
61+
- [DetachThingPrincipal](iot_wrapper.py#L173)
62+
- [ListCertificates](iot_wrapper.py#L148)
63+
- [ListThings](iot_wrapper.py#L55)
64+
- [SearchIndex](iot_wrapper.py#L275)
65+
- [UpdateIndexingConfiguration](iot_wrapper.py#L298)
66+
67+
3768
<!--custom.examples.start-->
3869
<!--custom.examples.end-->
3970

@@ -45,6 +76,42 @@ python -m pip install -r requirements.txt
4576
<!--custom.instructions.start-->
4677
<!--custom.instructions.end-->
4778

79+
#### Hello AWS IoT
80+
81+
This example shows you how to get started using AWS IoT.
82+
83+
```
84+
python iot_hello.py
85+
```
86+
87+
#### Learn the basics
88+
89+
This example shows you how to do the following:
90+
91+
- Create an AWS IoT Thing.
92+
- Generate a device certificate.
93+
- Update an AWS IoT Thing with Attributes.
94+
- Return a unique endpoint.
95+
- List your AWS IoT certificates.
96+
- Update an AWS IoT shadow.
97+
- Write out state information.
98+
- Creates a rule.
99+
- List your rules.
100+
- Search things using the Thing name.
101+
- Delete an AWS IoT Thing.
102+
103+
<!--custom.basic_prereqs.iot_Scenario.start-->
104+
<!--custom.basic_prereqs.iot_Scenario.end-->
105+
106+
Start the example by running the following at a command prompt:
107+
108+
```
109+
python iot_wrapper.py
110+
```
111+
112+
113+
<!--custom.basics.iot_Scenario.start-->
114+
<!--custom.basics.iot_Scenario.end-->
48115

49116

50117
### Tests
@@ -73,4 +140,4 @@ in the `python` folder.
73140

74141
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
75142

76-
SPDX-License-Identifier: Apache-2.0
143+
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)