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()
addresses = socket.getaddrinfo("localhost", 443, type=socket.TCP)
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.
socket.getaddrinfo forwards to Python's standard-library resolver and accepts
the same host, port, family, type, proto, and flags arguments.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simplysocket-0.1.1.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simplysocket-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / simplysocket-0.1.1.tar.gz
| Download URL | simplysocket-0.1.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
052f26d35fdb1ba0985c4549290127ed9e502b6c3baa9c8dac6a528bc5a48500
|
|
BLAKE2b-256 checksum How to use checksums |
146381b74b31b31cd23e7983ca0ff949e73fb692148fd98598e885eabe9d023d
|
| 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.1-py3-none-any.whl
| Download URL | simplysocket-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0e2371a55436ef357dbb39831c46d89ae92c4004a3980a99a9920c6b7c66735
|
|
BLAKE2b-256 checksum How to use checksums |
dd6e7e9740ba5ef960903120a866e20a424e51a4b6321968b1e7e3b8ce1b1598
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|