Skip to main content

Sans-IO telnet parser

Project description

telnetio

A Sans-IO implementation of a telnet parser.

Includes an anyio server implementation. To install use the anyio extra, such as pip install telnetio[anyio].

import anyio
from anyio.abc import AnyByteStream

from telnetio import AnyioTelnetServer

async def handler(stream: AnyByteStream) -> None:
    async with stream, AnyioTelnetServer(stream) as telnet:
        async for data in telnet:
            await telnet.send(data)

async def main() -> None:
    listener = await anyio.create_tcp_listener(local_port=1234)
    await listener.serve(handler)

anyio.run(main)

See the examples directory for more 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

telnetio-0.4.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

telnetio-0.4.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file telnetio-0.4.0.tar.gz.

File metadata

  • Download URL: telnetio-0.4.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.1 Linux/6.16.3-76061603-generic

File hashes

Hashes for telnetio-0.4.0.tar.gz
Algorithm Hash digest
SHA256 21c5f4eedf2a03b4eab490292e555a9f8565ae7223b4e17c4e7b3ce58a45a05c
MD5 2ea089a25e9e0da44cbcc03de1a38fd8
BLAKE2b-256 a6f132dac27458354de2eb1001019a0d7670ef12b895290d411dd80e2010a5f7

See more details on using hashes here.

File details

Details for the file telnetio-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: telnetio-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.1 Linux/6.16.3-76061603-generic

File hashes

Hashes for telnetio-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8916df2caaacba398f8070d7281ce3cb1097ce0ea302a479476a5dd13aa217fb
MD5 22ebb848d0a748fccd60deb1ff4927a1
BLAKE2b-256 6fe053f20c414a0928dfbee1b5dcc6c748d58d3bed5d865810cbe6fb23ba1231

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