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.3.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.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfritzsms-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8f5c6eaa2c85affbf543bb2da26e3672bab77163455fd958f2fb4d5548d1d9f0
MD5 cd317f3801da1ab7cc96a1a55c99808f
BLAKE2b-256 da43c1a40538a134b505a44a19de0c30200d4067fc96b12b4e98c178a97629b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfritzsms-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pyfritzsms-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc0c1ecf5d1a5e2b2e08966f5646bff779df1e8fe05d881bae2f7c7512fda050
MD5 1cdd0fa1fef862fdd4cd7db98668fac9
BLAKE2b-256 b385ac79c3ae5f8d4eeaa653db59b4e7bc44a12e91773b50fb691aaff905ad72

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfritzsms-0.1.3-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