Skip to main content

A friendlier interface to socket.

Emulates file-like objects.

import sockless


with sockless.open('irc.freenode.net:6665', mode='rw') as sock:
    # Writing.
    sock.write('NICK atestbot\r\n')
    sock.write('USER atestbot bot@aserver.com unused :atestbot\r\n')
    sock.write('JOIN #testbot\r\n')

    # Reading lines from a socket.
    for line in sock:
        if not line:
            break

        if 'End of /NAMES list' in line:
            print "Successfully connected & joined. Quitting."
            break

        print line.strip()

TODO

  • Tests

  • Docs

  • Python 3 support

Release files for sockless 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sockless 0.9.1
File Size Uploaded
sockless-0.9.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sockless 0.9.1
File Interpreter ABI Platform
sockless-0.9.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.2 kB

Release files / sockless-0.9.1.tar.gz

Download URL sockless-0.9.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
64e14d8607fb052479e4a2848ee84fba0d0f0da317672448606f5da38886fc82
BLAKE2b-256 checksum
How to use checksums
314e14ede9ac4543e4bd29570d5d5afb1da0553225f5c0fb555e8898400bce58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sockless-0.9.1-py2.py3-none-any.whl

Download URL sockless-0.9.1-py2.py3-none-any.whl
Size 5.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7fcf71c80b47b7119c71fba0e18b2e942a63835b1c639c5ca85e06e126c45734
BLAKE2b-256 checksum
How to use checksums
3a29434a05ac2bd0602e5d4cccb68581540e20559466924f722e905989aac355
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files

0.9.0

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page