Skip to main content

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


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.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfritzsms-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pyfritzsms-0.1.1.tar.gz.

File metadata

  • Download URL: pyfritzsms-0.1.1.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

Hashes for pyfritzsms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0b7babed5efb29ecb50802bb89fecb944b0ed725602677dd60fc895ac58b9ceb
MD5 4b3b59d5edc11b3bc67ca6a2b1e4617d
BLAKE2b-256 d2f2125ebd8e0310a58b8ecbdb7c374e4866c0c5fdf45359bbb427b2fc38a5ca

See more details on using hashes here.

File details

Details for the file pyfritzsms-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyfritzsms-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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

Hashes for pyfritzsms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 716b3bfb2856214e2e421f68dc3cb67ed82a566945d6c10f55936ec9879f2a4f
MD5 fb2e372be19fe34c0f35b0f51775dd10
BLAKE2b-256 ee546fbe33136adc47a51e953a2ecd6194309eeb29913d1d0e9ec3d0bf0bc1d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page