Skip to Main Content
Getting Started with Python for the Internet of Things
book

Getting Started with Python for the Internet of Things

by Tim Cox, Dr. Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. Diwakar Vaish
February 2019
Intermediate to advanced content levelIntermediate to advanced
732 pages
17h 10m
English
Packt Publishing
Content preview from Getting Started with Python for the Internet of Things

The application of requests – publishing events to the Internet

In the previous example, we retrieved information from the Internet. Let's consider an example where we have to publish a sensor event somewhere on the Internet. This could be either a cat door opening while you are away from home or someone at your doorstep stepping on the doormat. Because we discussed interfacing sensors to the Raspberry Pi Zero in the previous chapter, let's discuss a scenario where we could post these events to Slacka workplace communication tool, Twitter, or cloud services such as Phant (https://data.sparkfun.com/).

In this example, we will post these events to Slack using requests. Let's send a direct message to ourselves on Slack whenever a sensor event ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Python Programming for IoT

Practical Python Programming for IoT

Gary Smart
Learning Python Networking - Second Edition

Learning Python Networking - Second Edition

José Manuel Ortega, Dr. M. O. Faruque Sarker, Sam Washington
Learn Quantum Computing with Python and Q#

Learn Quantum Computing with Python and Q#

Cassandra Granade, Sarah Kaiser

Publisher Resources

ISBN: 9781838555795Supplemental Content