Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anexia/django-aws-iot
A minimalistic approach to use AWS IoT in Django
https://github.com/anexia/django-aws-iot
aws django hacktoberfest iot mqtt
Last synced: about 2 months ago
JSON representation
A minimalistic approach to use AWS IoT in Django
- Host: GitHub
- URL: https://github.com/anexia/django-aws-iot
- Owner: anexia
- License: mit
- Created: 2021-07-27T07:46:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T11:59:24.000Z (2 months ago)
- Last Synced: 2024-11-05T12:03:09.986Z (2 months ago)
- Topics: aws, django, hacktoberfest, iot, mqtt
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Django AWS IoT
[![PyPI](https://badge.fury.io/py/django-aws-iot.svg)](https://pypi.org/project/django-aws-iot/)
[![Test Status](https://github.com/anexia/django-aws-iot/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/anexia/django-aws-iot/actions/workflows/tests.yml)
[![Codecov](https://codecov.io/gh/anexia/django-aws-iot/branch/main/graph/badge.svg)](https://codecov.io/gh/anexia/django-aws-iot)A django module that allows to connect and publish messages to AWS IoT
# Installation
Install using pip:
```shell
pip install django-aws-iot
```Extend django settings:
```python
AWS_IOT_ENABLED = True
AWS_IOT_SERVER = "server.amazonaws.com"
AWS_IOT_CLIENT_ID = "Thing-Name"
AWS_IOT_CERT_PATH = "/certificates/8a6a6cfdf1-certificate.pem.crt"
AWS_IOT_KEY_PATH = "/certificates/8a6a6cfdf1-private.pem.key"
AWS_IOT_ROOT_CERT_PATH = "/certificates/AmazonRootCA1.pem"
```# Usage
Currently the library only supports publishing messages to AWS IoT:
```python
from django_aws_iot.aws_iot import mqtt_publishmqtt_publish(
'topic/123',
{
'foo': 'bar'
}
)
```