Metadata-Version: 2.5
Name: smartapp-sdk
Version: 0.9.2
Summary: Framework to build a webhook-based SmartThings SmartApp
Project-URL: Homepage, https://pypi.org/project/smartapp-sdk/
Project-URL: Repository, https://github.com/pronovic/smartapp-sdk
Project-URL: Changelog, https://github.com/pronovic/smartapp-sdk/releases
Project-URL: Documentation, https://smartapp-sdk.readthedocs.io/en/stable/
Project-URL: Issues, https://github.com/pronovic/smartapp-sdk/issues
Author-email: "Kenneth J. Pronovici" <pronovic@ieee.org>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries
Requires-Python: <4,>=3.12
Requires-Dist: arrow<2.0.0,>=1.4.0
Requires-Dist: attrs>=26.1.0
Requires-Dist: cattrs>=26.2.0
Requires-Dist: pycryptodomex<4.0.0,>=3.23.0
Requires-Dist: pyyaml<7.0.0,>=6.0.3
Requires-Dist: requests<3.0.0,>=2.34.2
Requires-Dist: tenacity<10.0.0,>=9.1.4
Provides-Extra: docs
Requires-Dist: sphinx-autoapi<4.0.0,>=3.8.1; extra == 'docs'
Requires-Dist: sphinx<10.0.0,>=9.1.0; extra == 'docs'
Description-Content-Type: text/markdown

# SmartApp SDK

[![pypi](https://img.shields.io/pypi/v/smartapp-sdk.svg)](https://pypi.org/project/smartapp-sdk/)
[![license](https://img.shields.io/github/license/pronovic/smartapp-sdk)](https://github.com/pronovic/smartapp-sdk/blob/main/LICENSE)
[![wheel](https://img.shields.io/pypi/wheel/smartapp-sdk.svg)](https://pypi.org/project/smartapp-sdk/)
[![python](https://img.shields.io/pypi/pyversions/smartapp-sdk.svg)](https://pypi.org/project/smartapp-sdk/)
[![Test Suite](https://github.com/pronovic/smartapp-sdk/workflows/Test%20Suite/badge.svg)](https://github.com/pronovic/smartapp-sdk/actions?query=workflow%3A%22Test+Suite%22)
[![docs](https://readthedocs.org/projects/smartapp-sdk/badge/?version=stable&style=flat)](https://smartapp-sdk.readthedocs.io/en/stable/)
[![coverage](https://coveralls.io/repos/github/pronovic/smartapp-sdk/badge.svg?branch=main)](https://coveralls.io/github/pronovic/smartapp-sdk?branch=main)

_Note: As of January 2025, I have migrated my home automation infrastructure from SmartThings to Home Assistant, so I no longer actively use this software. I will continue to maintain the library, keeping dependencies up-to-date and supporting new Python versions, etc.  Time permitting, I will also continue to accept GitHub issues for bug fixes and enhancement requests.  If you submit an issue, please keep in mind that I no longer have a SmartThings environment to test with, so I will expect you to coordinate with me on testing before I release any changes._

---

smartapp-sdk is a Python library to build a [webhook-based SmartApp](https://developer.smartthings.com/docs/connected-services/smartapp-basics/) for the [SmartThings platform](https://www.smartthings.com/).

The SDK is intended to be easy to use no matter how you choose to structure your code, whether that's a traditional Python webapp (such as FastAPI on Uvicorn) or a serverless application (such as AWS Lambda).

The SDK handles all the mechanics of the [SmartThings webhook lifecycle interface](https://developer.smartthings.com/docs/connected-services/lifecycles/) on your behalf.  You just implement a single endpoint to accept the SmartApp webhook requests, and a single callback class where you define specialized behavior for the webhook events.  A clean [attrs](https://www.attrs.org/en/stable/) object interface is exposed for use by your callback.  The attrs interface has been designed to match the JSON interface documented by SmartThings.  If you have questions about the shape of the data or the way the lifecyle interface works, the SmartThings documentation is your best source of information.

SDK documentation for this library is found at [smartapp-sdk.readthedocs.io](https://smartapp-sdk.readthedocs.io/en/stable/).  Look there for installation instructions, the class model documentation, and example code.

**Statement on free-threading:** This code is single-threaded by design. Starting with Python 3.14, the matrix build CI workflow in GitHub Actions ensures that the test suite passes for both standard and free-threaded interpreters.
