Python library to send SMS via AVM FRITZ!Box
Project description
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
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfritzsms-0.1.2.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfritzsms-0.1.2.tar.gz.
File metadata
- Download URL: pyfritzsms-0.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd032719a70735213d94801da48db23e4f1715f43290ae3bee23793deac7a6cc
|
|
| MD5 |
108a2747141cb5cfc781d983e66b056a
|
|
| BLAKE2b-256 |
594151410e6e501de348674e06e3ec9f0656b2a10eb33151c681f6a0af60000d
|
File details
Details for the file pyfritzsms-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyfritzsms-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e80c701252dfc560aa92054d76de722b73e747a609a2d796f5ff28f7d613e775
|
|
| MD5 |
c8156937d83699c639ea94b21c2a4ff7
|
|
| BLAKE2b-256 |
033dfdfa1c71231c6af85abdf8fa62d8138623f5b71c2b5347d77f96138ab804
|