Skip to main content

simplysocket

simplysocket is a small helper for creating Python standard-library sockets using familiar family and protocol names. It has no runtime dependencies.

Installation

python -m pip install simplysocket

Usage

from simplysocket import socket

tcp_socket = socket.defaultSocket()
udp_socket = socket.createSocket(socketType="UDP")
ipv6_socket = socket.createSocket(socketFamily="ipv6")

for sock in (tcp_socket, udp_socket, ipv6_socket):
    sock.close()

createSocket supports the families v4, ipv4, inet, ip4, v6, ipv6, inet6, ip6, and bluetooth; and the types TCP, UDP, and RAW. Omitting the family or type selects IPv4 or TCP, respectively. Unsupported family or type names raise ValueError. Bluetooth raises NotImplementedError on platforms where Python does not expose Bluetooth sockets. Creating raw sockets may require elevated operating-system permissions.

Development

Build and validate the distribution with:

python -m pip install --upgrade build twine
python -m unittest discover -s tests
python -m build
python -m twine check dist/*

Upload only after reviewing the built artifacts and confirming the project name and release metadata:

python -m twine upload dist/*

License

Distributed under the MIT License. See LICENSE.

Metadata

Release files for simplysocket 0.1.0

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

Source distribution (sdist)

Source distribution for simplysocket 0.1.0
File Size Uploaded
simplysocket-0.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simplysocket 0.1.0
File Interpreter ABI Platform
simplysocket-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / simplysocket-0.1.0.tar.gz

Download URL simplysocket-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4393d9cff8fbf9fd8ea2e8a654c0f9c738c86128eeb6d3b8b72464282d64464a
BLAKE2b-256 checksum
How to use checksums
434f9384fe0a76604065460ab10a9a59da47189c4bad0a8e96cae1549478581d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / simplysocket-0.1.0-py3-none-any.whl

Download URL simplysocket-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7623ec25ecf04c8e77116aafefa6ddf0f9bbbef2d2b994e6310f1ff0383a6529
BLAKE2b-256 checksum
How to use checksums
b53e4972eaa8703a29b2eb7d6249855a9e93c7b7086230b9589debba679d07c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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