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.4.tar.gz (60.4 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.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfritzsms-0.1.4.tar.gz
  • Upload date:
  • Size: 60.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyfritzsms-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5ba5a87fd5727d20e2793e1a110990d67ce9f460264c716bd42039ab44a9d27d
MD5 62e2b8e0fbddfc749d21986c020850d7
BLAKE2b-256 67aef4453e17a83b473ee0f79aad9364a229b11d82a5647b25c20cde18321fa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfritzsms-0.1.4.tar.gz:

Publisher: release.yaml on mback2k/pyfritzsms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pyfritzsms-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyfritzsms-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b2115ea18a77e04920804c8132e592d0506e9388992299d5ed9eef9455865498
MD5 77497eb6b9feeaf8353f6600b9d65994
BLAKE2b-256 1f30fd8a0f5fc77ad235bec56f393ea5b29a61fe172d593d3c8c727662625476

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfritzsms-0.1.4-py3-none-any.whl:

Publisher: release.yaml on mback2k/pyfritzsms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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