Skip to main content

Python library for 2N® devices

Project description

Py2N

Asynchronous library to control 2N Telekomunikace® devices

This library is under development

Requirements

  • Python >= 3.9
  • aiohttp

Install

pip install py2n

Example

from py2n import Py2NDevice, Py2NConnectionData

import asyncio
import aiohttp

async def main():
    """Run with aiohttp ClientSession."""
    async with aiohttp.ClientSession() as session:
        await run(session)


async def run(websession):
    """Use library."""
    device = await Py2NDevice.create(
        websession,
        Py2NConnectionData(
            ip_address="192.168.1.69",
            username="username",
            password="password",
        ),
    )

    await device.restart()

asyncio.run(main())

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

py2n-0.2.7.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file py2n-0.2.7.tar.gz.

File metadata

  • Download URL: py2n-0.2.7.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for py2n-0.2.7.tar.gz
Algorithm Hash digest
SHA256 e7ee34cda536ff8ce0d5de987454470579f85da3862d9a45017baf129bb1c776
MD5 3700be2f043dde049a28670f30651f22
BLAKE2b-256 5ef4910e0d43e5d1629dddd51a848f428621a17894d08cfeff54c38cec70a728

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