Skip to content

Commit e7404c3

Browse files
authored
Readme cleanup (#524)
* readme cleanup * Update FAQ.md * Update README.md * Update README.md * Update FAQ.md * Update README.md * codebuild trigger
1 parent 88905b6 commit e7404c3

File tree

2 files changed

+50
-63
lines changed

2 files changed

+50
-63
lines changed

README.md

Lines changed: 11 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,14 @@
22

33
[![Version](https://img.shields.io/pypi/v/awsiotsdk.svg?style=flat)](https://pypi.org/project/awsiotsdk/)
44

5-
This document provides information about the AWS IoT Device SDK v2 for Python.
6-
7-
If you have any issues or feature requests, please file an issue or pull request.
8-
9-
API documentation: https://aws.github.io/aws-iot-device-sdk-python-v2/
10-
11-
This SDK is built on the AWS Common Runtime, a collection of libraries
12-
([aws-c-common](https://github.com/awslabs/aws-c-common),
13-
[aws-c-io](https://github.com/awslabs/aws-c-io),
14-
[aws-c-mqtt](https://github.com/awslabs/aws-c-mqtt),
15-
[aws-c-compression](https://github.com/awslabs/aws-c-compression),
16-
[aws-c-http](https://github.com/awslabs/aws-c-http),
17-
[aws-c-cal](https://github.com/awslabs/aws-c-cal),
18-
[aws-c-auth](https://github.com/awslabs/aws-c-auth),
19-
[s2n](https://github.com/awslabs/s2n) ...) written in C to be
20-
cross-platform, high-performance, secure, and reliable. The libraries are bound
21-
to Python by the `awscrt` package ([PyPI](https://pypi.org/project/awscrt/)) ([Github](https://github.com/awslabs/aws-crt-python)).
5+
This document provides information about the AWS IoT Device SDK v2 for Python. This SDK is built on the [AWS Common Runtime](https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html)
226

237
*__Jump To:__*
248
* [Installation](#installation)
259
* [Samples](samples)
2610
* [Getting Help](#getting-help)
2711
* [FAQ](./documents/FAQ.md)
28-
* [Giving Feedback and Contributions](#giving-feedback-and-contributions)
12+
* [API Docs](https://aws.github.io/aws-iot-device-sdk-python-v2/)
2913
* [MQTT5 User Guide](./documents/MQTT5_Userguide.md)
3014

3115

@@ -60,73 +44,37 @@ cd sdk-workspace
6044
# 2. Clone the repository. You could select the version of the SDK you desire to use.
6145
git clone -b <SDK_VERSION> https://github.com/aws/aws-iot-device-sdk-python-v2.git
6246

63-
# 3. (Optional) Setup the version number of your local build. The default version for awsiotsdk is set to "1.0.0-dev", you can set the version number of the local build in "aws-iot-device-sdk-python-v2/awsiot/__init__.py"
64-
sed -i "s/__version__ = '1.0.0-dev'/__version__ = '<SDK_VERSION>'/" aws-iot-device-sdk-python-v2/awsiot/__init__.py
47+
# 3. (Optional) Setup the version number of your local build. The default version
48+
# for awsiotsdk is set to "1.0.0-dev", you can set the version number of the
49+
# local build in "aws-iot-device-sdk-python-v2/awsiot/__init__.py"
50+
sed -i "s/__version__ = '1.0.0-dev'/__version__ = '<SDK_VERSION>'/" \
51+
aws-iot-device-sdk-python-v2/awsiot/__init__.py
6552

6653
# 4. Install using Pip (use 'python' instead of 'python3' on Windows)
6754
python3 -m pip install ./aws-iot-device-sdk-python-v2
6855
```
6956

70-
71-
### Installation Issues
72-
73-
`awsiotsdk` depends on [awscrt](https://github.com/awslabs/aws-crt-python), which makes use of C extensions. Precompiled wheels are downloaded when installing on major platforms (Mac, Windows, Linux, Raspberry Pi OS). If wheels are unavailable for your platform, your machine must compile some C libraries. For example:
74-
75-
```bash
76-
# 1. Create a workspace directory to hold all the CRT files
77-
mkdir crt-workspace
78-
cd crt-workspace
79-
80-
# 2. Clone the repository, you could select the version you would like to use. You can find the awscrt version used by the current SDK from the file "./aws-iot-device-sdk-python-v2/setup.py". Update the version number in "./aws-iot-device-sdk-python-v2/setup.py" can change the awscrt version you would like to use in awsiotsdk
81-
git clone -b <CRT_VERSION> https://github.com/awslabs/aws-crt-python.git
82-
83-
# 3. Update the submodules
84-
cd aws-crt-python
85-
git submodule update --init --recursive
86-
87-
# 4. (Optional) Setup the version number of your local build. Similar to the awsiotsdk, the default version for awscrt is set to "1.0.0-dev", you can set the version number of the local build in "./aws-crt-python/awscrt/__init__.py". The awscrt version set here need to match the version specified in "./aws-iot-device-sdk-python-v2/setup.py" so that the awsiotsdk could locate the correct awscrt library.
88-
sed -i "s/__version__ = '1.0.0.dev0'/__version__ = '<CRT_VERSION>'/" awscrt/__init__.py
89-
90-
# 5. Install using Pip
91-
python3 -m pip install .
92-
```
93-
If you need aws-crt-python to use the libcrypto included on your system, set environment variable AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 while building from source:
94-
```
95-
AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 python3 -m pip install --no-binary :all: --verbose awscrt
96-
```
97-
( --no-binary :all: ensures you do not use the precompiled wheel from PyPI)
98-
99-
If you encounter issues, see [Installation Issues](./documents/PREREQUISITES.md#installation-issues) and try again.
100-
10157
## Samples
10258

10359
[Samples README](samples)
10460

10561
## Getting Help
10662

107-
The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-iot-device-sdk-python-v2/issues) and choose from one of our templates for guidance, bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag #aws-iot or If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
63+
The best way to interact with our team is through GitHub. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-python-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-python-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
10864

10965
Please make sure to check out our resources too before opening an issue:
11066

111-
* Our [FAQ](./documents/FAQ.md)
112-
* [API documentation](https://aws.github.io/aws-iot-device-sdk-python-v2/)
113-
* Our [Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
67+
* [FAQ](./documents/FAQ.md)
68+
* [API Docs](https://aws.github.io/aws-iot-device-sdk-python-v2/)
69+
* [IoT Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
11470
* Check for similar [Issues](https://github.com/aws/aws-iot-device-sdk-python-v2/issues)
11571
* [AWS IoT Core Documentation](https://docs.aws.amazon.com/iot/)
11672
* [Dev Blog](https://aws.amazon.com/blogs/?awsf.blog-master-iot=category-internet-of-things%23amazon-freertos%7Ccategory-internet-of-things%23aws-greengrass%7Ccategory-internet-of-things%23aws-iot-analytics%7Ccategory-internet-of-things%23aws-iot-button%7Ccategory-internet-of-things%23aws-iot-device-defender%7Ccategory-internet-of-things%23aws-iot-device-management%7Ccategory-internet-of-things%23aws-iot-platform)
11773
* Integration with AWS IoT Services such as
11874
[Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
11975
and [Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html)
12076
is provided by code that been generated from a model of the service.
121-
122-
## Giving Feedback and Contributions
123-
124-
We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels.
125-
12677
* [Contributions Guidelines](./documents/CONTRIBUTING.md)
127-
* Articulate your feature request or upvote existing ones on our [Issues](https://github.com/aws/aws-iot-device-sdk-python-v2/issues?q=is%3Aissue+is%3Aopen+label%3Afeature-request) page.
128-
* Create discussion questions [here](https://github.com/aws/aws-iot-device-sdk-python-v2/discussions)
129-
* Find a bug open an [issue](https://github.com/aws/aws-iot-device-sdk-python-v2/issues)
13078

13179
## License
13280

documents/FAQ.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*__Jump To:__*
44
* [Where should I start](#where-should-i-start)
55
* [How do I enable logging](#how-do-i-enable-logging)
6+
* [Installation Issues](#installation-issues)
67
* [I keep getting AWS_ERROR_MQTT_UNEXPECTED_HANGUP](#i-keep-getting-aws_error_mqtt_unexpected_hangup)
78
* [I am experiencing deadlocks](#i-am-experiencing-deadlocks)
89
* [Mac-Only TLS Behavior](#mac-only-tls-behavior)
@@ -21,6 +22,44 @@ io.init_logging(io.LogLevel.Error, 'stderr')
2122
```
2223
You can also enable [CloudWatch logging](https://docs.aws.amazon.com/iot/latest/developerguide/cloud-watch-logs.html) for IoT which will provide you with additional information that is not available on the client side sdk.
2324

25+
### Installation Issues
26+
27+
`awsiotsdk` depends on [awscrt](https://github.com/awslabs/aws-crt-python), which makes use of C extensions. Precompiled wheels are downloaded when installing on major platforms (Mac, Windows, Linux, Raspberry Pi OS). If wheels are unavailable for your platform, your machine must compile some C libraries. For example:
28+
29+
```bash
30+
# 1. Create a workspace directory to hold all the CRT files
31+
mkdir crt-workspace
32+
cd crt-workspace
33+
34+
# 2. Clone the repository, you could select the version you would like to use. You can find the awscrt
35+
# version used by the current SDK from the file "./aws-iot-device-sdk-python-v2/setup.py". Update
36+
# the version number in "./aws-iot-device-sdk-python-v2/setup.py" can change the awscrt version
37+
# you would like to use in awsiotsdk
38+
git clone -b <CRT_VERSION> https://github.com/awslabs/aws-crt-python.git
39+
40+
# 3. Update the submodules
41+
cd aws-crt-python
42+
git submodule update --init --recursive
43+
44+
# 4. (Optional) Setup the version number of your local build. Similar to the awsiotsdk, the default
45+
# version for awscrt is set to "1.0.0-dev", you can set the version number of the local build in
46+
# "./aws-crt-python/awscrt/__init__.py". The awscrt version set here need to match the version
47+
# specified in "./aws-iot-device-sdk-python-v2/setup.py" so that the awsiotsdk could locate the
48+
# correct awscrt library.
49+
sed -i "s/__version__ = '1.0.0.dev0'/__version__ = '<CRT_VERSION>'/" awscrt/__init__.py
50+
51+
# 5. Install using Pip
52+
python3 -m pip install .
53+
```
54+
If you need aws-crt-python to use the libcrypto included on your system, set environment variable AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 while building from source:
55+
```
56+
AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 python3 -m pip install --no-binary :all: --verbose awscrt
57+
```
58+
( --no-binary :all: ensures you do not use the precompiled wheel from PyPI)
59+
60+
If you encounter issues, see [Installation Issues](./PREREQUISITES.md#installation-issues) and try again.
61+
62+
2463
### I keep getting AWS_ERROR_MQTT_UNEXPECTED_HANGUP
2564

2665
This could be many different things but it most likely is a policy issue. Start with using a super permissive IAM policy called AWSIOTFullAccess which looks like this:

0 commit comments

Comments
 (0)