Skip to main content

No project description provided

Project description

sagemcom-f3896lg-zg-api

PyPI - Version PyPI - Python Version


Table of Contents

Overview

sagemcom-f3896lg-zg-api is a async Python client that interacts with the Sagemcom F3896LG-ZG router.

For now, the only supported operation is listing hosts on the network, which can be used for presence detection or monitoring your home network.

This is inspired by https://github.com/iMicknl/python-sagemcom-api, but my version of this router does not support the FastCGI endpoints used by that library.

Installation

pip install sagemcom-f3896lg-zg-api

Example

ROUTER_ENDPOINT = "192.168.100.1"
PASSWORD = "..."
async def main():
    async with SagemcomF3896LGApi(router_endpoint=ROUTER_ENDPOINT, password=PASSWORD) as api:
        if await api.login():
            print("Logged in! Fetching connected hosts...")
            hosts = await api.get_hosts()
            for host in hosts.hosts.hosts:
                print(host.model_dump_json(indent=4))
        else:
            print("Failed to login!")

License

sagemcom-f3896lg-zg-api is distributed under the terms of the MIT license.

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

sagemcom_f3896lg_zg_api-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

sagemcom_f3896lg_zg_api-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file sagemcom_f3896lg_zg_api-0.1.0.tar.gz.

File metadata

  • Download URL: sagemcom_f3896lg_zg_api-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sagemcom_f3896lg_zg_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da3819163f84e9010f161cec3806acddebb43804b092a1105c408b0366f42da6
MD5 577143976fdc779b2bf0aba69766216d
BLAKE2b-256 83f33271119e6acf5254e26b5a98b21838861415c05765c21345215cb62df2ae

See more details on using hashes here.

File details

Details for the file sagemcom_f3896lg_zg_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sagemcom_f3896lg_zg_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ed3beda1cfb10f160398b265fa82e95cdb4609f159720aca3b3bc37483182d3
MD5 8d70ad4616756b3309e04f4b972a6958
BLAKE2b-256 84c8a587bd0d4b0c496415c00c7caea2f28f4e052dcba234acf2430470a56f16

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