Metadata-Version: 2.3
Name: pyfritzsms
Version: 0.1.2
Summary: Python library to send SMS via AVM FRITZ!Box
License: Apache-2.0
Keywords: fritzbox,sms
Author: Marc Hoersken
Author-email: info@marc-hoersken.de
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: aiohttp (>=3.10.3,<4.0.0)
Requires-Dist: pyotp (>=2.9.0,<3.0.0)
Project-URL: Repository, https://github.com/mback2k/pyfritzsms
Description-Content-Type: text/markdown

# Python library to send SMS via AVM FRITZ!Box

## Requirements

- AVM FRITZ!Box with internal or USB cellular modem and SMS enabled SIM card.
- User account with app-based second-factor enabled and TOTP secret available.

## Example usage

```python
from fritzsms.fritzbox import FritzBox
from aiohttp import ClientSession
import asyncio


async def async_main_test():
    async with ClientSession() as session:
        box = FritzBox("fritz.box", session)
        box.set_otp("TOTP-secret")
        print(box.get_otp()) # for confirmation during setup
        await box.login("username", "password")
        uid = await box.send_sms("mobile-number", "Hello World!")
        await box.delete_sms(uid)
        print(await box.list_sms())
        await box.logout()


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.run_until_complete(async_main_test())
```

