Skip to main content

Asyncio-based Telnet library

Project description

Python Telnet Utility: asyncio-powered

The `asyncio-telnet` library designed for convenient interaction with Telnet devices in both synchronous and asynchronous modes, making the process straightforward and flexible in various usage scenarios.

  • Support for Asynchrony and Synchrony: Harness the power of asyncio for efficient and non-blocking communication with Telnet servers. With this library, you have the option to choose between asynchronous and synchronous modes, depending on the requirements of your project.
  • Ease of Use: The library provides a user-friendly interface for both synchronous and asynchronous cases, making it adaptable to different project needs.
  • Telnet Protocol Handling: Transparently handles the intricacies of the Telnet protocol, allowing you to focus on the logic of your application.
  • Flexible Integration: Easily integrate Telnet functionality into your Python applications with a simple API.

Installation

You can install the library using pip. Make sure you have Python 3.6 or later installed.

pip install asyncio-telnet

Usage

Here is a simple example of using in an asynchronous context:

import asyncio
from asyncio_telnet import Telnet

async def main():
    async with Telnet(host='example.com', port=23) as telnet:
        await telnet.write(b'Hello, Telnet!\r\n')
        response = await telnet.read_until_eof()
        print(response)

if __name__ == '__main__':
    asyncio.run(main())

For synchronous usage, you can use the library in a similar way:

from asyncio_telnet import Telnet

def main():
    with Telnet(host='example.com', port=23) as telnet:
        telnet.write(b'Hello, Telnet!\r\n')
        response = telnet.read_until_eof()
        print(response)

if __name__ == '__main__':
    main()

Feel free to check the documentation for more detailed information and examples.

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

asyncio-telnet-0.1.11.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

asyncio_telnet-0.1.11-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file asyncio-telnet-0.1.11.tar.gz.

File metadata

  • Download URL: asyncio-telnet-0.1.11.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for asyncio-telnet-0.1.11.tar.gz
Algorithm Hash digest
SHA256 fcf3517ede8d23c5aa5965aa8fbbaf488ae203c08375ebd82949580ee4f8f82f
MD5 d39ca54b819ae1daef2b008cc2930f7d
BLAKE2b-256 125befe147929a3124b8a3b8e24b4c462d47e46db66e3aef382136f00812f00a

See more details on using hashes here.

File details

Details for the file asyncio_telnet-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for asyncio_telnet-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc39408d529fedff78f53b477b2c4840229b298490d9f32849fad05ce2fa477
MD5 239c0d8b33082df4f05511a38c2a4563
BLAKE2b-256 e963641cbd716021fe08eda964e992bc810ed05a0d8c5302eaba24120d5d7080

See more details on using hashes here.

Supported by

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